View Full Version : NASCAR track formula
Just wondering if anyone knows a mathematical formula that follows a NASCAR type track or thunderdome?
Even an approximation would be handy.
Thanks in advance.
04-22-2004, 02:45 AM
I'm not really sure what you're asking for here, but if you mean "how can i get a car to follow a track", then you can do it this way. Most road software uses curves to define the roadways. AI drivers can be programmed to follow the centerlline curves and so forth. One trick with curves is maintaining tangency, as AI drivers look funny if the centerline curves are not tangential as the car switches from one curve to another (it causes funky orientation changes.) If this isn't the answer you're looking for, please clarify.
Operativem.... thanks for the reply.
Sorry for not clarifying, but I am after a mathematical formula which I can draw with polys, either in 3DMax or C code that mimicks a Nascar *banked* track.
I want to be able to simulate a Nascar type game that I can change parameters and create variations of track geometry from the formula. To keep it simple, I want to stick with an elliptical shape for the time being. Hope that helps.
I have been looking at parametric functions - helix etc, but they aren't quite working.
I have looked on the internet for mathematical formulas on how velodromes and the like are designed/created, but its been futile.
04-22-2004, 04:43 AM
Thanks for the clarification. I'll try to give you more information here. I'm not sure there is a specific type of primitive for this, but you might want to try producing geometry by sweeping a linear cross section of some type along an ellipse of some type. Using multiple cross-sections of different orientations and interpolating between them would allow you to properly bank the track.
Then, you can make changes to the ellipse and cross-sections and reproduce the geometry to see the changes. (For reference, sweeping like this is sometimes called extruding or extruding along a curve.) The code for this is pretty reasonable, however, if I'm not mistaken, sweeping a line along a curve requires a base normalization, and that might add some complexity.
I've designed systems that do exactly what you describe, but it was for a 3d modeling application, and it was parameterized by using a "sweep" primitive that took inputs from a collection of curves.
I can describe this in more detail if it seems to be along the right track. If I had time to do some diagrams, it might be a lot easier to visualize the results.
(email@example.com) email me if you'd like me to send some pics.
04-22-2004, 04:49 AM
Just wanted to add a few things. Velodromes, racetracks, and roads, tend to be constructed using arc-curves to produce smooth steering, safe roads. Arc curves do not have any mathematical acceleration (unlike Beziers), thusly they don't require continuous changes to steering. The general idea behind curves for vehicles is that once the driver steers into a turn, they should not have to move the wheel very much. (There are lots of other rules, but we'll ignore those for the moment.) So, try look for the Caltrans Manual on Road Design. It's available as PDF files here/there. (For free.) It'll give you pointers on how roadways are designed. I also did a project for road design software, and I learned a lot from those books. I think they'll provide you with more information on design.
Wow. Operativem, thanks for your info.
You obviously are in the know when it comes to road design. The reference should help.
I was hoping a magic formula existed, but doesnt look like it.
How are arc-curves created? Are these done mathematically?
Thanks again for your great help.
04-22-2004, 07:43 PM
Am I missing something? What is this "reference" you speak of?
Halma, I am referring to the Caltrans Manual.
04-23-2004, 04:12 AM
Arcs are curves that represent sections of circles. You should be able to find information online or in graphics/geometry books. BTW, here are some search terms for roads:
Let me know if you have more questions.
04-23-2004, 04:15 AM
Check out AASHTO --- these guys design roads and are the premier authority on this type of thing.
01-18-2006, 03:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.