r/creativecoding • • 3d ago

Traffic Jam simulation

This is a simple model of traffic called the Nagel-Schreckenberg model. Each square represents a car. Red means it is at a full stop (stuck in a jam), and yellow means braking, and green means it is driving at vmax. At each tick, a car increases its speed by 1 or adjusts its speed so it doesn't crash, and with probability p(dawdle) it randomly brakes and decreases speed by 1. Through these very simple rules traffic jams can emerge due to just one person randomly changing speed. If you set vmax to 1 and p(dawdle) to 0, you get Wolfram's rule 184

This is a little TouchDesigner simulation I used to research my video about phantom traffic and its solutions

21 Upvotes

5 comments sorted by

4

u/da_Aresinger 2d ago

This visualisation is completely unparseable even with the explanation.

Or maybe I'm just stupid.

-1

u/matigekunst 1d ago

Can you tell me what is unclear? To me it's completely obvious, but more people have trouble reading the graph. Cars go from right to left. Each row is a moment in time. Each tick a new row appears at the bottom. 

5

u/da_Aresinger 1d ago

There is no indication that each row is a moment in time and the scroll is too smooth to intuit the intention.

Visually it just looks like dots scrolling from the bottom to the top.

I did eventually guess that that was your intention, but it didn't make the visualisation any more readable.

Visually the entire graph(?) is still perceived as a single object.

1

u/rbrtl 1d ago edited 1d ago

is vmax 5 car lengths per tick?

I feel that it makes more sense if you stare at the top row as it disappears. The green dots look like they're flashing right to left (which btw, OP, wtf??) and the red patches pause because the dots bunch up. But it's still a totally whack visualisation, sorry 

-1

u/PhotojournalistKey34 1d ago

I think I still have this NFT somewhere.