Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Pedestrians Walking - Crowd Simulation

Loading...

Sign in or sign up now!
16,369
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 14, 2007

A simulation of a walking crowd that I made. Each agent generates a decaying exponential potential function which other agents respond to, and try to avoid.

The code, (very roughly) is at
http://pastebin.com/meQcwfWw
I've worked on it since then a bit so it's slightly different but the ideas are there

Category:

Entertainment

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (badmephisto)

  • would it be too much to ask to give details of the mathematics behind this model? This is amazing i'm thinking about trying one of my own in matlab, but a starting point would be nice :)

  • @spectrex1 Sure: Define P1 to be center of agent. Define P2 to be slightly ahead of him. Danger(p)= e^(-a*(|P1-p|+|P2-p|)). Where p=(x,y) is a 2d position and a is some scalar constant. Take derivative w.r.t. to p to get the gradient of this field at every point. An agent acts to minimize the danger, so in addition to his regular velocity, add a term that points opposite to the gradient of the total field caused by all agents.

  • @spectrex1 You can find code at pastebin.com SLASH meQcwfWw

    The method of interest is gradDangerAt(x,y)

  • Very pretty, but in real life when two people are trying to pass one another, they very often jiggle from left to right to figure out which side to pass. I didn't see that happen at all.

  • no that definitely DOES happen sometimes in the simulation! It was one of the reasons I liked it so much! Indeed I don't see it happen exactly in this demo... But one significant disadvantage I think to this is that they can't side step. People side step ALL the time...i.e. change COM position without affecting the direction. These guys have to change the direction first and then travel along it :(

  • very nice what language is this written in?

  • Python, ftw.

Top Comments

  • this was great.i am a little sad that the more i look, the more ideas that i have in my head i find out are already done. :( i am not as original as i thought.

  • Watch this video, and in you mind, say, "Excuse me, pardon me, excuse me, pardon, pardon, coming through."

see all

All Comments (29)

Sign In or Sign Up now to post a comment!
  • @justinlovespastry Pedestrian crossings

    

  • @dumbzebra seems the advancing from the left had a yellow area as you describe but the others did not care

  • I guess it's something like:

    a)Pedestrians walk straight forward

    b)if they get into the red area, they change course slightly

    c)if they get into the yellow area, they change course drastically

  • Wall of death fail!

  • Why would two giant groups of people clash together at the same speed? XD

  • @josephohsnap tell ma about it man.. bloody tell me about it :)

  • @badmephisto thanks much appreciated, seems alright, i'll let you know how i get on and what marvellous things i create :)

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more