Coding Challenge #52: Random Walker

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=l__fEY1xanY



Duration: 15:53
123,248 views
2,337


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







Tags:
JavaScript (Programming Language)
live
programming
daniel shiffman
creative coding
p5.js
coding challenge
p5.js tutorial
p5js
javascript (programming language)
tutorial
javascript
coding
challenges
nature of code
nature of code p5js
nature of code p5.js
random walk
random walker
random walk p5.js
random walk p5js
random walker p5js
random walker nature of code
random walk nature of code
random walk javascript
random walker js
random walker javascript