Coding Challenge #55: Mathematical Rose Patterns

Subscribers:
1,750,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