
Coding Challenge #152: RDP Line Simplification Algorithm
The Ramer–Douglas–Peucker algorithm (aka "iterative end-point fit algorithm"), takes a curve composed of line segments and reduces the fidelty to a "lower fidelity" curve with fewer points. Code: https://thecodingtrain.com/challenges/152-rdp-algorithm
🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/SQjSugKn6
🎥 Previous video: https://youtu.be/F1OkDTUkKFo?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Next video: https://youtu.be/ZCXkvwLxBrA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
📚 Ramer-Douglas-Peucker Algorithm: https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm
📚 Nature of Code Chapter 6: https://natureofcode.com/book/chapter-6-autonomous-agents/
🔗 Scalar Projection Example: https://github.com/nature-of-code/noc-examples-processing/tree/master/chp06_agents/SimpleScalarProjection
Live Stream Archive:
🔴 Coding Train Live 185: https://youtu.be/5S87w8IqSHI?t=2802s
Related Coding Challenges:
🚂 #77 Recursion: https://youtu.be/jPsZwrV9ld0
🚂 #128 SketchRNN Snowflakes with ml5.js: https://youtu.be/pdaNttb7Mr8
Timestamps:
0:00:00 Introduction
0:02:19 Initial Curve in processing
0:04:39 What is the algorithm?
0:08:48 Starting the implementation
0:17:03 Making it recursive
0:20:41 Fixing mistakes
0:21:39 Calculating distances
0:24:47 Correcting order
0:25:13 Animating the algorithm
0:27:03 What will you create?
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
#ramerdouglaspeukeralgorithm #recursion #processing