Coding Challenge #55: Mathematical Rose Patterns
In this coding challenge, I attempt to create rose (rhodonea) curves using trigonometry function and polar coordinates. Code: https://thecodingtrain.com/challenges/55-mathematical-rose-patterns
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/3kanFIcHd
π₯ Previous video: https://youtu.be/sJ6pMLp_IaI?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π Rose Mathematics on Wikipedia: https://en.wikipedia.org/wiki/Rose_(mathematics)
Live Stream Archives:
π΄ Live Stream #76: https://youtu.be/OkkjlHTdLGI
Related Coding Challenges:
π #116 Lissajous Curve Table: https://youtu.be/--6eyLO78CY
π #125 Fourier Series: https://youtu.be/Mm2eYfj0SgA
π #133 Times Tables Cardioid Visualization: https://youtu.be/bl3nc_a1nvs
π #134 Heart Curve: https://youtu.be/oUBAi9xQ2X4
π #C1 - Coding in the Cabana Maurer Rose: https://youtu.be/4uU9lZ-HSqA
Timestamps:
0:00 Introduction to the Mathematical Rose Patterns Coding Challenge
0:35 Whiteboard discussion of polar coordinates
3:15 Discussion about how to use the r=cos(kΞΈ) formula
3:45 Into the code...draw a circle with polar to cartesian transformation
5:30 Start to draw shapes using the formula
6:46 In a way, we're done! But wait, there's more...
7:35 Re-creating some patterns from the Wikipedia page; using the k=n/d form
8:50 Adding the p5.js DOM library to create some sliders
10:30 Re-factoring the code use the denominator of the k=n/d formula as the number of loops in the draw function
11:30 Done! What else can you do with it?!
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
#algorithmicroses #mathematicsroses #polarcoordinates #trigonometry #p5js #javascript