
2.4: random() Function - p5.js Tutorial
In this video, I explore the random() function in p5.js and discuss the concept of 'parametric design.' Code: https://thecodingtrain.com/tracks/code-programming-with-p5-js/code/2-variables/4-random
p5.js Web Editor Sketches:
πΉοΈ Random Square Design: https://editor.p5js.org/codingtrain/sketches/Sl8ml_Lz8
πΉοΈ Random House Exercise: https://editor.p5js.org/codingtrain/sketches/HGq_S0Z5H
πΉοΈ Random Points: https://editor.p5js.org/codingtrain/sketches/h7hFqoV6H
πΉοΈ Painting Exercise 1: https://editor.p5js.org/codingtrain/sketches/stERy5a1D
πΉοΈ Painting Exercise 2: https://editor.p5js.org/codingtrain/sketches/IyyJ1QYKh
π₯ Previous video: https://youtu.be/T26OJGjI8qI?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π₯ Next video: https://youtu.be/nicMAoW6u1g?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
References:
πΎ random(): https://p5js.org/reference/#/p5/random
Timestamps:
0:00 Welcome back!
0:47 What is the random function?
2:10 Let's try it out!
4:58 What if we use random() in draw?
6:16 Let's try making something else.
7:10 How about using only 1 argument?
7:42 Built in width and height variables.
8:51 Ideas! What could you make?
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
#basics #random #variables #p5js #javascript