In this coding challenge, I attempt to create rose (rhodonea) curves using trigonometry function and polar coordinates. Code: thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge #54.1...
🎥 All videos: • Coding Challenges
References:
🏛 Rose Mathematics on Wikipedia: en.wikipedia.org/wiki/Rose_(m...)
Live Stream Archives:
🔴 Live Stream #76: • Live Stream #76: Attra...
Related Coding Challenges:
🚂 #116 Lissajous Curve Table: • Coding Challenge #116:...
🚂 #125 Fourier Series: • Coding Challenge 125: ...
🚂 #133 Times Tables Cardioid Visualization: • Coding Challenge #133:...
🚂 #134 Heart Curve: • Coding Challenge #134....
🚂 #C1 - Coding in the Cabana Maurer Rose: • Coding the Maurer Rose
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: kzitem.infojoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#algorithmicroses #mathematicsroses #polarcoordinates #trigonometry #p5js #javascript
Негізгі бет Coding Challenge #55: Mathematical Rose Patterns
Пікірлер: 225