File:Simple house with pov ray 1 r 1.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,600 × 1,200 pixels, file size: 870 KB, MIME type: image/png)

Captions

Captions

Simple house with POV-Ray

Summary

[edit]
Description
English: Simple house with POV-Ray
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code

// // simple house // POV-Ray 3.7 source code // // 3.8.2023 v 0000.0000 //

  1. include "colors.inc"
  2. include "textures.inc"
  3. include "metals.inc"
  4. include "glass.inc"


background { color <1,1,1.2>*0.8 }

camera {

location <3, 5, -10>*8 // location <5, 0.1, -1>*5

//  location <10, 1/3, -10>*10
 look_at <0, 1, 0>  
 angle 22

}

light_source { <10, 3, -10>*1000*1000*200 color White}

plane { y,0 texture {

pigment { wrinkles color_map { [0 rgb <0,1,0> ][1 rgb <0,1/2,0> ] } }

normal { wrinkles bump_size 1}

}

}

/*

isosurface {

function {

   abs(x)+abs(y)+abs(z)-2 

}


bounded_by { box {-2,2}}

pigment { color rgb <1,1,0.5>}

}

  • /


  1. declare glass1=

material {

   texture{
       pigment {rgbf 1}
       finish {
           reflection .4
           specular 1
           roughness .008
        //   blinn 1
           conserve_energy
       }
   }
   interior {
       ior 1.5
       media {
           absorption 1
           method 3
       }
   }

}

  1. declare prism1=object {
 prism {
   linear_sweep
   linear_spline
   0, 
   20, 
   4, 
   <-5,0>, <5,0>, <0,5>, <-5,0>

}

rotate x*-90 }

  1. declare top1=object {

merge {

   difference {
   object {prism1}
   object {prism1 scale 0.96 scale z*2 scale y*1.0 translate y*-0.01 translate z*0.05} 
   //object {box {<-20,-0.2,-20>,<20,0.5,20> }  }
   texture {
       pigment { color rgb <1,1,1> }
    //   normal { wood}  
       finish {ambient 0}
    } // tex
 
   } // diff


} // union


} // object


  1. declare low1= merge {
   object {
   difference {
       box {<-5,0,-19>, <5,5,-1>}  
       box {<-4.5,0,-18.5>, <4.5,6,-1.5>}  
       scale x*0.97
   }  
   texture {
    pigment { color rgb <1,1,0.5> }
//   normal { wood rotate x*90 scale 0.1}
   }
   }
   
   object {
       prism1
       scale z/20
           scale x*0.97
       translate z*-1
       translate y*5

          texture {
    pigment { color rgb <1,1,0.5> }

// normal { wood rotate x*90 scale 0.1}

   }
   }
 

object {
   prism1
      scale x*0.97
   scale z/20
   translate z*-18
       translate y*5
         texture {
    pigment { color rgb <1,1,0.5> }
//   normal { wood rotate x*90 scale 0.1}
   }
   }



} // union


  1. declare holes1= union {
 // door
object { box {-1,1 } scale 3 scale x*1.1 scale z/4 translate x*4 translate y*0  translate z*-10

pigment {color rgb <1/5,0,0>} }


  // windows

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*-2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*0 translate y*6 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*-2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*2.1 translate x*0 translate y*6 translate z*-1

//pigment {color rgb <1,0,0>} }



object { box {-1,1 } scale 3/4 scale x*2.1  translate x*4 translate y*2  translate z*-3

pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*2.1  translate x*4 translate y*2  translate z*-7

pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*2.5  translate x*4 translate y*2  translate z*-13

pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*2.5  translate x*4 translate y*2  translate z*-17

pigment {color rgb <1/5,0,0>} }


object { box {-1,1 } scale 3/4 scale x*2.5  translate x*-4 translate y*2  translate z*-3

pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*2.5  translate x*-4 translate y*2  translate z*-7

pigment {color rgb <1/5,0,0>} }

  /*
object { box {-1,1 } scale 3/4 scale x*2.1  translate x*-4 translate y*2  translate z*-13

pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*2.1  translate x*-4 translate y*2  translate z*-17

pigment {color rgb <1/5,0,0>} }


  • /



/*

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*-2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*0 translate y*6 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*-2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*2.1 translate x*0 translate y*6 translate z*-1

//pigment {color rgb <1,0,0>} }

*/


} // win and door holes

