|
|
This is the code for the tree images I made for JS's "challenge" on
p.b.images. The two images I uploaded are only samples of what
the tree macro can do; there are some parameters at the top of
the file that can be tweaked to create different trees.
Of course, the whole point of this exercise is to create as many
objects as possible in as few lines of code as possible while still
making an interesting scene out of it, so don't expect this code
to be anywhere near the league of the maketree() macro. :-)
In interest of code size, I decided to forego the ground (which
would then have required some non-trivial background scenery
in order to avoid the drudgery of Yet Another Infinite Plane,
etc.). Instead, I chose the camera angle so that it gives an
illusion of the tree being firmly planted in the ground even
though it is actually floating in midair. :-) It all depends on
your Point Of View, as they say. This also allows for the
branches to be dimly illuminated from below in order for
their geometry to be a little clearer, since most of the light
is otherwise completely blocked off by the spherical leaves.
The only non-trivial texture is the sky_sphere, although of
course the tree would look better if it had some actual wood
texture and had more leaf-like shapes for its leaves. This is
left as an exercise for the reader. ;-)
Post a reply to this message
Attachments:
Download 'short01.pov.txt' (1 KB)
|
|
|
|
A slight mod to the 'Leaf' bit
union {
cone { <0,0,0>, 0.15, <0,1,0>, 0.05 }
sphere { <0, 0, 0>, 0.5 scale <6,.1,1.5> rotate 120*y translate y pigment { rgb
<.2, .6, 0> } }
sphere { <0, 0, 0>, 0.5 scale <6,.1,1.5> rotate -120*y translate y pigment { rgb
<.2, .6, 0> } }
sphere { <0, 0, 0>, 0.5 scale <6,.1,1.5> translate y pigment { rgb <.2, .6, 0> }
}
}
Makes a semi believable leaf
Post a reply to this message
Attachments:
Download 'tree_test.jpg' (64 KB)
Preview of image 'tree_test.jpg'
|
|