Sign in to follow this  

Point Region Quadtree

Recommended Posts

I need to write a code that implement PR quadtree data structure. I need to have insert new point method using an input file.


[Edited by - Fatena on March 29, 2010 9:28:59 PM]

Share this post

Link to post
Share on other sites
I wasn't that familiar with this term, but Google led me here.

Based on a quick read of that material at least, it seems like the logic of a point insertion function would fall out fairly naturally based on the definition of the data structure. You start at the root node, and sort downward. If the point lands in a gray node, you keep sorting. If the point lands in a white node, that node becomes a black node and you're done. If the point lands in a black node, that node becomes gray, and you keep subdividing until the new point and the existing point end up in separate nodes.

However, that analysis may be wrong - again, I'm not that familiar with this data structure and have never implemented it myself. Google seems to have some information though (if not a great deal), and I'm sure you can get help here too if you need it.

However, you might need to provide some more information. In particular, what is the context? Is this a homework project? What have you tried so far, and where are you running into trouble?

(While Googling, I also ran across your post here here, but you'll notice that that thread is several years old. You'll probably have better luck here, I would imagine.)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this