在 Mathematica 中沿 3D 路径移动 AutoCad DXF 实体 [英] Moving an AutoCad DXF solid along a 3D path in Mathematica

查看:26
本文介绍了在 Mathematica 中沿 3D 路径移动 AutoCad DXF 实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我偶然发现了这篇文章并发现了 belisarius'回答有趣.想知道是否有人可以发布他的完整的mma代码并给出一些解释.一般来说,我的问题是关于如何在 mma 中实现这种动画/绘图行为.对我来说看起来很棒!

I came across this post and found belisarius' answer interesting. Wondering whether he someone can post his complete mma code and give some explanation. In general, my question is about how to achieve this kind of annimation/plotting behavior in mma. It looks amazing to me!

非常感谢.

推荐答案

如果需要进一步解释,请告诉我.

Please tell me if further explanation is needed.

x[t_] := {Cos@t, Sin@t, .1  t} /; t <= 3 Pi;
x[t_] := {Cos@t, Sin@t, .3 Pi  (4 - t/Pi)} /; t > 3 Pi;
plotRange = {{-110, 110}, {-110, 110}, {-10, 110}};
z1 = ParametricPlot3D[100 x[t], {t, 0, 4 Pi}, PlotRange -> plotRange];
hel = Import["ExampleData/helicopter.dxf.gz", 
   ViewPoint -> {10, 10, 10}, AlignmentPoint -> {80, 80, 80}];

zz = Table[
   Show[z1, 
    Graphics3D[
     Translate[Rotate[First[hel], t + Pi/2, {0, 0, 1}], 100 x[t]]], 
    PlotRange -> plotRange], {t, 0, 4 Pi, 4 Pi/15}];
Export["c:\test.gif", zz, "DisplayDurations" -> .5]

(* Or
 Animate[Show[z1, 
   Graphics3D[
    Translate[Rotate[First[hel], t + Pi/2, {0, 0, 1}], 100 x[t]]], 
   PlotRange -> plotRange], {t, 0, 4 Pi}]

可以使用曲线导数计算直升机旋转.现在懒得做.

One could calculate the heli rotation using the curve derivatives. Too lazy to do it right now.

编辑

遵守Sjoerd的家装规则:

To comply with Sjoerd's home decoration rules:

这篇关于在 Mathematica 中沿 3D 路径移动 AutoCad DXF 实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