Octreef(WIki content)
来源:互联网 发布:cacti linux模板 编辑:程序博客网 时间:2024/05/17 20:22
An octree is a tree data structure in which each internal node has up to eight children. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees. The name is formed from oct + tree, and normally written "octree", not "octtree".
Contents[hide] |
[edit] Octrees for spatial representation
Each node in an octree subdivides the space it represents into eight octants. In a point region (PR) octree, the node stores an explicit 3-dimensional point, which is the "center" of the subdivision for that node; the point defines one of the corners for each of the eight children. In an MX octree, the subdivision point is implicitly the center of the space the node represents. The root node of a PR octree can represent infinite space; the root node of an MX octree must represent a finite bounded space so that the implicit centers are well-defined. When used in this way, octrees are a special case of k-dimensional trees, in which the coordinate system is three dimensional.
[edit] Common uses of octrees
- Spatial indexing
- Efficient collision detection in three dimensions
- View frustum culling
- Fast Multipole Method
[edit] Application to color quantization
The octree color quantization algorithm, invented by Gervautz and Purgathofer in 1988, encodes image color data as an octree up to nine levels deep. Octrees are used because 23 = 8 and there are three color components in the RGB system. The node index to branch out from at the top level is determined by a formula that uses the most significant bits of the red, green, and blue color components, e.g. 4r + 2g + b. The next lower level uses the next bit significance, and so on. Less significant bits are sometimes ignored to reduce the tree size.
The algorithm is highly memory efficient because the tree's size can be limited. The bottom level of the octree consists of leaf nodes that accrue color data not represented in the tree; these nodes initially contain single bits. If much more than the desired number of palette colors are entered into the octree, its size can be continually reduced by seeking out a bottom-level node and averaging its bit data up into a leaf node, pruning part of the tree. Once sampling is complete, exploring all routes in the tree down to the leaf nodes, taking note of the bits along the way, will yield approximately the required number of colors.
[edit] See also
- kd-tree
- Bounding Interval Hierarchy
- Klee's measure problem
- Linear octrees
- Balanced octrees
- Sauerbraten, a 3D game engine which geometry is entirely based on octrees
[edit] External links
- Octree Quantization in Microsoft Systems Journal
- Color Quantization using Octrees in Dr. Dobb's
- Color Quantization using Octrees in Dr. Dobb's Source Code
- Octree Overview
- C++ implementation (GPL license)
- Parallel Octrees for Finite Element Applications
- Octreef(WIki content)
- BSP Tree(Refer Content of WiKi)
- wiki
- Wiki
- wiki
- wiki
- wiki
- WIKI?
- wiki
- WIKI
- wiki
- wiki
- wiki
- wiki
- Wiki
- wiki
- wiki
- content
- Ext2.0的国际化和汉字的使用问题
- Eclipse常用快捷键(转载)
- BPEL and Java
- WEB页右键菜单的实现
- 利用脚本启动java程序
- Octreef(WIki content)
- DIV 层拖动应用
- C#生成PDF表格
- Perl,Python,Ruby,Javascript 四种脚本语言比较
- xml文件(orgdemo.xml)
- javascript弹出窗口应用
- jQuery学习笔记
- 中英文会计科目,贴出来,大家共同学习
- 如何在没有光驱的情况下安装WINXP系统