1Notes. 2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously.

Slides:



Advertisements
Similar presentations
Surface Area and Surface Integrals
Advertisements

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.
Geometry Primer Lines and rays Planes Spheres Frustums Triangles Polygon Polyhedron.
Computational Geometry & Collision detection
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
1cs533d-term Notes  Assignment 1 due today.
1Notes. 2Heightfields  Especially good for terrain - just need a 2d array of heights (maybe stored as an image)  Displacement map from a plane  Split.
1cs533d-term Notes  For using Pixie (the renderer) make sure you type “use pixie” first  Assignment 1 questions?
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-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  Textbook: matchmove 6.7.2, B.9. 2 Match Move  For combining CG effects with real footage, need to match synthetic camera to real camera: “matchmove”
1Notes  Demetri Terzopoulos talk: Thursday, 4pm Dempster 310.
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.
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
1cs533d-winter-2005 Notes  More optional reading on web for collision detection.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
2003 by Jim X. Chen: Introduction to Modeling Jim X. Chen George Mason University.
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.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
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.
Physics for Scientists and Engineers II, Summer Semester 2009 Lecture 2: May 20 th 2009 Physics for Scientists and Engineers II.
1cs533d-term Notes  list Even if you’re just auditing!
Ray Tracing Outline For each pixel { Shoot ray r from eye to center of pixel with trace( r ) } function trace( r ) For each object { Find object with closest.
1cs533d-term Notes  Typo in test.rib --- fixed on the web now (PointsPolygon --> PointsPolygons)
Cornell CS 468Andrew Butts 1 Implementing Particle Systems CS 468 Spring 2004 Andrew Butts.
3D Geometry for Computer Graphics
Chapter 16 Integration of Ordinary Differential Equations.
Geometry is everywhere by : Laura González  Solid figures are 3D figures that have length, width and heigth.  For example :  Sphere Faces:0 Vertices:0.
Computer graphics & visualization Collision Detection – Narrow Phase.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Week 13 - Wednesday CS361.
GEOMETRY.
Basic Geometry Vocabulary Review.
Angles Type of angle: Acute: An Angle less than 90 degrees Right angle: An angle that is 90 degrees Obtuse angle: An angle more than 90 degrees Straight.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
COMP 175: Computer Graphics March 24, 2015
Erin Catto Blizzard Entertainment Numerical Integration.
GEOMETRY PRETEST REVIEW Reviewing skills needed to succeed in Geometry. Day 1.
 Congruent Segments – › Line segments that have the same length.  Midpoint – › The point that divides a segment into two congruent segments.  Segment.
CS 325 Introduction to Computer Graphics 04 / 26 / 2010 Instructor: Michael Eckmann.
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
10-4 Surface Areas of Pyramids and Cones
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
CSE554Fairing and simplificationSlide 1 CSE 554 Lecture 6: Fairing and Simplification Fall 2012.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
1 Dr. Scott Schaefer Intersecting Simple Surfaces.
Basic Ray Tracing CMSC 435/634.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Computer Game Design and Development
By Kendal Agbanlog 6.1-Measurement Formulas and Monomials 6.2-Multiplying and Dividing Monomials 6.3-Adding and Subtracting Polynomials 6.4-Multiplying.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
3D Object Representations 2011, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Section 12-1 Exploring Solids. Polyhedron Three dimensional closed figure formed by joining three or more polygons at their side. Plural: polyhedra.
Welcome to our sixth seminar! We’ll begin shortly.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Time-dependent Shapes (II). IntroductionIntroduction Collision detection for time dependent parametric surfaces that are continuous and bounded in derivatives.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Chapter 4.2 Collision Detection and Resolution
Surface Area and Volume
Computer Animation Algorithms and Techniques
GPAT – Chapter 7 Physics.
Presentation transcript:

1Notes

2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously Forward Euler and Symplectic Euler are easy to implement - how do they fare in other ways?

3Stability  Do the particles fly off to infinity?  Particularly a problem with stiff springs  Can always be fixed with small enough time steps - but expensive!  Basically the problem is extrapolation:  From time t we take aim and step off to time t+∆t  Called “explicit” methods  Can turn this into interpolation:  Solve for future position at t+∆t that points back to time t  Called “implicit” methods

4 Backward Euler  Simplest implicit method: very stable, not so accurate, can be painful to implement  Again, can use for both 1st order and 2nd order systems  Solving the system for x n+1 often means Newton’s method (linearize as in Gauss-Newton)

5 Simplified Backward Euler  Take just one step of Newton, i.e. linearize nonlinear velocity field:  Then Backward Euler becomes a linear system:

6 Particle Collisions  Usually don’t want particles to go through other objects  In 1st order case (given velocity field) need to change velocity field to avoid collision  Can work out special case formulas to make particles stream around object  More generally, add a repulsion force field  As particle distance decreases, normal force outward from object increases

7 Aside: Object Geometry  When we talk about particles colliding with objects, need to know how to represent objects, and how to answer:  Is particle inside/outside?  Does particle trajectory cross?  Object normal at some point on surface?  Distance/direction to surface in space?  Standard representations:  Special geometry: plane, sphere, cylinder, prism…  Heightfield: y=h(x,z)  Triangle mesh, closed or open  Implicit function  Level set (special case)

8Plane  Represent with a point p on the plane, and the (outward) normal n of the plane  Often simply p=0, n=(0,1,0) --- the ground  Particle x inside: (x-p)n<0  Trajectory cross: does (x-p)n change sign?  Object normal: always n  Distance to surface: if n is unit length, (x-p)n is “signed distance”  |(x-p)n| is regular distance  n or -n is direction to closest point on surface (-n if x is outside)

9Sphere  Represent with a centre point p and a radius r  Particle inside: |x-p|-r<0  Trajectory cross: complicated!  Need to solve quadratic equation for intersection of straight line trajectory…  Outward object normal: (x-p)/r  Signed distance: |x-p|-r  Direction to closest point on surface: ±(x-p)/|x-p|  Sign depends on inside/outside  Beware of divide by zero at x=p  Note: matches up with normal again!

10Heightfields  Especially good for terrain - just need a 2d array of heights (maybe stored as an image)  Displacement map from a plane  Split up plane into triangles  Particle inside:  Figure out which triangle (x,y) belongs to, check z against equation of triangle’s plane  Trajectory cross (stationary heightfield):  Check all triangles along path (use 2d line-drawing algorithm to figure out which cells to check)  Object normal: get from triangle  Distance etc.: not so easy, but vertical distance easy for shallow heightfields

11 Triangle mesh  For any decent size, need to use an acceleration structure  Could use background (hash-)grid, octree, kd-tree  Also can use bounding volume (BV) hierarchy  Spheres, axis-aligned bounding boxes, oriented bounding boxes, polytopes, …  More exotic structures exist…  Particle inside (closed mesh):  Shoot a ray out to infinity, count the number of crossings  Trajectory cross (stationary mesh):  For each candidate triangle (from acceleration) check a sequence of determinants

12 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 define  Det(a,b,c)=±6 volume(tet(a,b,c)), the signed volume of the tetrahedron spanned by edges a,b,c from a common point  Sign flips when tetrahedron reflected, or alternatively from right-hand-rule on a  bc  Triangle intersection boils down to  2 sign checks: segment crosses plane  3 sign checks: line goes through triangle

13 Triangle Mesh (more)  Object normal  Normalize cross-product of two sides of the triangle  Distance from single triangle  Find barycentric coordinates -- solve a least- squares problem  Need to clip to sides of triangle  Compute distance from that point  Note: also gives direction to closest point  Distance (and direction) from mesh  Compute for all possible triangles, take minimum  Trick is to find small list of possible triangles with acceleration structure