Coding Challenge #60: Butterfly Generator

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



Duration: 20:50
49,135 views
1,161


Inspired by Everest Pipkinโ€™s Moth Generator, I use trigonometry and perlin noise to procedurally generate butterfly wing designs with p5.js. Code: https://thecodingtrain.com/challenges/60-butterfly-generator

๐Ÿ•น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/tKBc2fP8r

๐ŸŽฅ Previous video: https://youtu.be/4hA7G3gup-4?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Next video: https://youtu.be/0dwJ-bkJwDI?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
๐Ÿ–‹๏ธ Moth Generator: https://twitter.com/mothgenerator
๐Ÿ—„ Rose (mathematics) on Wikipedia: https://en.wikipedia.org/wiki/Rose_(mathematics)

Videos:
๐ŸŽฅ Trigonometry and Polar Coordinates - The Nature of Code: https://youtu.be/znOBmOrtz_M
๐ŸŽฅ What is Perlin Noise?: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6bgPNQAdxQZpJuJCjeOr7VD
๐Ÿ”ด Live Stream Archive #80: https://youtu.be/bMOv5vTC9uE?t=3431s

Related Coding Challenges:
๐Ÿš‚ #36 Blobby!: https://youtu.be/rX5p-QRP6R4
๐Ÿš‚ #55 Mathematical Rose Patterns: https://youtu.be/f5QBExMNB1I
๐Ÿš‚ #134 Heart Curve: https://youtu.be/oUBAi9xQ2X4
๐Ÿš‚ #136 Polar Noise Loops: https://youtu.be/ZI1dmHv3MeM

Timestamps:
0:00 Introduce coding challenge
0:17 Highlight project which inspires the coding challenge
1:13 Explain symmetrical drawing and polar coordinates
2:45 Let's code
3:04 Draw one of the butterfly's wings
4:09 Translate canvas to center the drawing
4:41 Draw points
5:25 Draw the wing with a line
6:18 Introduce Perlin Noise
7:08 Implement Perlin Noise
8:23 Experiment with noise arguments
9:06 Draw the other wing symmetrically
10:55 Draw a continous shape
13:20 Highlight math to draw roses with polar coordinates
13:49 Include math in the coding challenge
14:44 Reintroduce noise
15:26 Experiment with different values
16:06 Animate drawing changing the noise values
16:45 Implement Perlin Noise in multiple dimensions
18:00 Conclude coding challenge
18:40 Consider comments from the chat

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://thecodingtrain.com/discord
๐Ÿ’– 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

#butterflywings #perlinnoise #polarcoordinates #javascript #p5js







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
moth generator
katie rose pipkin
butterfly generator
butterfly wings generator
trigonometry art
perlin noise
perlin noise art