1 Grid data application
Rendering
Collection query (what are the vertices of a certain surface, whether two points are connected, etc.)
geometric operations (adding and deleting a certain point/line/surface; mesh simplification; vertex splitting, edge folding)
2 Grid data storage
General grid storage (difficult to implement efficiently)
What is a good data store? (Space complexity, time (construction time, query time, modification time), time-space trade-off, redundancy)
3 Define a grid
Geometrically (vertex coordinates)
connected
surfaces and material properties (material color, ambient environment Ambient , high light coefficients hightlight coefficients, texture coordinates Texture coordinates, bidirectional reflection distribution function BRDF, bidirectional texture function BTF)
rendering attributes (lighting, normal, rendering model)
4 commonly used grid files
wavefont OBJ (*.obj),
3D Max (* .max, *.3ds),
VRML(*.vrl),
nventor (*.iv),
PLY (*.ply, *.ply2),
User-defined(*.m, *.liu)
5 edge tables
Advantages: convenient and fast, can represent non-manifold grids
Disadvantages: too simple to express the relationship between edges and points
6 Adjacency matrix
Consider the grid as a connected graph
. For given n points, construct an n*n adjacency matrix. If point i and point j are connected, the value of (i, j) is true.
Geometric information (point coordinates )
to add a face: vertex index triplet (v1,v2,v3)
Advantages: 1. Stores the connectivity between points; 2. Can store non-fluid grids
Disadvantages: There is a point-to-point connection, but there is no point-to-point connection
7 Double-connected edge table (DCEL)
records each face, each edge, each point (geometric information, topology information, attribute information), half-edge structure
Point record: coordinates of point v; pointer to the half edge starting from point v
Face record: pointer to the half edge of the boundary of face f Edge
record: pointer origin(e) to the origin of edge e; pointing to its twin half The pointer twin(e) of the edge; the pointer IncFace(e) pointing to the face to the left of the edge; the previous edge prev(e) and the next edge next(e) of IncFace(e);
example:
Pros: All queries run in O(1); in general, all operations run in O(1).
Disadvantage: can only represent flow grid
The information contained in corner c of the 8-corner table (Corner Table) is:
ct: the triangle where the angle c is located
cv: the point opposite the angle c
cn: the next counterclockwise angle of the angle c in ct
cp: the previous counterclockwise angle of the angle c in ct
co: the opposite angle to c
cr: angle to the right of angle c == cno
cl : angle to the left of angle c == cpo
example:
Pros: All queries run in O(1); in general, all operations run in O(1).
Disadvantages: can only represent streamline grids; high redundancy (but acceptable)
—————————————————
Copyright Notice: This article is the original article of CSDN blogger "Yiyifeng Echo" , following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting.
Original link: https://blog.csdn.net/EchoWenyu/article/details/83350269