<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Formula Neon</title>
    <description>The latest articles on DEV Community by Formula Neon (@formulaneon).</description>
    <link>https://dev.to/formulaneon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4055321%2F450d38a3-5054-43a8-98b0-0372b1efe7cf.png</url>
      <title>DEV Community: Formula Neon</title>
      <link>https://dev.to/formulaneon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/formulaneon"/>
    <language>en</language>
    <item>
      <title>Who owned each corner? Mapping F1 lap dominance in minisectors</title>
      <dc:creator>Formula Neon</dc:creator>
      <pubDate>Sun, 02 Aug 2026 12:52:22 +0000</pubDate>
      <link>https://dev.to/formulaneon/who-owned-each-corner-mapping-f1-lap-dominance-in-minisectors-pl6</link>
      <guid>https://dev.to/formulaneon/who-owned-each-corner-mapping-f1-lap-dominance-in-minisectors-pl6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffvkun9qqlk3a8dtmox79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffvkun9qqlk3a8dtmox79.png" alt=" " width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A qualifying laptime is a single number, and a single number hides almost everything interesting about the lap.&lt;/p&gt;

&lt;p&gt;Two drivers can set nearly identical times in completely different ways: one is quickest through the fast corners, another claws it back under braking, a third is untouchable on the run to the line. The final gap is just the sum of all of that. So the question we wanted to answer was not who was fastest, it was &lt;em&gt;where&lt;/em&gt; each driver was fastest.&lt;/p&gt;

&lt;p&gt;This is a short write-up of how we turn a set of laps into a track coloured by who owned each part of it, where the model is honest, and where you have to be careful.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea: split the lap, compare segment by segment
&lt;/h2&gt;

&lt;p&gt;A lap is a sequence of samples, each with a position on the track and a timestamp. On its own that is just a squiggle. The move that makes it readable is chopping the lap into &lt;strong&gt;minisectors&lt;/strong&gt;: short segments, a few hundred metres each, defined by distance along the track rather than by time.&lt;/p&gt;

&lt;p&gt;Distance matters here. If you split by time, every driver's segments land in different places and you cannot compare them. Split by distance and segment &lt;code&gt;n&lt;/code&gt; is the same piece of tarmac for everyone, so "who was fastest through segment &lt;code&gt;n&lt;/code&gt;" is a fair question.&lt;/p&gt;

&lt;p&gt;For each segment you compute the time each driver spent crossing it, then colour the racing line by the winner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for each driver:
  resample their lap to a common distance axis (0..trackLength)
  for each minisector [d0, d1]:
    t_in  = interpolate time at distance d0
    t_out = interpolate time at distance d1
    segmentTime[driver][sector] = t_out - t_in

for each minisector:
  winner = argmin over drivers of segmentTime[driver][sector]
  colour that stretch of the racing line with winner's team colour
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resample-to-a-common-distance-axis step is the whole trick. Raw telemetry is sampled in time, not distance, so before you can compare "the same corner" across drivers you interpolate every lap onto a shared distance grid. After that, the comparison is just an &lt;code&gt;argmin&lt;/code&gt; per segment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lap nobody drove
&lt;/h2&gt;

&lt;p&gt;Once you have per-driver segment times, one more line gives you something people love: the &lt;strong&gt;theoretical best lap&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;theoreticalBest = sum over sectors of ( min over drivers of segmentTime[sector] )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take the fastest time anyone set through each minisector and stitch them together. It is always quicker than the actual pole, sometimes by more than a second, because no single driver strings every segment's best together on one lap. It is a clean measure of how much time was left on the track.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you have to be careful
&lt;/h2&gt;

&lt;p&gt;This is the part worth being upfront about, because a naive version quietly lies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Segment boundaries are a choice.&lt;/strong&gt; Make them too long and you blur two corners into one verdict; too short and telemetry noise starts flipping the winner back and forth. There is no single correct length, only one that is honest for the track. We tune it so each segment is roughly one feature, a corner or a straight, not half of two.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alignment is by distance, not lap distance travelled.&lt;/strong&gt; Drivers take slightly different lines, so their raw distance-travelled differs over a lap. You align to track position (progress along the circuit), otherwise a wider line reads as "slower" purely from geometry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is per segment, not per driver.&lt;/strong&gt; A colour means "fastest through this stretch," full stop. It does not mean that driver was faster overall, and the map is deliberately honest about that: a lap can be a patchwork of colours and still belong, on total time, to the driver who barely shows up on it.&lt;/p&gt;

&lt;p&gt;Being explicit about those keeps it a useful visualisation instead of a confident-looking wrong one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it reads so well
&lt;/h2&gt;

&lt;p&gt;The arithmetic is almost nothing, an interpolation and an &lt;code&gt;argmin&lt;/code&gt;. The value is entirely in the swap of representation: from a laptime, which is one opaque number, to a map, which your eye reads instantly.&lt;/p&gt;

&lt;p&gt;Where one colour dominates, that driver was building the lap. Where it flickers between colours, the field was trading tenths corner by corner. You stop reading a time and start reading a story, and you did not have to understand a single millisecond to get it.&lt;/p&gt;

&lt;h2&gt;
  
  
  See it running
&lt;/h2&gt;

