quadtrees: non-uniform mesh generation universidad de puerto rico – mayagüez mathematics...
TRANSCRIPT
Quadtrees: Non-Uniform Mesh Generation
Universidad de Puerto Rico – MayagüezMathematics Department
Computational Geometric CourseCourse Professor: Robert Acar, PhD.Project’s Owner: Paul Castillo, PhD.
Yurin Holguino Borda, Grad. Student [email protected]
Hillary Caituiro Monge, Grad. [email protected]
Design and Implementation
Contents
Motivation Non-Uniform Meshes Quadtrees From Quadtrees to Meshes Implementation Demo
Motivation 1
Problem: heat transfer on printed board circuits
Simulate: approximation using finite elements methods
Such methods first divide the board into small regions, or elements: triangles quadrilaterals
Motivation 2
The head that each element emits by itself is assumed to be known
It is also assumed to be known how neighboring elements influence each other
This leads to a big system of equations, which is then solved numerically
Motivation 3
The accuracy of finite element methods depends heavily on the mesh: The finer the mesh, the better the solution
Computation time for the numerical process increases drastically when the number of elements increases So, we would like to use a fine mesh only when
necessary
Non-Uniform Meshes
The input is a square (the printed circuit board) a number of polygonal components inside it
Mesh should be fine only where necessary It should be fine near the edges of the
components and coarse far away from the edges
Quadtree Introduction 1/2
Is a non-uniform mesh generation method A quadtree is a rooted tree in which every
intern node has four children labeled NE, NW, SW, and SE
Every node in the quadtree corresponds to a square
NE NWSESW
Quadtree Introduction 2/2
Quadtrees can be used to store different types of data
We will describe the variant that stores a set of polygons in the plane
The recursive splitting of squares continues as long as either There is no intersection with the set of polygons Is reached a user-defined deep
Quadtree Generation 1/3
Algorithm GenerateQuadtree(P) Input. A set P of polygons Output. A quadtree
1. Find the smallest rectangle R containing P2. Make a set S of segments from P3. Create a new empty quadtree Q4. Qroot GenerateQuadtreeNodes(Qroot, S,
R)5. return Q
Quadtree Generation 2/3
Algorithm GenerateQuadtreeNodes(N, S, R) Input. A node N, a set S of segments, and a rectangle R
1. Do: create N; N.r R; N.s s; and deep++ 2. If S does not intersect R then return3. If deep = MAXDEEP then return4. Make S’ with the segments of S that intersect with R5. Divide R in four rectangles RNE, RNW, RSW, RSE 6. NNE GenerateQuadtreeNodes(NNE, S’, RNE);7. NNW GenerateQuadtreeNodes(NNW , S’, RNW);8. NSW GenerateQuadtreeNodes(NSW , S’, RSW);9. NSE GenerateQuadtreeNodes(NSE , S’, RSE);10. return N
Quadtree Generation 3/3
NE NW SESW
Balancing a Quadtree 1/2
Algorithm BalanceQuadTree(T) Input. A quadtree T Output. A balanced version of T,
1. Balance the quadtree in such manner that any two leaves whose squares are neighbors differ at most one in depth.
Balancing a Quadtree 2/2
From Quadtrees to Meshes 1/2 Algorithm GenerateRectangularMesh(P)
Input. A set P of polygons Output. A rectangular Mesh
1. Q GenerateQuadtree(P)
2. T BalanceQuadTree(Q)
3. Construct a doubly-connected edge list from T in M
4. return M
From Quadtrees to Meshes 2/2 Algorithm GenerateTriangularMesh(P)
Input. A set P of polygons Output. A triangular Mesh
1. Q GenerateQuadtree(P)2. T BalanceQuadTree(Q) 3. Construct a doubly-connected edge list from T in
M
4. return M
Implementation
Java tools Simplified Demonstrative purpose It has a GUI embed in a Java Applet that is
published in the project web page C++ tools
Intended to be a tool to be used in scenarios where a high performance is required
Our C++ version has a visualization tool developed using OpenGL
Demo
Questions