Coding Challenge #98.1: Quadtree - Part 1
The Coding Train The Coding Train
1.7M subscribers
308,684 views
6.4K

 Published On Mar 26, 2018

In this multi-part coding challenge, I implement a Quadtree data structure in JavaScript and visualize it with p5.js. Code: https://thecodingtrain.com/challenges...

p5.js Web Editor Sketches:
šŸ•¹ļø Quadtree Parts 1 & 2: https://editor.p5js.org/codingtrain/s...
šŸ•¹ļø Quadtree - Part 3: https://editor.p5js.org/codingtrain/s...

Other Parts of this Challenge:
šŸ“ŗ Quadtree - Part 2: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #98.2:Ā QuadtreeĀ -Ā Pa...Ā Ā 
šŸ“ŗ Quadtree - Part 3: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #98.3:Ā QuadtreeĀ Coll...Ā Ā 

šŸŽ„ Next video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #99:Ā NeuralĀ NetworkĀ ...Ā Ā 
šŸŽ„ All videos: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 

References:
šŸ’¾ Quadtree repo: https://github.com/CodingTrain/QuadTree
šŸ—„ Quadtree on Wikipedia: https://en.wikipedia.org/wiki/Quadtree

Live Stream Archive:
šŸ”“ Quadtree Live Stream: Ā Ā Ā ā€¢Ā LiveĀ StreamĀ #128:Ā QuadtreesĀ Ā 

Related Coding Challenges:
šŸš‚ #65 Binary Tree: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #65.1:Ā BinaryĀ Search...Ā Ā 
šŸš‚ #68 Breadth-First Search: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #68:Ā Breadth-FirstĀ S...Ā Ā 
šŸš‚ #72 Frogger: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #72:Ā FroggerĀ -Ā PartĀ 1Ā Ā 

Timestamps:
0:00 Introducing today's topic: Quadtrees
1:34 N squared problem
4:30 Big O notation
8:23 QuadTree class
11:15 Capacity
12:26 Insert points
13:30 Create a subdivide function
20:11 Recursively add points
21:12 Check if point is within boundary
26:49 Visualize the Quadtree
30:30 Use mouse clicks to add points
32:43 Edge cases

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: Ā Ā /Ā 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...

#quadtreedatastructure #quadtreecollisiondetection #javascript #p5js

show more

Share/Embed