Coding Challenge #52: Random Walker
In this coding challenge, I simulate a "random walk" with the p5.js library. This video is part of the course Nature of Code at ITP, Tisch, NYU. Code: https://thecodingtrain.com/challenges/52-random-walker
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/N-qqe1ExZ
π₯ Previous video: https://youtu.be/aKYlikFAV4k?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/bqF9w9TTfeo?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
πΆπ½ββοΈ Random walk Wikipedia article: https://en.wikipedia.org/wiki/Random_walk
5οΈβ£ random Function Reference Page: https://p5js.org/reference/#/p5/random
5οΈβ£ floor Function Reference Page: https://p5js.org/reference/#/p5/floor
π The Nature of Code GitHub (Spring 2017): https://github.com/nature-of-code/NOC-S17-1-Physics-Animation
Live Stream Archive:
π΄ Live Stream #73: https://youtu.be/RDULjRLn3pk
Related Coding Challenges:
π #53 Random Walker with Vectors and LΓ©vy Flight: https://youtu.be/bqF9w9TTfeo
π #162 Self Avoiding Walk: https://youtu.be/m6-cm6GZ1iw
Timestamps:
0:00 Introduction to the Random Walker Coding Challenge
1:56 Whiteboard explanation of a random walk
6:48 Into the code...drawing a point!
7:30 Picking a random number between 0 and 4 using p5.js's 'random' and 'floor' functions
9:58 Setting up the code to use the random number
12:26 First run! The point...it wibbles...it wobbles
12:48 Stop clearing the background every frame so that we can see the point's path
13:10 Discussion of the possibilities of the random walker
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: http://thecodingtrain.com/
πΎ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
π‘ GitHub: https://github.com/CodingTrain
π¬ Discord: https://discord.gg/hPuGy2g
π Membership: http://youtube.com/thecodingtrain/join
π Store: https://standard.tv/codingtrain
ποΈ Twitter: https://twitter.com/thecodingtrain
πΈ Instagram: https://www.instagram.com/the.coding.train/
π₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: https://p5js.org
π p5.js Web Editor: https://editor.p5js.org/
π Processing: https://processing.org
π Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#random #floor #randomwalker #p5js #javascript #processing #java