1 // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
2 // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
3 // letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
5 // Persistence Of Vision Ray Tracer Scene Description File
6 // Desc: Brick wall & Stucco
10 // Updated: 2013/02/15 for 3.7
17 global_settings { assumed_gamma 1.0
18 noise_generator
1 } // change to 2 or 3.
26 location <0.2, 0.0,-25.0>
27 look_at <0.0, 0.0, 0.0>
28 right x*image_width
/image_height
// keep proportions with any aspect ratio
32 //====== Doing the Stucco ======
34 #
declare L2
=0.55; //clock; //Set amount of decay of stucco, higher value is more decay. animate
35 #
declare PWrink
= pigment { //Mortar
43 #
declare Stucco
= pigment { //Stucco
52 #
declare StuMor
= pigment { //Stucco & Mortar
63 #
declare HF_Stucco
=height_field { //Turn it into a hightfield
64 function
500, 500{ //500,500 for test higher is better, but watch the memory
70 pigment { //Use the mortar to colour up the stucco
80 translate <-0.5, -0.5, 0>
86 //====== Lay some Bricks ======
88 //Size : dimension of the brick in a vector x, y, z
89 //Mortar : width of the joint.
90 //Turbulence etc : control the stone deformation.
91 #macro BrickWall
(Size
, Mortar
, Turbulence
, Octaves
, Lambda
, Omega
)
93 #local Brick
= pigment {
94 boxed
// one single brick ...
95 scale <Size.
x/2,Size.
y/2,Size.
z/2>
96 translate <Size.
x/2+Mortar
,Size.
y/2+Mortar
,0>
97 warp {repeat x*(Size.
x+Mortar
)} // ... repeated over and over again.
98 warp {repeat y*(2*(Size.
y+Mortar
))}
101 #
declare FBrickWall
= function
{
106 scale <1,2*(Size.
y+Mortar
),1>
110 warp { // deforming the bricks ...
111 turbulence Turbulence
116 translate <0,-(Mortar
/2),0>
118 [0.5, Brick
// ... row by row.
120 turbulence Turbulence
125 translate <(Size.
x/2)+Mortar
,(Size.
y+(Mortar
/2)),0>
132 #
declare Wall
=pigment {
133 BrickWall
(<4,1,1>,0.2,<0.05,0.1,0>,6,0.5,0.5)
134 function
{FBrickWall
(x,y,z).gray
}
135 pigment_map { // give some structure to the joint ...
139 [0, rgb 0][1, rgb 0.3]
142 [0.05, crackle // ... and the bricks.
146 [0, rgb 0.34][1, rgb 0.5]
153 #
declare HF_Wall
=height_field { // Build the wall
154 function
500, 500 { //500,500, for test, higher is better & slower. Watch the memory use.
169 [0.0, rgb <0.5,0.3,0.25>]
170 [0.15, rgb <0.5,0.3,0.25>/1.3]
171 [0.3, rgb <0.5,0.3,0.25>]
172 [0.6, rgb <0.6,0.3,0.25>/1.6]
173 [0.8, rgb <0.5,0.3,0.25>]
174 [1.0, rgb <0.5,0.3,0.35>/2]
178 translate <-0.5, -0.5, 0>
186 object {HF_Wall
translate <0,0,-0.8>}