Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Coding Challenge: Dragon Curve Fractal Animation

Coding Train via YouTube

Overview

Dive into the fascinating world of fractals with this 31-minute coding challenge video. Learn how to create an animated Dragon Curve fractal using p5.js and JavaScript. Explore the algorithm behind this intriguing pattern, which mimics repeatedly folding a strip of paper. Follow along as the instructor guides you through the coding process, from writing the rotate function to implementing animation and scaling. Discover techniques for adding starting positions, creating a nextGeneration() function, and applying a reduction ratio. By the end of the tutorial, you'll have a fully functioning Dragon Curve animation and be inspired to experiment with your own variations. Perfect for those interested in generative art, mathematical patterns, and creative coding.

Syllabus

Introduction
The Nature of Code book
Explain algorithm
Start coding
Write rotate function
Rotate all the segments
We have the dragon curve!
Add animation
Add the starting positions for a and b
Scale the lines
Add a nextGeneration function
The reduction ratio
Target zoom
Challenge complete!
What can you do?
Outro

Taught by

The Coding Train

Reviews

Start your review of Coding Challenge: Dragon Curve Fractal Animation

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.