






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







An Octree is a recursive subdivision of space which āhomesinā on the surface, from larger to finer detail. As the Octreesubdivides and splits into smaller Octrees, only the Octreeswhich contain some of the surface are processed; emptyOctrees are discarded. An octree encloses a cube in space. You evaluate the forcefunction F(r) at each vertex of the cube.
Each corner of each Octree has a value for the force function. If some corners are āhotā (above the force limit) and othersare ācoldā (below the force limit) then the implicit surface must cross the cube edges in between. You can draw triangles and polygons from the edges that thesurfaces crosses. This turns an Octree into a polygon whichcan be rendered.
The naive implementation is to form polygons whose verticesare the midpoints of the edges which lie between hot and coldvertices. A dramatic smoothing effect can be achieved by using therelative strength of the hot and cold corners to determinewhether the intersection point should really fall closer to hot orto cold. The vertices of the polygon can be more closelyaproximated by points linearly interpolated along the edges ofthe cube. t = (0.5 - F(P1)) / (F(P2) - F(P1))P = P1 + t * (P2 - P1)
http://astronomy.swin.edu.au/~pbourke/modelling/implicitsurf/ http://www.cs.berkeley.edu/~job/Papers/turk-2002-MIS.pdf http://www.unchainedgeometry.com/jbloom/papers/interactive.pdf http://www-courses.cs.uiuc.edu/~cs319/polygonization.pdf http://bentonian.com/YAMM
Lasers shooting at a spaceship Character walking through a maze Billiard balls colliding Fitting pieces together in CAD software
Finding the angle and point of intersection between movingspheres: Solve for the point on the line of travel which is precisely thesum of the two spheresā radii away from the center of thestationary sphere. Subtracting the stationary sphereās center from the point ofintersection will also give you the vector that is each sphereāsnormal at the impact point.
If your game character is being shot at, you may not carewhether their head or foot is hit. So donāt test them. You can often reduce a player character to a cylinder.Testing for the intersection between a ray (the line of fire of agun) and a cylinder (the player) is really just a test of thedistance between two lines. Test the distance between theline and the axis of the cylinder. If all fire is known to be horizontal, you can ignore the Y valuecompletely and reduce the problem to a line/circle test.