Pseudo code for Pine Tree point per point generation? (2d)
-
12-10-2019 - |
Question
NY is coming!) So let us assume we have some function like drawPoint(color, x, y) how would we render a pine tree?
Solution
You could try an IFS. See http://commons.wikimedia.org/wiki/File:Ifs_pine.png
OTHER TIPS
Just for fun. Not a real answer:
n = 5;
p = {};
AppendTo[ p, {Brown, Cylinder[{{0, 0, 0}, {0, 0, 1}}, .5]}];
For[i = 1, i <= n, i++,
AppendTo[p, {Green, Cone[{{0, 0, i}, {0, 0, i + 3/2}}, (7 - i)^2/6]}];
];
Graphics3D[p, Boxed -> False]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow