Coding Challenge #98.2: Quadtree - Part 2

Описание к видео Coding Challenge #98.2: Quadtree - Part 2

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 1:    • Coding Challenge #98.1: 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 Quadtree Part 2--query the data structure for points contained within a rectangular boundary
1:45 Write a query function to get all the points within a rectangle
3:16 Write an intersection function
6:14 Create an array of "found" points
13:00 Draw points within the rectangle
15:21 Sanity check--how many points are being counted
16:57 Adjust the rectangle with the mouse
18:44 Return the points array
19:42 Up next: apply the quadtrees algorithm to a collision detection problem

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

Комментарии

Информация по комментариям в разработке