1cs533d-winter-2005 Notes  More optional reading on web for collision detection.

Slides:



Advertisements
Similar presentations
Exponential Functions Logarithmic Functions
Advertisements

Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
The work-energy theorem. Objectives Investigate quantities using the work-energy theorem in various situations. Calculate quantities using the work-energy.
Quantum One: Lecture 3. Implications of Schrödinger's Wave Mechanics for Conservative Systems.
Computational Geometry & Collision detection
Some Ideas Behind Finite Element Analysis
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
1D linear elasticity Taking the limit as the number of springs and masses goes to infinity (and the forces and masses go to zero): If density and Young’s.
1cs533d-winter-2005 Notes  Please read O'Brien and Hodgins, "Graphical modeling and animation of brittle fracture", SIGGRAPH '99 O'Brien, Bargteil and.
1cs533d-term Notes  Assignment 1 due today.
Notes Assignment questions… cs533d-winter-2005.
1cs533d-term Notes  Assignment 2 is up. 2cs533d-term Modern FEM  Galerkin framework (the most common)  Find vector space of functions that.
1cs533d-term Notes  Braino in this lecture’s notes about last lectures bending energy…
1Notes. 2Heightfields  Especially good for terrain - just need a 2d array of heights (maybe stored as an image)  Displacement map from a plane  Split.
1Notes. 2 Building implicit surfaces  Simplest examples: a plane, a sphere  Can do unions and intersections with min and max  This works great for.
1cs533d-term Notes  Required reading: Baraff & Witkin, “Large steps in cloth animation”, SIGGRAPH’98 Grinspun et al., “Discrete shells”, SCA’03.
1cs533d-winter-2005 Notes. 2 Numerical Implementation 1  Get candidate x(t+∆t)  Check to see if x(t+∆t) is inside object (interference)  If so Get.
1Notes. 2 Triangle intersection  Many, many ways to do this  Most robust (and one of the fastest) is to do it based on determinants  For vectors a,b,c.
1Notes  Text:  Motion Blur A.3  Particle systems 4.5 (and 4.4.1, 6.6.2…)  Implicit Surfaces  Classic particle system papers  W. Reeves, “Particle.
1Notes  Reference  Witkin and Baraff, “Physically Based Modelling” course, SIGGRAPH 2001  Link on the course website.
Asst. Prof. Yusuf Sahillioğlu
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
1cs426-winter-2008 Notes  Course project: Will be due at the end of the term You can do it in pairs Create an animation that combines an algorithm for.
1cs533d-winter-2005 Notes  More reading on web site Baraff & Witkin’s classic cloth paper Grinspun et al. on bending Optional: Teran et al. on FVM in.
1cs533d-term Notes  list Even if you’re just auditing!
1cs533d-winter-2005 Notes  Some example values for common materials: (VERY approximate) Aluminum: E=70 GPa =0.34 Concrete:E=23 GPa =0.2 Diamond:E=950.
Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University.
1cs533d-term Notes. 2 Poisson Ratio  Real materials are essentially incompressible (for large deformation - neglecting foams and other weird composites…)
1cs533d-term Notes  Typo in test.rib --- fixed on the web now (PointsPolygon --> PointsPolygons)
Apex Point Map for Constant-Time Bounding Plane Approximation Samuli Laine Tero Karras NVIDIA.
Molecular Dynamics Classical trajectories and exact solutions
1cs533d-winter-2005 Notes  Assignment 2 instability - don’t worry about it right now  Please read D. Baraff, “Fast contact force computation for nonpenetrating.
1Notes. 2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously.
The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.
Gauss’s Law.
Computer graphics & visualization Collision Detection – Narrow Phase.
Week 13 - Wednesday CS361.
Laplacian Surface Editing
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Skills for October Rounds
COMP 175: Computer Graphics March 24, 2015
ME 2304: 3D Geometry & Vector Calculus Dr. Faraz Junejo Double Integrals.
Collision handling: detection and response
INTEGRALS Areas and Distances INTEGRALS In this section, we will learn that: We get the same special type of limit in trying to find the area under.
Haptics and Virtual Reality
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
ELECTRIC FIELD LINES …... Electric field lines Recall that we defined the electric field to be the force per unit charge at a particular point: For a.
Physics for Bioscience (Part II) Electricity Magnetism Waves Sound Optics by Dr. Chittakorn polyon Department of Physics, Faculty of Science,
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
General Physics II, Lec 3, By/ T.A. Eleyan 1 Lecture 3 The Electric Field.
Chapter 24 Gauss’s Law. Let’s return to the field lines and consider the flux through a surface. The number of lines per unit area is proportional to.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
Halliday/Resnick/Walker Fundamentals of Physics
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Controlling a Virtual Camera Ross Ptacek University of Alabama Birmingham.
Work AP style. Energy Energy: the currency of the universe. Everything has to be “paid for” with energy. Energy can’t be created or destroyed, but it.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
INTEGRALS We saw in Section 5.1 that a limit of the form arises when we compute an area. We also saw that it arises when we try to find the distance traveled.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 29 Soft Bodies and Rigid Bodies.
Electrostatic field in dielectric media When a material has no free charge carriers or very few charge carriers, it is known as dielectric. For example.
PHY 151: Lecture Motion of an Object attached to a Spring 12.2 Particle in Simple Harmonic Motion 12.3 Energy of the Simple Harmonic Oscillator.
ELEC 3105 Lecture 2 ELECTRIC FIELD LINES …...
Inequalities Some problems in algebra lead to inequalities instead of equations. An inequality looks just like an equation, except that in the place of.
GPAT – Chapter 7 Physics.
Presentation transcript:

