Coding Challenge #55: Mathematical Rose Patterns

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



Duration: 12:44
87,149 views
2,410


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







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
coding train
the coding train
coding beginners
nature of code
algorithmic roses
mathematics roses
polar coordinates
trigonometry
trigonometry creative coding
trigonometry art
algorithm flower
algorithm rose
rose trigonometry
trigonometry flower