Advertisement

Any good ideas on how to get the "ideal line" of a track?

Started by April 10, 2016 08:39 PM
10 comments, last by l0calh05t 8 years, 10 months ago

I Did some GeoGebra magic today and found some usefull information, tho I'm not entirely sure on how to get the same information in Coding wise. ?As I thought I have to make use of DotProduct and CrossProduct. With DotProduct I can easly create scalar projections of Perpendicular points Using this formula:

ap = p - a
?ab = b - a

sp = dot(ap,ab.normalized)

where:
  • ap is the vector from a to p
  • ab is the vector from a to b
  • sp is the scalar projection of p on ab (float)
to get the actual normal point on ab we can write
normalPoint = a + (ab.normalized * sp)
Now the Cross product is the bit I dont quite get yet, it always seems to be zero or simmilar to the normalPoint, any tips?

?On the chart, my simple questions are, how to find A1, B1 and T. (Basically they would be mapped on the waypoint node as "RacingLinePoint" but first the magic...

?Edit:
The radius of the racing line comes from this formula:
ArcR_radius =? (C1T / 2) + ((A1B1 * A1B1) / 8 * C1T)

The variables are on the graph..

You could have a look at this PhD thesis https://stacks.stanford.edu/file/druid:zn992vv3694/Theodosis_thesis-augmented.pdf

This topic is closed to new replies.

Advertisement