home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!darwin.sura.net!udel!princeton!phoenix.Princeton.EDU!jdunning
- From: jdunning@phoenix.Princeton.EDU (John Alan Dunning)
- Subject: Re: What are Quad Trees?
- Message-ID: <1992Nov19.042358.8559@Princeton.EDU>
- Originator: news@nimaster
- Sender: news@Princeton.EDU (USENET News System)
- Nntp-Posting-Host: phoenix.princeton.edu
- Organization: Princeton University
- References: <1992Nov7.053905.18272@nuscc.nus.sg> <1992Nov09.230108.32263@watson.ibm.com> <martin.721555622@marsh>
- Date: Thu, 19 Nov 1992 04:23:58 GMT
- Lines: 31
-
- In article <martin.721555622@marsh> martin@cs.curtin.edu.au (Martin Dougiamas) writes:
- >schultz@schultz.kgn.ibm.com (schultz) writes:
- >>There are a bunch of papers covering the properties of quadtrees.
- >>Also, octrees are the logical extension of quadtrees into 3D.
- >
- >I actually wrote a simple but effective solids-modeller last year using
- >linear octrees, which are a VERY space efficient way to represent volumes.
- >You can also encode quadtrees linearly. Essentially, the linear encoding
- >reduces the tree to a sorted array of leaves. There is no need for pointers.
- >I found that operations like merging octrees and calculating cross-sections
- >could be performed quite speedily.
-
- Yes, octrees are extremely useful data structures. Last year I wrote
- a sort of 3D drawing program that let you sketch in 3D space using
- cubes, much like you can sketch in 2D space using little squares in a
- traditional bitmapped drawing program. I used a linear octree to encode the
- positions of the "voxels" (volume elements) in space. If the user
- drew eight voxels in one area so that their volume could be reprensented
- by a larger octant, the program would condense them into a single,
- larger octant, thus saving 7 elements in the array. Conversely, if
- the user deleted a voxel from a single large octant, the program
- would decompose that octant into smaller ones until the octree
- represented the new shape. Anyway, the program handled all this
- condensing and decomposing of the octree in real time. The main speed
- limitation was depthcuing the voxels on a Personal IRIS, rather than
- maintaining the linear octree, even though I was using very naive algorithms
- for searching the array (i.e., starting at the beginning and checking
- each octant until I found the one I wanted).
-
- John
-
-