Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
纽约要来了!)所以让我们假设我们有一些函数,比如 drawPoint(color, x, y) 我们将如何渲染一棵松树?
你可以试试IFS。见http://commons.wikimedia.org/wiki/File:Ifs_pine.png
只是为了好玩。不是一个真正的答案:
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]