FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math
Bezier track path with inversions
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
DJ Wiza
science forum beginner


Joined: 22 Jun 2006
Posts: 1

PostPosted: Thu Jun 22, 2006 8:58 am    Post subject: Bezier track path with inversions Reply with quote

(Note: This was also posted to comp.graphics.algorithms, but I felt I
should go ahead and try posting this here as well)

There's a roller coaster simulator out for Windows/Mac called No Limits
(http://www.nolimitscoaster.de/ (The site is in English and German)
that uses bezier curves to define the track. For banking, you set the
angle of banking in degrees for each control point.

I'm writing a program to convert tracks made with this program into
POV-Ray (http://www.povray.org) scenes. But I'm running into a huge
problem with inversions.

The problem stems from how banking is calculated in No Limits. You can
create a vertical loop with only two control points - one pointing up,
the other pointing down. Of course, at both of those points, the track
is right-side up, so the banking is 0. Of course, a smooth track will
typically have more control points than that. Anything before the
vertical will have very little banking, but once you go past the
vertical, banking has to be around 180 to get the track to be upside
down.

So now it comes down to how to implement this.

The simplest implementation would just take the cross product of the
vector <0,1,0> and the current direction of travel to find an up
vector, and then rotate that around the current direction of travel. I
then interpolate between the resulting up vectors on each control point
to find intermediate up vectors. This works in the second method of
constructing a loop as described above, but runs into the problem of
vertical track not working.

To accomodate for vertical track, No Limits allows you to specify that
a given banking angle is "relative" to the previous. Using that
information (Plus a hint from someone on the POV-Ray newsgroups) I
tried another method. First, I convert all banking angles into
relative banking, then I start with an initial up vector, and I step
along the bezier. At each step, I cross the current up vector with
the current direction of travel to get the "right" vector, then cross
that again with the current direction of travel. This finds a new up
vector
that compensates for a change in vertical slope, which I then rotate
around the current direction of travel to find the appropriate banking.
I then use that up vector during my next step.

This SORT of works for the first method of making a loop described
above. The problem is, if the track is changing heading while on a
vertical slope or banked, the resulting up vector ends up being a bit
banked. Eventually, all track ends up being banked when it shouldn't
be.

Does anyone have any idea how I could do this? The No Limits website
has a demo version that lets you use the editor so you can see exactly
how tracks are designed.

If anyone can help at all, it would be greatly appreciated, and I may
even put your name (if you'd like) in the program credits when I am
finished.

-DJ

(Remove the TRIMBRAKES to reply)
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Mon Nov 20, 2017 11:21 am | All times are GMT
Forum index » Science and Technology » Math
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Advanced analytical methods for path integral calculation jaykov1 Particle 0 Tue Jul 11, 2006 2:36 am
No new posts Question about the path of a particle in Schwarzschild re... Oh No Research 5 Mon Jul 10, 2006 3:55 am
No new posts Advanced analytical methods for path integral calculation. jaykov1 num-analysis 0 Sat Jul 08, 2006 11:36 pm
No new posts The Loop & Path Representation of Gauge & String Theories... markwh04@yahoo.com Research 0 Sat May 06, 2006 5:25 pm
No new posts The Twins' "path integral" dilation: ROFFLMFAO! eleaticus1 Relativity 0 Tue May 02, 2006 7:47 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0154s ][ Queries: 16 (0.0029s) ][ GZIP on - Debug on ]