&lt;p&gt;We built this into a live tool that colours any 2026 qualifying session on the real track shape, so you can pick a race and drivers and watch the domination map redraw:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.formuladream.app/f1-interactive/tools/track-domination" rel="noopener noreferrer"&gt;https://www.formuladream.app/f1-interactive/tools/track-domination&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is part of Formula Dream, a free F1 companion app. But the pattern travels: any time you have parallel runs over the same course, a race, a build pipeline, an A/B rollout, splitting by position and colouring by the local winner turns "who was fastest overall" into the far more useful "who was fastest where."&lt;/p&gt;

</description>
      <category>f1</category>
      <category>dataviz</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How we turned F1 time gaps into metres of racetrack</title>
      <dc:creator>Formula Neon</dc:creator>
      <pubDate>Thu, 30 Jul 2026 16:47:29 +0000</pubDate>
      <link>https://dev.to/formulaneon/how-we-turned-f1-time-gaps-into-metres-of-racetrack-jl4</link>
      <guid>https://dev.to/formulaneon/how-we-turned-f1-time-gaps-into-metres-of-racetrack-jl4</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fncd1w07wglqr44dntpvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fncd1w07wglqr44dntpvi.png" alt=" " width="799" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Time deltas are one of the least intuitive things you can put in front of a person.&lt;/p&gt;

&lt;p&gt;If I tell you a driver qualified 0.175 seconds ahead, that is precise and completely unfeelable. Nobody has an internal sense of a tenth of a second. It is a number, and it stays a number.&lt;/p&gt;

&lt;p&gt;So we tried a different way to show it: convert the time gap into physical distance on the track, and draw it to scale. This is a short write-up of how that works, where the model is honest and where it cheats, and why the result makes the data click.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea
&lt;/h2&gt;

&lt;p&gt;A gap in time becomes a gap in space if you know the speed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;distance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gap_seconds&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;speed_metres_per_second&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the sort of speed a Formula 1 car carries across the line, roughly 300 km/h, that is about 83 metres per second. So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.1 s  -&amp;gt;  ~8.3 metres
0.175 s -&amp;gt; ~14.5 metres, about three car lengths
1.940 s -&amp;gt; ~161 metres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suddenly it is not an abstract tenth. It is a chunk of tarmac you can picture. A gap you could not feel becomes a distance you can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drawing it to scale
&lt;/h2&gt;

&lt;p&gt;The number on its own is already better, but the thing that makes people stop is drawing it.&lt;/p&gt;

&lt;p&gt;We draw it on a straight, treated as a ruler: a finish line, with a distance marker every few metres behind it. The reference car's nose sits on the line, and every other car is&lt;br&gt;
  placed straight back by its gap turned into metres, sorted by gap. A qualifying spread from pole to the back of the grid becomes a visible stretch of tarmac you can pace out.&lt;/p&gt;

&lt;p&gt;Roughly:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const SPEED = 83.3; // m/s, the reference car's line speed
  const gapMetres = gapSeconds * SPEED;
  const setbackFromLine = gapMetres; // straight back along the ruler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;One honest wrinkle: the cars are also nudged slightly sideways so none hides directly behind the one ahead. That sideways position carries no data at all, it exists purely so you&lt;br&gt;
  can see every car. Only the distance along the straight means anything.&lt;/p&gt;

&lt;p&gt;Roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SPEED&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;83.3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// m/s, representative speed near the line&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gapMetres&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gapSeconds&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;SPEED&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chaseDistance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leaderDistanceAlongPath&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;gapMetres&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// then sample the circuit path at chaseDistance to get x, y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rendering is the easy part once you think of the track as a single parametric path and just walk backwards along it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the model is honest, and where it cheats
&lt;/h2&gt;

&lt;p&gt;This is the part worth being upfront about, because a naive version is misleading.&lt;/p&gt;

&lt;p&gt;Speed is not constant. A car is doing maybe 320 km/h on a straight and 90 km/h in a slow corner. The same 0.2 second gap is a very different distance depending on where on the lap it opens up. Using a single representative speed is a simplification, and it is most accurate near the line and least accurate through the slow stuff.&lt;/p&gt;

&lt;p&gt;So the honest framing is "gap expressed as distance at racing speed," not "the exact spot the second car physically was." For qualifying, where the interesting gaps are set on flying laps at high speed, that assumption holds up well. For race pace behind a safety car it would be nonsense, so we do not apply it there.&lt;/p&gt;

&lt;p&gt;Being clear about the assumption is what keeps it a useful visualisation rather than a fake-precise one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it works
&lt;/h2&gt;

&lt;p&gt;The trick is not the arithmetic, it is the swap of unit.&lt;/p&gt;

&lt;p&gt;People are bad at abstract quantities and good at physical ones: distance, size, the time it takes to walk somewhere. Translate an abstract unit into a physical one and the reader's body does the understanding for you. It is the same reason "an area the size of Wales" beats a number in square kilometres.&lt;/p&gt;

&lt;p&gt;Time-to-distance is just one instance of that. You can do the same move with a currency figure, a data-transfer rate, a page-load time. Find the physical analogue and the number stops being a number.&lt;/p&gt;

&lt;h2&gt;
  
  
  See it running
&lt;/h2&gt;

&lt;p&gt;We built this into a live tool that runs it for every qualifying session on the real circuit shape, so you can pick a race and watch the gaps redraw as distance:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.formuladream.app/f1-interactive/tools/f1-gap-visualizer" rel="noopener noreferrer"&gt;https://www.formuladream.app/f1-interactive/tools/f1-gap-visualizer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is part of Formula Dream, a free F1 companion app. But the idea travels well beyond racing, and that is really the point: if you are visualising something abstract, try turning it into a distance and see if it suddenly makes sense.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
