Binary Space Partitioning Tree Problem
-
This is going to be used strictly in 2D (on images to be specific) not 3D. I need to be able to divide the image until an end criteria is met using linear lines in any orientation (360 degree range). The internal nodes store the dividing lines, while the leaf nodes contain the average intensity of the region that the node is referring to. My problem is that I dont know how to store a line segment that is on a specific place. Of course, i need to store the line as well as its location. The leaf nodes just contain a value that will be used to "color" in the region by a BSP tree decoder, but the problem is to store the dividing lines. Would the lines be stored as functions? if so how? Some background info on BSP tree ftp://ftp.sgi.com/other/bspfaq/faq/bspfaq.html#6.txt[^] The binary tree that I'm using: http://msdn.microsoft.com/en-us/library/ms379572(VS.80).aspx[^]