TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An interactive explanation of quadtrees (2014)

102 点作者 nbaksalyar大约 2 年前

6 条评论

turtledragonfly大约 2 年前
I have had to do some non-trivial work with quadtrees, and one thing I realized, which is not so well-advertised, is that there are really two main categories of quadtrees. So-called &quot;linear&quot; quadtrees are a somewhat different beast that the more typical &quot;pointer to children&quot; ones.<p>They&#x27;re really just different representations of the same thing (a quadtree), but those representations have such different use-cases and performance characteristics that I tend to think of them differently.<p>Linear quadtrees typically use Morton codes (or another space-filling curve), and are good at doing fast queries against static data. You build the tree once, then query it lots. Whereas &quot;standard&quot; quadtrees are more about dynamism — being able to add and remove items quickly.<p>This is a great SO post on dynamic-style quadtrees: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;41946007&#x2F;efficient-and-well-explained-implementation-of-a-quadtree-for-2d-collision-det&#x2F;48330314#48330314" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;41946007&#x2F;efficient-and-w...</a><p>It was quite hard for me to find open-source implementations of linear quadtrees. Whereas there are all kinds of implementations of the more common kind.<p>One day I&#x27;ll open-source my code. I was going back to papers from the &#x27;80s for some of that stuff (:
评论 #34801120 未加载
评论 #34801299 未加载
bfrog大约 2 年前
At one point I wrote a quad tree as part of the Map in SLAM to store probabilities of a point containing an obstacle on a 2d map, the thinking was I could use the quadtree to then navigate the robot.<p>The reality was for the detail I needed at the scale I needed quad trees sort of sucked at this (university is a great place to try and fail at things, I learned a bunch!)<p>I&#x27;d be really curious what is used now, if there&#x27;s some shape estimations to collate points into blobs that are cheaper to store and navigate around. Been awhile since I read any books on robotics and navigation and SLAM though.
stolen_biscuit大约 2 年前
Understanding how quadtrees work was how I finally managed to develop an intuitive grasp of how octrees work. Great to know for any budding voxel enthusiast
chidiw大约 2 年前
Inspired by this post two years ago, I wrote a more comprehensive version: <a href="https:&#x2F;&#x2F;chidiwilliams.com&#x2F;post&#x2F;quadtrees&#x2F;" rel="nofollow">https:&#x2F;&#x2F;chidiwilliams.com&#x2F;post&#x2F;quadtrees&#x2F;</a>. Also showed how quadtrees could be used for compression.
eutectic大约 2 年前
I feel like quadtrees are almost never the best data structure for a given problem. The rare exception being HashLife.
评论 #34798530 未加载
评论 #34798939 未加载
评论 #34797833 未加载
dang大约 2 年前
Discussed at the time:<p><i>An interactive explanation of quadtrees</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7668628" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7668628</a> - April 2014 (19 comments)