1cs533d-winter-2005 Notes  More optional reading on web for collision detection

2cs533d-winter-2005 Triangles  Given x 1, x 2, x 3 the plane normal is  Interference with a closed mesh Cast a ray to infinity, parity of number of intersections gives inside/outside  So intersection is more fundamental The same problem as in ray-tracing

3cs533d-winter-2005 Triangle intersection  The best approach: reduce to simple predicates Spend the effort making them exact, accurate, or at least consistent Then it’s just some logic on top Common idea in computational geometry  In this case, predicate is sign of signed volume (is a tetrahedra inside-out?)

4cs533d-winter-2005 Using orient()  Line-triangle If line includes x 4 and x 5 then intersection if orient(1,2,4,5)=orient(2,3,4,5)=orient(3,1,4,5) I.e. does the line pass to the left (right) of each directed triangle edge? If normalized, the values of the determinants give the barycentric coordinates of plane intersection point  Segment-triangle Before checking line as above, also check if orient(1,2,3,4) != orient(1,2,3,5) I.e. are the two endpoints on different sides of the triangle?

5cs533d-winter-2005 Other Standard Approach  Find where line intersects plane of triangle  Check if it’s on the segment  Find if that point is inside the triangle Use barycentric coordinates  Slightly slower, but worse: less robust round-off error in intermediate result: the intersection point What happens for a triangle mesh?  Note the predicate approach, even with floating- point, can handle meshes well Consistent evaluation of predicates for neighbouring triangles

6cs533d-winter-2005 Distance to Triangle  If surface is open, define interference in terms of distance to mesh  Typical approach: find closest point on triangle, then distance to that point Direction to closest point also parallel to natural normal  First step: barycentric coordinates Normalized signed volume determinants equivalent to solving least squares problem of closest point in plane  If coordinates all in [0,1] we’re done  Otherwise negative coords identify possible closest edges  Find closest points on edges

7cs533d-winter-2005 Testing Against Meshes  Can check every triangle if only a few, but too slow usually  Use an acceleration structure: Spatial decomposition: background grid, hash grid, octree, kd-tree, BSP-tree, … Bounding volume hierarchy: axis-aligned boxes, spheres, oriented boxes, …

8cs533d-winter-2005 Moving Triangles  Collision detection: find a time at which particle lies inside triangle  Need a model for what triangle looks like at intermediate times Simplest: vertices move with constant velocity, triangle always just connects them up  Solve for intermediate time when four points are coplanar (determinant is zero) Gives a cubic equation to solve  Then check barycentric coordinates at that time See e.g. X. Provot, “Collision and self-collision handling in cloth model dedicated to design garment", Graphics Interface’97

9cs533d-winter-2005 For Later…  We now can do all the basic particle vs. object tests for repulsions and collisions  Once we get into simulating solid objects, we’ll need to do object vs. object instead of just particle vs. object  Core ideas remain the same

10cs533d-winter-2005 Elasticity

11cs533d-winter-2005 Elastic objects  Simplest model: masses and springs  Split up object into regions  Integrate density in each region to get mass (if things are uniform enough, perhaps equal mass)  Connect up neighbouring regions with springs Careful: need chordal graph  Now it’s just a particle system When you move a node, neighbours pulled along with it, etc.

12cs533d-winter-2005 Masses and springs  But: how strong should the springs be? Is this good in general? [anisotropic examples]  General rule: we don’t want to see the mesh in the output Avoid “grid artifacts” We of course will have numerical error, but let’s avoid obvious patterns in the error

13cs533d-winter D masses and springs  Look at a homogeneous elastic rod, length 1, linear density   Parameterize by p (x(p)=p in rest state)  Split up into intervals/springs 0 = p 0 < p 1 < … < p n = 1 Mass m i =  (p i+1 -p i-1 )/2 (+ special cases for ends) Spring i+1/2 has rest length and force

14cs533d-winter-2005 Figuring out spring constants  So net force on i is  We want mesh-independent response (roughly), e.g. for static equilibrium Rod stretched the same everywhere: x i =  p i Then net force on each node should be zero (add in constraint force at ends…)

15cs533d-winter-2005 Young’s modulus  So each spring should have the same k Note we divided by the rest length Some people don’t, so they have to make their constant scale with rest length  The constant k is a material property (doesn’t depend on our discretization) called the Young’s modulus Often written as E  The one-dimensional Young’s modulus is simply force per percentage deformation

16cs533d-winter-2005 The continuum limit  Imagine ∆p (or ∆x) going to zero Eventually can represent any kind of deformation [note force and mass go to zero too] If density and Young’s modulus constant,

17cs533d-winter-2005 Sound waves  Try solution x(p,t)=x 0 (p-ct)  And x(p,t)=x 0 (p+ct)  So speed of “sound” in rod is  Courant-Friedrichs-Levy (CFL) condition: Numerical methods only will work if information transmitted numerically at least as fast as in reality (here: the speed of sound) Usually the same as stability limit for good explicit methods [what are the eigenvalues here] Implicit methods transmit information infinitely fast