|
|
Wasn't it Marc Roth who wrote:
>Hi everybody!
>i'm currently working on a scene with a car driving along a street, changing
>the lane and then turning left at a intersection. i tried using a
>quadratic_spline, cubic_spline and a natural_spline for the cam-movement but
>the problem is that all three of them don't produce an accpetable path
>across the intersection. it's not like a part of a circle but has some
>unneccessary movements to the left and the right in it (am i confusing you?
>sorry...). so basically i need to know how to create a spline that produces
>a path similar to a quarter of a circle.
Here's a spline that does a quarter circle turn
#declare MySpline = spline {
natural_spline
0, <-1, 0, 0>,
0.001, <-0.999, 0, 0>,
0.5, <-1+sin(pi/4),0,1-sin(pi/4)>,
0.999, <0,0,0.999>,
1, < 0, 0, 1>
}
The second and fourth control point force the direction of the tangent
at the endpoint. The third control point stops it taking a shortcut.
Unfortunately, this may lose you some of the advantages of using a
spline, and you might as well drive along an actual circle.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|