#declare windows1=    union {
  // windows

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*-2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*0 translate y*6 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*-2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 3/4 scale z*0.1 translate x*0 translate y*6 translate z*-1

//pigment {color rgb <1,0,0>} }


object { box {-1,1 } scale 3/4 scale x*0.1  translate x*4 translate y*2  translate z*-3

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*.1  translate x*4 translate y*2  translate z*-7

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*0.3  translate x*4 translate y*2  translate z*-13

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*.1  translate x*4 translate y*2  translate z*-17

//pigment {color rgb <1/5,0,0>} }


object { box {-1,1 } scale 3/4 scale x*.1  translate x*-4 translate y*2  translate z*-3

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*0.1  translate x*-4 translate y*2  translate z*-7

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*0.1  translate x*-4 translate y*2  translate z*-13

//pigment {color rgb <1/5,0,0>} }

object { box {-1,1 } scale 3/4 scale x*0.1  translate x*-4 translate y*2  translate z*-17

//pigment {color rgb <1/5,0,0>} }


/*

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*-2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*2 translate y*2 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*0 translate y*6 translate z*-18

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*-2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*2 translate y*2 translate z*-1

//pigment {color rgb <1,0,0>} }

object { box {-1,1 } scale 1/2 scale z*0.1 translate x*0 translate y*6 translate z*-1

//pigment {color rgb <1,0,0>} }

  */


} // win and door holes

  1. declare door1=
 // door
object { box {-1,1 } scale y*1 scale z*1 scale x/50 scale z*0.5 scale 1.5 translate x*4.8 translate y*1.5  translate z*-10

pigment {color rgb <1/2,0,0>} }


  1. declare low2=

union {

   difference {
   object {low1}

   // window and door holes
   object {holes1}
   }  // difference
  


object {

   box {-1,1}
   scale <4,0.5,8.9>
   translate z*-10
   translate y*3.2
   texture {
   pigment { color <1/4,0,0>}
   }
}


}


  1. declare housebase0=

union {

object {

   box {-1,1}
   scale <5,0.5,9.5>
   translate z*-10
   texture {
       pigment { color <1/4,1/4,1/4>}
    }

}

object {
   box {-1,1}
   scale 2
   scale y/5
   translate z*-10
   translate x*5
   texture {
       pigment { color <1/6,1/6,1/6>}
    }

}

}

  1. declare low3= union {

object {low2}

object { windows1

   material {glass1}
   //pigment {color rgb Blue}
   }

object {door1}

}

  1. declare house0=union {
// roof layer

object {top1 translate y*5 pigment {color rgb <1,0,0> } }

object {low3

/*

     texture {
    pigment { color rgb <1,1,0.5> }
   normal { wood rotate x*0 scale 0.1}
   }
 */

}


// lower


// chimney

difference {

   box {-1,1 scale 0.6 scale y*4 translate y*9 translate z*-7 translate x*2 } 
    box {-1,1 scale 0.6 scale x*0.7 scale z*0.7 scale y*11 translate y*11 translate z*-7 translate x*2 } 
  
   texture {pigment { color rgbt <1/3,0,0>}}

}

object {housebase0}

} // union


union {

object {house0}

translate z*9

//object {house0 scale 0.8 scale z*0.4 rotate y*90 translate x*8 translate z*-9}


//rotate y*180

// rotate y*60

//rotate y*-90+180 // translate z*9

}

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:45, 3 August 2023Thumbnail for version as of 16:45, 3 August 20231,600 × 1,200 (870 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata