|
![](/i/fill.gif) |
You guys really don't get it do you ? I do indent when "I" feel it
will really help in understanding the code. I generaly will only do
so however when the code I am writing is so damn confusing there is
no other way to format it. Take the following as an example where I
was forced to apply some form of indenting. There was little choice
in the matter becasue I kept loosing myself when developing it. You
may look at and think that it is not indented properly but I find it
quit understandable in it's present form.
The following is from a section of a tutorial I am writting on the gradient
pattern.
#declare P1 = pigment{rgbf< 1, 1, 1,.3>}
#declare P2 = pigment{rgbf< 0, 0, 0, 0>}
#declare P3 = pigment{rgbf< 1, 1, 1, 0>}
#declare P4 = pigment{rgbf< 0, 0, 0, 0>}
#declare N1 = normal {gradient y 0.5}
#declare N2 = normal {gradient x 1.0}
#declare Checked1 =
texture {
pigment { checker
pigment { checker
pigment { checker
pigment { checker
pigment { gradient y pigment_map{[.5 P1][.5 P2]}scale 0.5}
pigment { gradient x pigment_map{[.5 P2][.5 P1]}scale 0.5}scale 0.5}
pigment { checker
pigment { gradient y pigment_map{[.5 P1][.5 P2]}scale 0.5}
pigment { gradient x pigment_map{[.5 P2][.5 P1]}scale 0.5}scale 0.5}
scale 0.25 }
pigment { checker
pigment { checker
pigment { gradient y pigment_map{[.5 P2][.5 P1]}scale 0.5}
pigment { gradient x pigment_map{[.5 P1][.5 P2]}scale 0.5}scale 0.5}
pigment { checker
pigment { gradient y pigment_map{[.5 P2][.5 P1]}scale 0.5}
pigment { gradient x pigment_map{[.5 P1][.5 P2]}scale 0.5}scale 0.5}
scale 0.25 }
scale 1.0 }
pigment { checker
pigment { checker
pigment { checker
pigment { gradient y pigment_map{[.5 P2][.5 P1]}scale 0.5}
pigment { gradient x pigment_map{[.5 P1][.5 P2]}scale 0.5}scale 0.5}
pigment { checker
pigment { gradient y pigment_map{[.5 P2][.5 P1]}scale 0.5}
pigment { gradient x pigment_map{[.5 P1][.5 P2]}scale 0.5}scale 0.5}
scale 0.25 }
pigment { checker
pigment { checker
pigment { gradient y pigment_map{[.5 P1][.5 P2]}scale 0.5}
pigment { gradient x pigment_map{[.5 P2][.5 P1]}scale 0.5}scale 0.5}
pigment { checker
pigment { gradient y pigment_map{[.5 P1][.5 P2]}scale 0.5}
pigment { gradient x pigment_map{[.5 P2][.5 P1]}scale 0.5}scale 0.5}
scale 0.25 }
scale 1.0 }
scale 1.0 }
normal { checker
normal { checker
normal { checker
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N2][.5 N1]}scale 0.5}scale 0.5}
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N1][.5 N2]}scale 0.5}scale 0.5}
scale 0.25 }
normal { checker
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N2][.5 N1]}scale 0.5}scale 0.5}
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N2][.5 N1]}scale 0.5}scale 0.5}
scale 0.25 }
scale 1.0 }
normal { checker
normal { checker
normal { checker
normal { gradient y 1 normal_map{[.5 N2][.5 N1]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N1][.5 N2]}scale 0.5}scale 0.5}
normal { checker
normal { gradient y 1 normal_map{[.5 N2][.5 N1]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N1][.5 N2]}scale 0.5}scale 0.5}
scale 0.25 }
normal { checker
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N2][.5 N1]}scale 0.5}scale 0.5}
normal { checker
normal { gradient y 1 normal_map{[.5 N1][.5 N2]}scale 0.5}
normal { gradient x 1 normal_map{[.5 N2][.5 N1]}scale 0.5}scale 0.5}
scale 0.25 }
scale 1.0 }
bump_size 1 }
finish { ambient 0.3 diffuse 0.4 }
rotate 45*z
scale 1
}
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |