Implicit Surfaces CPSC 599.86 / 601.86 Sonny Chan University of Calgary
(some board work happened here)
Implicit Surface Rendering Kenneth Salisbury & Christopher Tarr, 1997
Implicit Surfaces • A surface defined by an implicit equation: S ( x , y , z ) = 0 - • Can be rendered using the same proxy-based algorithm!
Implicit Surfaces Review • “Graph” the equation, as you learned how to do in high school... 0.8 0.8 0 0 -0.8 -0.8 -0.8 0 0.8 -0.8 0 0.8 ( x 2 + y 2 − 1) 3 − x 2 y 3 = 0 x 2 + xy + y 2 = 0
1 0.5 The Landscape S ( x, y ) < 0 0 S ( x, y ) = 0 -0.5 S ( x, y ) > 0 -1 -1.5 -1 -0.5 0 0.5 1 1.5
1 0.5 Step 1: Detecting Collision 0 How do we detect first contact with the object? ? -0.5 -1 -1.5 -1 -0.5 0 0.5 1 1.5
Step 2 1 • Finding a surface point: 0.5 - Once contact is made, we need to keep track of a point on the surface 0 - First, how do we find this point? ? -0.5 -1 -1.5 -1 -0.5 0 0.5 1 1.5
1 0.5 0 The Gradient -0.5 -1 -1.5 -1 -0.5 0 0.5 1 1.5 ∂ S ! ∂ x r S ( x, y ) = ∂ S ∂ y
1 0.5 0 Direction to the Surface -0.5 -1 -1.5 -1 -0.5 0 0.5 1 1.5 � S ( x, y ) r S ( x, y )
The “Seeding” Algorithm • Given a seed point, find the nearest point on the surface (within a certain tolerance) • Exploit condition that the seed is known to start near the surface p ← p seed do S ( p ) r S ( p ) � p ← − r S ( p ) · r S ( p ) p ← p + � p until ( || � p || < ✏ ) .5 0 0.5 1
Step 3 1 • Tracking the surface point: 0.5 - As the device moves, we need to ? update our surface point, subject to 0 geometric constraints - What are these constraints? -0.5 - Can we use the seeding algorithm -1 again? -1.5 -1 -0.5 0 0.5 1 1.5
Constrained by a Plane 1 • We have a point on the surface 0.5 • We have the surface normal 0 T ( p ) q (gradient of the implicit function) -0.5 • The answer is to use a tangent p plane! -1 -1.5 -1 -0.5 0 0.5 1 1.5
T ( p i − 1 ) q i p seed p i Surface Tracking One time step: is p i the nearest surface point? q i − 1 p i − 1
T ( p i − 1 ) p i q p i − 1 Surface Tracking One more time step: a lot closer now!
1 0.5 Step 4: Breaking Contact ? 0 How do we know when to stop tracking? -0.5 -1 -1.5 -1 -0.5 0 0.5 1 1.5
T ( p i − 1 ) Tangent Plane to the Rescue! • Contact is broken when q moves to the outside of the constraining plane • What vector operator can we p i = q i use to test this condition? q i − 1 p i − 1
T ( p i − 1 ) q i p i Breaking Contact Is this an incorrect break? What happens here? q i − 1 p i − 1
Our Implicit Surface Rendering Algorithm 1. Detect initial contact when S ( p ) < 0 2. Find a point on the surface using the initial device location as seed 3. Update the surface point as the device moves, using the tangent plane as a constraint and the seeding algorithm 4. Contact breaks when the device is moved outside the constraining plane 5. Repeat from step 1…
Potential Limitations • Does this algorithm render thin objects correctly? • A limit cycle?!
Recommend
More recommend