A Sub-Optimal State of Affairs

aThe idea of the racing line, or “groove,” as it’s sometimes called in the oval track community, can be evasive. It’s completely theoretical – an imaginary path around the track that supposedly lets us turn quicker laps. It’s more than a ghost, however. You can see evidence of it’s existence on the track – dark streaks of rubber that run from turn-in, to apex, to exit. Yes, you know there has to be a route that truly is the fastest – the perfect line – the racing line.

This concept, however, has an importance much deeper than quicker laps. After all, many of us are part of the vibrant and global community of track day junkies who hit the tarmac without transponders or stopwatches, looking for the thrill and the adrenaline rush. We like going fast, hearing the tires squeal, and not worrying about the cops. What can we gain from studying the racing line? Well, what we gain is the difference between aggravation and reward; frustration and mastery. It’s the feeling we sometimes capture, when we’re no longer struggling to guide our vehicle along the desired route. Instead, it’s as though no other path is possible. We follow the line because it’s the only place we can go. The rules of physics are working for us instead of against us. Momentum, friction, acceleration, centripetal force – all the complexity and nuance collapses into a single one-dimensional construct: the racing line, and you’re on it. If you’ve never felt this way, you’re missing out. The good news is, we’re here to help.

Once you embark on the quest to understand the racing line, you’ll quickly learn two things: 1) there are lots of people who will authoritatively discuss the racing line, and 2) it can be damn difficult to understand. You can learn about the theory, but when staring at a sequence of varying radius S-curves on a blank track map the number of potential approaches seems overwhelming, with little way of distinguishing between them. Perhaps some veteran will be kind enough to draw up a diagram, but it’s hard not to feel some doubt when studying the meandering, squiggly line they marked down for your benefit.

If you start poking around on the internet, you’ll find a lot more material regarding the racing line. Some of it is professionally produced, and much of it is not. You start to understand the title of this blog post. There are a lot of pictures, like the one below. It’s the top result on Google Images, from the Wikipedia article about the racing line.

A picture of different racing lines from Wikipedia

Three lines are presented. If you haven’t had much track experience, the dark blue and green lines might both look pretty good. The light blue line, oddly, seems to run straight off the course. According to the Wikipedia article, the green line is “ideal.” The dark blue and light blue lines represent early and late apexes, respectively. Shooting over the kerb and into the sand pit doesn’t seem to be what the artist was attempting to portray.

Ok, so that diagram may have been a bit odd, but maybe we can find another one to help clarify its meaning. The fourth Google Images result is a very similar diagram from Drifting Street:

A diagram of three possible racing lines

Again, we have an early apex, an ideal line, and a late apex. But wait! The line that looks like the late apex from before is labeled as the “fastest line.” I thought the middle line was ideal! Also, the fastest line barely goes out past the middle of the track on the exit. Aren’t you supposed to use the whole thing? If you’re getting confused, don’t worry, it’s not all in your head. The problem seems to be that the artists put so much focus on the apex position that they didn’t give enough attention to drawing the line accurately on corner exit. This doesn’t explain, however, the discrepancy between whether the central or the late-apex line is the correct one.

Let’s look at another picture, this time from MakoTrac:

A diagram of the racing line for a go-kart track

This diagram is pretty interesting. The track appears to run clockwise, and as you can see, the vehicle stays out very wide while entering the turns, and clips the apexes very late. This supports our the previous article about late apexes, but is it necessary to stay so wide on entry? Let’s keep looking.

My favorite drawing comes from Club 100:

A diagram of a racing line.

Ok, we can cut the artist some slack. This was clearly done freehand. But why is the line so curvy? Do you really swing out that far after the first right-hander?

Sadly, these diagrams are about as good as it gets when you try to find maps of the racing line. Diagrams of individual, generic corners are common, but of low quality. Coherent lines for an entire racecourse are incredibly hard to find. For example, these two drawings I found for the Big Willow circuit on the Pelican Parts forums (click to see full size) are good examples of about the best you can get:

A diagram of the racing line around Big Willow.

A diagram of the racing line around Big Willow.

Let’s focus on Turns 3-4-5. To the right is the Race Optimal map for Big Willow, which I recolored for clarity at this smaller scale (click on the image for full size).

Looking at the two hand drawn maps, we see that both take a super wide entry to Turn 3. In Turn 4, however, the yellow line swings all the way out to the track boundary, comes back in to clip the apex, then takes another very late apex at 5. The red line shows a variety of apexes at Turn 5, but only one line exiting the corner.

