Palm tree
This is a simple design and visualisation of a palm tree. The palm leaves are borrowed from a previous blog. The new part is the tree trunk, which is an EXTRUSION object. Before the inclusion of EXTRUSION in VRMath2 Editor, tree stems or branches may be just cylinders. Using EXTRUSION, more irregular tree trunks can be achieved.
Palm trees belong to the Arecaceae family. They can grow in different environments such as deserts, seashores and rainforests.
The EXTRUSION object has a spine, which are a collection of 3D coordinates along the Y axis. Each coordinate in the spine has an associated scale and orientation. I utilised the scale to create bigger trunk at the bottom and slimmer trunk at the top. The coordinates in the spine can have non-zero X or Z so the tree trunk can be curved as can be seen at the top of the palm tree above.
There are 10 leaves randomly INLINE on top of the tree. The 10 inlined leaves seem to make the virtual world b bit slow to navigate. Perhaps one leaf and 9 copy and pasted leaves could reduce the rendering load. This is certainly a simple simulation of a palm tree, but the random leaves and the tree trunk (also textured) make it look not too bad already. The ground is an enlarged RECTANGLE with a tile texture. At the bottom of the tree, an ELEVATIONGID (scaled down) with a texture to look like some small rocks to prevent weed growing and conserve water from vaporising. The Logo program is as below and please feel free to modify.
; Palm tree ; CLEAN HOME CT RESET SETBG 42 RU 90 SETSCALE 10 10 1 RECTANGLE SELECT OBJECT SETIT 7 21 SETITSCALE 2 2 HOME SETSCALE .21 0.05 .21 WEST 1 NORTH 1 ELEGRID SELECT OBJECT SETIT 4 14 SETSCALE 1 1 1 HOME MAKE "cs [] REPEAT 24 [ FD .5 QUEUE "cs XCOR QUEUE "cs ZCOR BK .5 LT 360/24 ] HOME FD .5 QUEUE "cs XCOR QUEUE "cs ZCOR BK .5 MAKE "spine [ 0 0 0 0 .2 0 0 .4 0 0 .5 0 0 .6 0 0 1 0 0.05 2 0 0.1 3 0 0.05 3.2 0 0 3.4 0 0 3.8 0 0 4 0] MAKE "scale [ .9 .9 1.2 1.2 1.3 1.3 1.35 1.35 1.3 1.3 .9 .9 .7 .7 .35 .35 .4 .4 .35 .35 .2 .2 .15 .15] EXTRUSION SELECT OBJECT SETIT 6 16 MAKE "obj WORD OBJECT "_extrusion SET :obj "crossSection :cs SET :obj "creaseAngle 3.14 SET :obj "spine :spine SET :obj "scale :scale UP 4 MAKE "ori ORI REPEAT 10 [ SETHEADING :ori RT RANDOM 360 RD RANDOM 120 WORLD "/sites/default/files/user/u3/world/palm_leaf.x3d ]
Files: palm_tree.x3d palm.logo
- Andy's blog
- Login or register to post comments
- 6514 reads