POV-Ray : Newsgroups : povray.general : Need help figuring something out : Re: Need help figuring something out Server Time
1 Aug 2024 02:22:51 EDT (-0400)
  Re: Need help figuring something out  
From: Roman Reiner
Date: 1 May 2006 11:35:00
Message: <web.4456283afd5b7a09c80c0aa10@news.povray.org>
DJ Wiza <Kil### [at] sohcahtoanet> wrote:
> The problem with that is that it still doesn't solve the vertical loop
> problem, where there is no banking.

There's no perfect vertical loop with the characteristics you described
because with a perfect loop the entrance end exit point would be at the
same location. in the case of a "normal" loop the problems gets similar to
the corkscrew problem (the banking angles may be very close to 0/180
degrees but are not equal 0/180.

> My current method of interpolation between banking values is simple
> linear interpolation.  If one control point has 0 banking, and the next
> has 90, then at t=0.5 on the bezier curve there will be 45 degrees of
> banking.  Of course, this creates the nasty side effect of the corkscrew
> problem, where one control point has 270 banking, the next has 0, so at
> t=0.5 it has 135 degrees.  Your solution would certainly fix that, but
> it doesn't solve the vertical loop problem.

Apart from my suggestion (>180 degrees check) i think the problem could be
solved by simply changing the interpolation method.
imagine the perfect loop. in the first and the last quarter the banking is
zero and at the point where the car points straight up/down the banking
"jumpes" to 180 degree and back to zero respectivaly without any
interpolation. the more the entrance and exit point move away of each other
(the loop becomes a corkscew) the transition gets smoother and smoother
until it gets linear in the other extrem case namely a straight line with a
360 degrees drill. maybe the amount of interpolation can be extracted by
checking the distance of the entrace and exit point. this could require some
math though ;)

> Though I THINK I've found a way to fix that.  Interpolate between the up
> vectors!
>
> At the beginning, I'll pre-calculate the orientation of the up vectors
> (Its more then just <cos(theta), sin (theta), 0> because the track could
> be heading north/south/east/west/everything in between) of the track at
> every control point, then when moving the camera, placing track ties,
> and spheres/cylinders (Faster than sphere_sweeps!) for the track, I'll
> use some method of interpolation between those up vectors.
>
> -DJ

Could surely work that way as well but it sounds more difficult than my
suggestion IMHO. My version has the advantage that the interpolation needs
work anyways. You could give both approachs a try though.

Regards Roman


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.