CITE THIS NOTEBOOK: 3D animated postcard of a Christmas tree with snow by David Balandra. Wolfram Community JAN 3 2023.
3D Christmas tree consists of six cones representing the tree levels standing on long brown cone representing the stem. Spheres with random colors were used for decorations along with small stellated dodecahedron on top.
Functions
Functions
In[]:=
Tx[x_]:=TranslationTransform[{x,0,0}][[1]];(*translationinxaxis*)Ty[y_]:=TranslationTransform[{0,y,0}][[1]];(*translationinyaxis*)Tz[z_]:=TranslationTransform[{0,0,z}][[1]];(*translationinzaxis*)Rx[θx_]:=RotationTransform[θx,{1,0,0}][[1]];(*rotationaroundxaxis*)Ry[θy_]:=RotationTransform[θy,{0,1,0}][[1]];(*rotationaroundyaxis*)Rz[θz_]:=RotationTransform[θz,{0,0,1}][[1]];(*rotationaroundzaxis*)T3D[V_]:={V[[1]],V[[2]],V[[3]]};(*transformsa4Dvectorintoa3Dvector*)
Parameters
Parameters
In[]:=
hl1=3;(*stemheight*)α=73*Degree;(*thepinetreeisinscribedinanisoscelestrianglewhoseequalanglesare73°*)HT=4Tan[α];(*treecrownheight/lenght*)δ=HT/6;(*thetreecrownisdividedinto6parts*)
Animation
Animation
In[]:=
Out[]=