Now let’s look at the Race Optimal map. First of all, the track looks skinnier. That’s how it actually looks. The width is exaggerated in the other examples. Looking at the line, the most obvious disagreement is in entering Turn 3. Each vehicle hugs the inside. Watching onboard footage at Big Willow shows a lot of drivers taking this outrageously wide entry – it seems to be some of the conventional wisdom at this circuit. I did find one example that stays much closer to the inside: a very fast lap from Don Aspesi, shown below. Overall, his line is very close to Al’s.

On that note, it should be said that I’ve never seen Al take a super wide corner entry like the one above on any track. It simply doesn’t seem to provide an advantage. You’re adding distance and forcing yourself to take an unnecessarily sharp radius at turn-in, not to mention leaving the inside wide open for a pass.

That said, I in no way mean to disparage the efforts cited in this article. These people are doing something great: taking time to help others learn about and understand the racing line. That’s the very purpose of this web site, too. Unfortunately, there are inescapable shortcomings when you have maps drawn up by a human. First and foremost, they’re based on someone’s opinion. Second, they’re hand drawn, and therefore can’t be geometrically or physically accurate. You get sharp kinks, squiggles, and oddly straight sections instead of the smooth, flowing line we know it should be. At best they’re kind of a guide, suggesting apex locations and turn-in points. The bigger problem is, you’ll never really know if they represent the fastest line or not. Finally, and perhaps worst of all, you can’t find them anywhere!

That’s what I think makes this site amazing. It’s intended to be the one place you can go to see high quality racing line maps for any major circuit in the world. The optimization algorithm we employ is very powerful. F1 teams and video game companies may have similar capabilities, they don’t seem to be sharing, let alone mapping out your local circuit!

I can’t guarantee that Al produces the perfect line. In fact, I guarantee he doesn’t. Only God knows what that line looks like. What I can guarantee is that Al’s line is very close to the best possible, or one of the best possible, in cases where several approaches produce nearly identical results. You can have confidence that the paths are based on real physics, and refined over hundreds of thousands of lap simulations. They are geometrically and geographically accurate. You will now be able to study a map for 10 minutes and learn what might otherwise take hours of laps over the course of months or years to figure out. When all’s said and done it should make your time at the track more rewarding, whether it’s in the through improved understanding, quicker laps, or both. In any case, for me that’s mission accomplished.

Leave a Reply

Your email address will not be published.

