Download presentation
Presentation is loading. Please wait.
Published byBryan Bryan Modified over 9 years ago
1
3D Game Engine Design 1 3D Game Engine Design Ch. 2.5. 3D MAP LAB
2
3D Game Engine Design 2 2.5. Standard 3D Objects Useful as bounding regions for Rapid culling in the rendering process Rapid determining of the collision detection of two objects Primitives Spheres Oriented Boxes Capsules, Lozenges Ellipsoids and etc.
3
3D Game Engine Design 3 Center Point and Radius with points Sphere Containing Axis-Aligned Box Compute the minimum-volume axis- aligned bounding box Select the smallest enclosing sphere of the box with centered at the box center Rapid, but not as good a fit. Spheres
4
3D Game Engine Design 4 Spheres Spheres (cont’d) Sphere Centered at Average of Points Sphere Center : Average of Points Sphere Radius : Smallest value from center to points enclosing all points 2x Iteration than Axis-Aligned box method Minimum-Volume Sphere (Welzl 91) Uses a randomized linear algorithm Maintain a set of supporting points( lying on the sphere) while processing the input point set at a time.
5
3D Game Engine Design 5 Oriented Boxes Oriented Box Provide a better fit than spheres Defined by A center 3 Orthonormal Axes for 3 extents of Axes , points inside or on the box Orthonormal matrix where
6
3D Game Engine Design 6 Oriented Boxes Oriented Boxes (cont’d) Axis-Aligned Box Find the extreme points and Fitting with a Gaussian Distribution Gaussian Distribution : mean of the distribution : the covariance matrix of the distribution Fitting points with anisotropic gaussian distribution
7
3D Game Engine Design 7 Oriented Boxes Oriented Boxes (cont’d) Fitting with a Gaussian Distribution Axes of the box : unit-length eigenvectors of covariance matrix M Extents :
8
3D Game Engine Design 8 Oriented Boxes Oriented Boxes (cont’d) Minimum-Volume Box Best-fitting box : the minimum volume containing the points Iterative scheme for a minimization For any coordinate axes, points are projected onto the axes The values :
9
3D Game Engine Design 9 Oriented Boxes Oriented Boxes (cont’d) Iterative Minimization for M-V Box Center of the minimum-volume box Extents of the minimum-volume box Selection of coordinate axes : unit length vector and an angle The volume of Box : Find that minimizes the volume
10
3D Game Engine Design 10 Oriented Boxes Oriented Boxes (cont’d) Fitting Triangles with Gaussian Distribution Data points : vertices of a triangle mesh Fit of an oriented box to the convex hull of the vertices triangles, i-th triangle Triangle and its interior Mean point of the convex hull
11
3D Game Engine Design 11 Oriented Boxes Oriented Boxes (cont’d) Fitting Triangles with Gaussian Distribution Covariance matrix of the convex hull Axes of Oriented Box : unit length eigenvectors of M Extents of Oriented Box :
12
3D Game Engine Design 12Capsules Capsule The set of all points that are distant from a line segment with end point and direction Shape : a cylinder that has 2 hemispherical caps at the end points Least square fitting Line fitting :, where average of the data points and unit-length direction vector to be the maximum distance from the data points to Line
13
3D Game Engine Design 13 Capsules Capsules (cont’d) Least Square Fitting Select unit axes vectors and set Data points Find the domain of for the 2 hemisphere at end Find the largest so that all points lie above the hemisphere
14
3D Game Engine Design 14 Capsules Capsules (cont’d) Least Square Fitting Find the smallest so that all points lie below the hemisphere End points : Minimum of minimum-Area Projected Circles Projection of points onto the Plane Compute the minimum-area circle of projected points and find and
15
3D Game Engine Design 15 Lozenges Lozenges Set of all points that are distant from a rectangle with origin and edge directions Shape : an oriented rectangle with Attached 4 half-cylinder sides 4 quarter-spherical corners
16
3D Game Engine Design 16 Lozenges Fitting with a Gaussian Distribution Compute the mean of the points and the covariance matrix M Unit-length eigenvectors of the M : Data points : Data points are bounded by 2 planes Lozenge radius :
17
3D Game Engine Design 17 Lozenges Lozenges (cont’d) Fitting with a Gaussian Distribution Lozenge edge : end of the hemicylinder Find the Lozenge edge Analogous to the fitting by 3D capsule 2D capsule containing The largest so that all points lie above the hemicircle
18
3D Game Engine Design 18 Lozenges Lozenges (cont’d) Fitting with a Gaussian Distribution Find the Lozenge edge The smallest so that all points lie below the hemicircle The Lozenge edge
19
3D Game Engine Design 19 Cylinders Cylinder A distance from a line Least Squares Line Contains Axis Fit the points by a line using the least- square algorithm , where average of the data points and unit-length direction vector Select unit axes vectors and set Data points
20
3D Game Engine Design 20 Cylinders Cylinders (cont’d) Least Squares Line Contains Axis Cylinder radius : Cylinder height : Modified Axis Least Squares Line Moved to a Minimum-Area Center Minimum-area circle containing is computed and has center
21
3D Game Engine Design 21 Ellipsoids Ellipsoid Center Orthonormal axis directions The ellipsoid with center and axes
22
3D Game Engine Design 22 Ellipsoids Ellipsoids (cont’d) Axis-Aligned Ellipsoid Firstly generate the axis-aligned box containing the points be the vectors of the min/max box components Compute the ratios of semi-axis lengths Semi-Axis Lengths
23
3D Game Engine Design 23 Ellipsoids Ellipsoids (cont’d) Fitting Points with a Gaussian Distribution Similar to the case of an oriented box Center of the ellipsoid : the mean of points Axes : eigenvectors of the covariance matrix Semi-Axis Lengths : eignevalues
24
3D Game Engine Design 24 Ellipsoids Ellipsoids (cont’d) Minimum-Volume Ellipsoid Random Linear Techniques (Welzl 91) Constrained numerical minimization Difficult to implement Not possible for real-time apps.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.