Coding Challenge

Published: 30 December 2018
on channel: The Coding Train
55,729
1.4k

Snowflake Challenge #3! In this video, I draw the Koch Fractal Curve in Processing (Java). Code: https://thecodingtrain.com/challenges...

🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • Coding Challenge #128: Sketch-RNN Sno...  
🎥 Next video:    • Coding Challenge #130.1: Drawing with...  
🎥 All videos:    • Coding Challenges  

References:
💰 Support the Processing Foundation: https://processingfoundation.org/supp...
🗄 Koch Snowflake: https://en.wikipedia.org/wiki/Koch_sn...

Videos:
🎥 Vectors: https://thecodingtrain.com/tracks/the...
🔴 Coding Train Live Holiday Telethon 2018:    • Coding Train Live:  Processing Founda...  

Related Coding Challenges:
🚂 #2 Menger Sponge Fractal:    • Coding Challenge #2: Menger Sponge Fr...  
🚂 #14 Recursive Fractal Trees:    • Coding Challenge #14: Fractal Trees -...  
🚂 #21 Mandelbrot Set with p5.js:    • Coding Challenge #21: Mandelbrot Set ...  
🚂 #123 Chaos Game:    • Coding Challenge #123: Chaos Game Part 1  
🚂 #126 Toothpicks:    • Coding Challenge #126: Toothpicks  
🚂 #174 AppleSoft Basic Fractal Tree:    • Apple ][ Coding Challenge: Fractal Tree  

Timestamps:
0:00 Introducing today's topic
0:36 Koch curve algorithm
2:20 Create a Segment class
4:40 Add an array list of segments
5:10 Draw the segments
8:24 Divide segment by 3
0:00 Rotate to get the "hat"
12:50 Write a function to add the children to the segments
14:18 Use mousePressed() to get a new generation of segments
16:00 Why is the Koch curve called the "Monster Curve"?
19:11 Add a triangle
20:59 Conclusion and creative possibilities
21:47 Bonus addendum: use height of equilateral triangle to find 3rd point

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

🔗 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-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#kochcurve #fractals #kochsnowflake #processing


Watch video Coding Challenge online without registration, duration hours minute second in high quality. This video was added by user The Coding Train 30 December 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 55,729 once and liked it 1.4 thousand people.