Search   Memberlist   Usergroups
 Page 1 of 1 [1 Post]
Author Message
DJ Wiza
science forum beginner

Joined: 22 Jun 2006
Posts: 1

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

(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

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 Page 1 of 1 [1 Post]
 The time now is Mon Nov 20, 2017 11:21 am | All times are GMT
 Jump to: Select a forum-------------------Forum index|___Science and Technology    |___Math    |   |___Research    |   |___num-analysis    |   |___Symbolic    |   |___Combinatorics    |   |___Probability    |   |   |___Prediction    |   |       |   |___Undergraduate    |   |___Recreational    |       |___Physics    |   |___Research    |   |___New Theories    |   |___Acoustics    |   |___Electromagnetics    |   |___Strings    |   |___Particle    |   |___Fusion    |   |___Relativity    |       |___Chem    |   |___Analytical    |   |___Electrochem    |   |   |___Battery    |   |       |   |___Coatings    |       |___Engineering        |___Control        |___Mechanics        |___Chemical

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