|
| 1 | +{ |
| 2 | + "title": "Dragon Curve", |
| 3 | + "videoNumber": "185", |
| 4 | + "description": "The Dragon Curve fractal is created by repeatedly folding a strip of paper in half, then unfolding it to form a curve. In this challenge, I attempt to code an animation of the Dragon Curve forming with p5.js in JavaScript.", |
| 5 | + "videoId": "MazpwQNdJYQ", |
| 6 | + "nebulaSlug": "codingtrain-coding-challenge-184-dragon-curve", |
| 7 | + "date": "2024-08-18", |
| 8 | + "languages": ["p5.js", "JavaScript"], |
| 9 | + "topics": ["fractals", "dragon curve", "Nature of Code"], |
| 10 | + "canContribute": true, |
| 11 | + "relatedChallenges": [ |
| 12 | + "14-fractal-trees-recursive", |
| 13 | + "16-l-system-fractal-trees", |
| 14 | + "77-recursion", |
| 15 | + "121-logo-interpreter", |
| 16 | + "c3-hilbert-curve" |
| 17 | + ], |
| 18 | + "timestamps": [ |
| 19 | + { "time": "00:00", "title": "Introduction" }, |
| 20 | + { "time": "00:36", "title": "The Nature of Code book" }, |
| 21 | + { "time": "01:43", "title": "Explain algorithm" }, |
| 22 | + { "time": "03:38", "title": "Start coding" }, |
| 23 | + { "time": "05:05", "title": "Write rotate function" }, |
| 24 | + { "time": "07:05", "title": "Rotate all the segments" }, |
| 25 | + { "time": "11:30", "title": "We have the dragon curve!" }, |
| 26 | + { "time": "12:00", "title": "Add animation" }, |
| 27 | + { "time": "16:31", "title": "Add the starting positions for a and b" }, |
| 28 | + { "time": "21:43", "title": "Scale the lines" }, |
| 29 | + { "time": "24:08", "title": "Add a nextGeneration() function" }, |
| 30 | + { "time": "25:16", "title": "The reduction ratio" }, |
| 31 | + { "time": "26:44", "title": "Target zoom" }, |
| 32 | + { "time": "28:57", "title": "Challenge complete!" }, |
| 33 | + { "time": "29:57", "title": "What can you do?" }, |
| 34 | + { "time": "30:25", "title": "Outro" } |
| 35 | + ], |
| 36 | + "codeExamples": [ |
| 37 | + { |
| 38 | + "title": "Dragon curve animation", |
| 39 | + "description": "Animation of the dragon curve.", |
| 40 | + "image": "img1.jpg", |
| 41 | + "urls": { |
| 42 | + "p5": "https://editor.p5js.org/codingtrain/sketches/LXDsoCSZs" |
| 43 | + } |
| 44 | + }, |
| 45 | + { |
| 46 | + "title": "Dragon curve color variation", |
| 47 | + "description": "Dragon curve with color rendered with an L-system", |
| 48 | + "image": "img2.jpg", |
| 49 | + "urls": { |
| 50 | + "p5": "https://editor.p5js.org/codingtrain/sketches/7nNd-f7iY" |
| 51 | + } |
| 52 | + }, |
| 53 | + { |
| 54 | + "title": "Dragon curve noise variation", |
| 55 | + "description": "Dragon curve with random noise", |
| 56 | + "image": "img3.jpg", |
| 57 | + "urls": { |
| 58 | + "p5": "https://editor.p5js.org/codingtrain/sketches/7r7ZIE4dc" |
| 59 | + } |
| 60 | + } |
| 61 | + ], |
| 62 | + "groupLinks": [ |
| 63 | + { |
| 64 | + "title": "References", |
| 65 | + "links": [ |
| 66 | + { |
| 67 | + "icon": "📕", |
| 68 | + "title": "The Nature of Code", |
| 69 | + "url": "https://natureofcode.com/", |
| 70 | + "description": "The Nature of Code book (2024 p5.js edition)" |
| 71 | + }, |
| 72 | + { |
| 73 | + "icon": "🛒", |
| 74 | + "title": "Nature of Code shop", |
| 75 | + "url": "https://store.natureofcode.com/products/the-nature-of-code", |
| 76 | + "description": "The Nature of Code book (2024 p5.js edition) is now available for purchase!" |
| 77 | + }, |
| 78 | + { |
| 79 | + "icon": "🔗", |
| 80 | + "title": "Dragon Curve", |
| 81 | + "url": "https://en.wikipedia.org/wiki/Dragon_curve", |
| 82 | + "description": "Uncyclopedia page discussing the construction and properties of the Dragon curve." |
| 83 | + }, |
| 84 | + { |
| 85 | + "icon": "🔗", |
| 86 | + "title": "concat() function", |
| 87 | + "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat", |
| 88 | + "description": "Reference for the concat function." |
| 89 | + } |
| 90 | + ] |
| 91 | + }, |
| 92 | + { |
| 93 | + "title": "Videos", |
| 94 | + "links": [ |
| 95 | + { |
| 96 | + "icon": "🎥", |
| 97 | + "title": "Unfolding the Dragon.", |
| 98 | + "url": "https://youtu.be/UBuPWdSbyf8", |
| 99 | + "description": "Dragon Curve unfolding animation rendered in Cinema 4D." |
| 100 | + }, |
| 101 | + { |
| 102 | + "icon": "🎥", |
| 103 | + "title": "Dragon Curve - Numberphile", |
| 104 | + "url": "https://www.youtube.com/watch?v=wCyC-K_PnRY", |
| 105 | + "description": "Beautiful Dragon Curves, Fractals and Jurassic Park. Featuring Rob Eastaway." |
| 106 | + } |
| 107 | + ] |
| 108 | + } |
| 109 | + ], |
| 110 | + "credits": [ |
| 111 | + { |
| 112 | + "title": "Editing", |
| 113 | + "name": "Mathieu Blanchette" |
| 114 | + }, |
| 115 | + { |
| 116 | + "title": "Animations", |
| 117 | + "name": "Jason Heglund" |
| 118 | + } |
| 119 | + ] |
| 120 | +} |
0 commit comments