0

我的任务是将运动从直线路径转换为弯曲路径。给出了起点和终点以及起点时间和速度。

$ns_ at 2.000000000000 "$node_(0) setdest 90.441179033457 44.896095544010 1.373556960010"

上面这一行定义了 node_(0) 在 2.0s 开始以 1.37m/s 的速度向目的地 (90.44, 44.89) 移动。

在此处输入图像描述

我必须将运动更改为沿着弯曲的路径,这将是 4 个运动而不是 1 个。

在此处输入图像描述

我需要调整速度以便在直线路径的同时获得分形路径的目的地。

我不确定如何在直线路径的同时到达分形路径中的 B?

我正在考虑通过公式时间=距离/速度来计算直线路径的时间。然后将时间除以 4(cz 将是 4 个动作而不是一个)但是我不知道如何调整速度。

任何可以帮助我的想法将不胜感激!

4

1 回答 1

0

You need to compute the total length of the second curve, which should be (if this is the von Koch snowflake construction) 4/3 of the original curve (hence, assuming AP=PQ=QR=RB).

So your first speed should be three quarters of the speed in the second curve so that both arrive in the same time (or conversely, four third if the reference curve is the first curve).

However, since you are mentioning fractals, you should be aware that repeating the subdivision process will result in a line of infinite length : your straight path speed should be infinitely slow because it will take an infinite amount of time to follow the second path. That's when you have an infinite number of subdivisions... it will not happen in practice though :)

于 2013-04-28T04:10:17.497 回答