看到一个很有一个的代码,使用Mathematica绘制冰激凌和蜡烛,把他收集在这里。
文章目录(Table of Contents)
绘制冰激凌
Graphics3D[{
{Lighter[Brown], Cone[{{0, 0, 0}, {0, 0, -1}}, .25]},
{Yellow, Sphere[{0, 0, .1}, .25]},
{Pink, Sphere[{.15, 0, .2}, .26]},
{Orange, Sphere[{-.1, 0, .25}, .25]}
}, Boxed -> False]

绘制蜡烛
Candle[color_, Pos_] := {color,
Cylinder[{Pos, Pos + {0, 0, 0.1}}, 0.013], Black, Thick,
Line[{Pos + {0, 0, 0.1}, Pos + {0, 0, 0.12}}], Yellow,
EdgeForm[None], Sphere[Pos + {0, 0, 0.12}, 0.013],
Cone[{Pos + {0, 0, 0.121}, Pos + {0, 0, 0.16}}, 0.0127]}
Graphics3D[Candle[Red, {0, 0, 0}], Boxed -> False]

参考地址
- 微信公众号
- 关注微信公众号
-
- QQ群
- 我们的QQ群号
-
评论