10 comments on “A Sub-Optimal State of Affairs

  • Dale Oehlerking

    As a fan and user of engineering similations, I must say that I really dig what you are doing here. I’ve always been King of the Late Apexers, but I’m definitely going to try more “geometric” lines as Al suggests.

    Question: On long straights, like at Road America, Al always does a gentle swerve to the inside edge of the track before fading back to the outside for the turn-in. What aspect of the physics is motivating him to do this? It definately adds distance to the lap, so there must be some overriding benefit, right?

    Thanks for your time. Great work. I hope you profit from it.

    1. RickyV (post author)


      Thanks for your kind sentiments! There is no physical benefit to coming to the center of the track before moving back to the outside prior to turn-in, at least not as far as the 2D optimization is concerned. The primary reason this occurs is because the extra distance is virtually nil (I invite you to do a sample calculation), and so doesn’t incur enough of a time penalty for the algorithm to notice it. It looks ugly to the eyes, but to the software it’s mostly invisible. I have tried to eliminate these imperfections but to little avail.

  • Ben verwer

    Having used genetic algorithms myself (computers were much slower but genetic algorithms are amazinly effective!) and recently having picked up racing (merc c63), i’ve been thinking about this for a while until i ran across your site. Absolutly wonderful.

    Quick question: i saw the other question onracing surface, but weight transfer between the 4 wheels maybe easier to model and may be more important?

    Let me know if you like help at some point. Ben

    1. RickyV (post author)

      Thanks for the support Ben. I do have a rough (very rough) model that accounts for some weight transfer onto the rear wheels during acceleration, but other than that I don’t look at it. Calculating weight transfer necessitates knowledge of center-of-gravity location, which is a barrier. More importantly I’m not sure what impact it really has on the lap time performance. Excessive body lean reduces cornering performance somewhat, but other than that I’m not sure how I would incorporate such information into the lap time predictions. Maybe you have some ideas?

      I hope that you find the optimized racing lines helpful in your competition preparation!

  • toadyc

    hey Ricky,

    I’m a motorcycle racer / trackday junkie and I’m going to try your lines for Streets of Willow next weekend. There are some different lines compared to conventional wisdom so it will be interesting to see the results!

    This is a great site, and clearly takes alot of time and effort. I just hope there’s a revenue model that works for you, so you can continue to operate the site and keep it up to date.


    p.s. alot of riders are now going to the Chuckwalla Raceway in Desert Center, CA. Might be one to put in the queue for optimizing.

    1. Ricky Vesel (post author)

      Chuckwalla is added to the queue! Did you find the lines helpful at your trackday?

  • Mal Ross

    Google Images brought me here, in a search for a diagram that illustrates the beauty and elegance I see in racing lines. I wasn’t expecting to find it in the text too, but this has to be the most eloquent description of it I’ve ever read:

    “What can we gain from studying the racing line? Well, what we gain is the difference between aggravation and reward; frustration and mastery. It’s the feeling we sometimes capture, when we’re no longer struggling to guide our vehicle along the desired route. Instead, it’s as though no other path is possible. We follow the line because it’s the only place we can go. The rules of physics are working for us instead of against us. Momentum, friction, acceleration, centripetal force – all the complexity and nuance collapses into a single one-dimensional construct: the racing line, and you’re on it.”

    Bravo! 🙂

  • Jack Olsen

    I love this site, and I hope you keep it going! That was my Willow Springs graphic from the Pelican Forum. I actually have one with the correct track width. The trick with those kinds of maps, of course, is that you have to make a lot of compromises in order to make them as useful as possible. One of the biggest problems is the lack of correlation between what a specific location appears to be on a graphic map and where a typical user would believe that specific location would be when they’re in a car on the track. The two are usually not in sync, because of the way things look on the ground (as opposed to from above) and the difficulty of ‘fixing’ a location in your head when you’re actually moving pretty quickly. So track graphics (mine, at least) end up exaggerating the line in ways that reinforce the things you’d be saying to a typical student as you work on getting them to improve their line. I’m not saying this to change the way you draw your maps (and I might not even be saying it very clearly), but I will point out that I deliberately distorted some of the line in order to make it a more effective teaching tool.

    I’m also curious how accurate your models are in terms of track elevation, camber, and surface irregularities? It would make such a fantastic learning tool if the line you’re calculating could be used to generate a simulation of what things would look like from inside the car (like the games do). Are there any open-source games with decent track models?

    Here is an old graphic I did with the track width closer to the real thing. The problem with it is that it’s harder for someone learning to see the shape of the line.

    Willow Actual Width

    I’m also curious how you determine maximum corner speeds for the different cars. I’m delighted, for example, that the primitive trailing arm suspension on my 1972 Porsche is apparently better than a GT3 RS 4.0.

    Here’s a lap at Willow with data overlaid from my logger. Note that my start/finish reference is the turn 9 cone. Sorry about that.

    Quicker through corners than a GT3 RS 4.0?h

    1. Ricky Vesel (post author)

      Thanks for the comment! I see your point about exaggerating some features on track diagrams. I have found that, unfortunately, many drivers take those exaggerations too much to heart in their lines, and so I have gone for a realism approach. Being able to zoom in extensively helps make the line more clear, I think.

      Regarding elevation, camber, and surface, none of those considerations are taken into account at the moment. The track is modeled as a simple 2D surface. I am definitely interested in incorporating more detail into the track model, but that’s a bit down the road at the moment. In comparing the results (for road courses, at least) to in-car video of fast laps, I find that camber, elevation, etc., does not have a very noticeable effect on line selection, so the diagrams don’t change much. It moreso affects corner speed and acceleration, which become more noticeable in the videos.

      The vehicle simulation is explained to some extent on the physics page. The most influential parameter is tire grip coefficient, which I assume is 1.3 for the GT3 RS and Miata.

      Your comment about corner speed is interesting though – I have found that my peak corner speeds are often below what I find in videos, and yet the overall lap times are much quicker. So far I have been unable to account for this, but there may be an error in the simulation I haven’t noticed. It’s also possible that the tires you’re using have a higher grip level than what I assume.

      That said, when I model a “Porsche GT3 RS 4.0,” this vehicle, in the simulation, is nearly identical to a Miata except for the power level. It does have a bit of downforce, but other than size that’s the only difference as far as the computer is concerned. More detailed analysis of suspension and vehicle dynamics is more complicated than I care to get, and doesn’t seem to be too influential in terms of the racing line.

      You can look into TORCS for a free race car simulator. It seems very capable but I haven’t experimented with it myself.

      Hope that clears some things up! Thanks a lot for your interest.

      EDIT: And by the way, nice lap! You really seem to have it dialed in through the turns.