Presentation is loading. Please wait.

Presentation is loading. Please wait.

Time-dependent Shapes (I). IntroductionIntroduction In physical simulation collisions occur when two objects move through space and hit one another In.

Similar presentations


Presentation on theme: "Time-dependent Shapes (I). IntroductionIntroduction In physical simulation collisions occur when two objects move through space and hit one another In."— Presentation transcript:

1 Time-dependent Shapes (I)

2 IntroductionIntroduction In physical simulation collisions occur when two objects move through space and hit one another In physical simulation collisions occur when two objects move through space and hit one another Whenever two objects attempt to inter-penetrate each other, it is called as a collision. The related issue is response to collisions once they are detected Whenever two objects attempt to inter-penetrate each other, it is called as a collision. The related issue is response to collisions once they are detected A straightforward method of collision detection involves the solution of a sequence of static problems one per time step A straightforward method of collision detection involves the solution of a sequence of static problems one per time step ballmovie2.avi ballmovie2.aviballmovie2.avi

3 What is a Motion?

4 Definition of an Object ’ s Configuration The configuration of an object is a specification of the positions of all the points in this object relative to a fixed coordinate system The configuration of an object is a specification of the positions of all the points in this object relative to a fixed coordinate system Usually it is expressed as a “vector” of position and orientation parameters Usually it is expressed as a “vector” of position and orientation parameters q1q1q1q1 q2q2q2q2 q3q3q3q3 qnqnqnqn q=(q 1,…,q n )

5 Rigid Object Example x y  reference point robot reference direction workspace Object’s configuration is: q = (x,y,  ) Object’s configuration is: q = (x,y,  ) In a 3-D workspace q would be of the form (x,y,z,  )

6 Disc Robot in 2-D Workspace

7 C-Obstacle for Articulated Robot

8 Collision detection Illustration of a time- dependent shape

9 Collision detection for particles Consideration of a problem of nonoverlapping arrangements of D-dimensional spheres, D = 1,2,3, confined to a “rectangular” region  d of size L 1 xL 2 x...xL D leads to search of an interaction time of particles Let the center positions of the N spheres in  d be denoted by the set of vectors r 1...r N. For two spheres with the diameters a 1 and a 2, interaction time t is the least positive real solution of the equation At 2 + 2Bt +C =0, which is derived from |r +vt| 2 = (a 0 t) 2, where a 0 = a 1 + a 2

10 Collision detection for polygons A correct test must consider edges and triangles However, in many cases merely testing points versus triangles produces acceptable results Polygon-polygon collision detection is performed by testing for the penetration of each vertex point of one polygon through the plane of the other and by checking that no two edges intersect

11 Collision detection for polygons Figure illustrates path point and triangle intersection This technique is used to detect collision between flexible surfaces. Two cases are considered depending on whether the surface polygon is fixed or moving

12 Collision detection for polygons When the surface polygon is fixed [a triangle with vertices (P 0,P 1,P 2 )], the parametric vector equation is given by P + (P’ - P)t = P 0 + (P 1 - P 0 )u + (P 2 - P 0 )v, where P and P’ are the beginning and ending position of the point, u and v are the parametric variables for the plane defined by the triangle and t is a time variable for the simulation step By solving this system for t, u,v one determines whether the point has intersected the triangle during the time step by checking the conditions 0  t  1, u  0, and u + v  1

13 Collision detection for polygons moving, When the surface polygon is moving, the following parametric vector equation is setup: P + V t = P 0 + V 0 t +((P 1 - P 0 ) + (V 1 - V 0 )t)u + ((P 2 - P 0 ) + (V 2 - V 0 )t)v, where P is the point with velocity V per time step, V 0, V 1, V 2 are the respective velocities of the points P 0, P 1, P 2 If we eliminate u and v from the three component equations, we get a fifth order polynomial in t, which can be solved numerically. Each value of t thus arrived at is used to get values for u and v by back substitution, and then the standard 0  t  1, u  0, and u + v  1 conditions are used to determine whether a collision has occurred.

14 Collision detection for convex polyhedra The two polyhedra are assumed to be convex ones; concave polyhedra can be decomposed into collections of convex ones The method for detecting collisions is based on the Cyrus- Beck clipping algorithm The two-dimensional Cyrus-beck algorithm tells whether a point is inside a convex polygon. It takes the dot product of each side’s outward normal vector (n) with a vector from some point (v) on the side to the point in question (p)

15 Collision detection for time dependent shapes Most algorithms described in the literature deal with rigid bodies and are based on some kind of hierarchical representations. The alternative approach is based on the idea of “ sensor particles ” Most algorithms described in the literature deal with rigid bodies and are based on some kind of hierarchical representations. The alternative approach is based on the idea of “ sensor particles ” Collision detection based on a particles paradigm between complex geometric objects represented by polygonal models and undergoing rigid motions is discussed Collision detection based on a particles paradigm between complex geometric objects represented by polygonal models and undergoing rigid motions is discussed Quite interesting that almost the same approach can be used in geometry modeling – mesh generation and inhancement Quite interesting that almost the same approach can be used in geometry modeling – mesh generation and inhancement

16 Examples of particles distribution (a) The model of Rocker Arm with randomly distributed particles (a) The model of Rocker Arm with randomly distributed particles (b) Final distribution of particles on the model of Rocker Arm (b) Final distribution of particles on the model of Rocker Arm (c) The Dragon model with randomly distributed particles (c) The Dragon model with randomly distributed particles (d) Final distribution of particles on the Dragon model (d) Final distribution of particles on the Dragon model

17 Sensor particles Sensor particles are interacting particles distributed on a surface Sensor particles are interacting particles distributed on a surface Two types of particles that interact in a special way are used for determining the minimum distance between two models Two types of particles that interact in a special way are used for determining the minimum distance between two models

18 Assumptions Each model has a surface that is for the most part plain Each model has a surface that is for the most part plain Face's adjacency information is available, i.e., there is a list of neighbor faces for each model point, or it can easily be created Face's adjacency information is available, i.e., there is a list of neighbor faces for each model point, or it can easily be created Adjacency information does not change during deformation, which means that bodies do not change their topology Adjacency information does not change during deformation, which means that bodies do not change their topology The model remains plain for the most part and the number of convex parts does not increase greatly during deformation The model remains plain for the most part and the number of convex parts does not increase greatly during deformation

19 Particle Interaction Radial attractive and repulsive forces act on particles Radial attractive and repulsive forces act on particles Unlike the law for electric charges, the laws for repulsive and attractive forces can be different Unlike the law for electric charges, the laws for repulsive and attractive forces can be different R eff is the effective radius of attraction R eff is the effective radius of attraction

20 Particle Interaction (cont) A) Initial position A) Initial position B) After one simulation step B) After one simulation step C) After one interaction step C) After one interaction step

21 Particles Movement In the simplest case, particles can be located only at vertices. In this case, we can easily calculate the potential of forces in every neighboring vertex and move a particle to the vertex where the potential has the minimum value In the simplest case, particles can be located only at vertices. In this case, we can easily calculate the potential of forces in every neighboring vertex and move a particle to the vertex where the potential has the minimum value This technique can be generalized for cases when the particle can be located on edges and faces This technique can be generalized for cases when the particle can be located on edges and faces

22 Collision Query At every collision query we turn on an interaction between particles and wait for the particle system to relax At every collision query we turn on an interaction between particles and wait for the particle system to relax Two numbers, Nmax and Nmin, are used to control a particle system to reach almost relaxed state. Nmax is the maximum total number of interaction steps and Nmin is the minimum number of moving particles. Therefore, we wait until either the number of particles moved in interaction step is less then Nmin or the number of interaction steps becomes equal to Nmax Two numbers, Nmax and Nmin, are used to control a particle system to reach almost relaxed state. Nmax is the maximum total number of interaction steps and Nmin is the minimum number of moving particles. Therefore, we wait until either the number of particles moved in interaction step is less then Nmin or the number of interaction steps becomes equal to Nmax

23 Collision Query (cont) The values of Nmin and Nmax depend on the model's geometry and number of particles n. Nmax should be approximately equal to the number of vertices between particles placed on the model. Experiments show that about 10% of particles, in average, are placed near equilibrium position. By this means Nmin should be about 10 times smaller then number of particles n The values of Nmin and Nmax depend on the model's geometry and number of particles n. Nmax should be approximately equal to the number of vertices between particles placed on the model. Experiments show that about 10% of particles, in average, are placed near equilibrium position. By this means Nmin should be about 10 times smaller then number of particles n

24 Collision Query (cont) The complexity of performing collision query is O(n 2 ). Since the number of particles n is essentially smaller than the number of polygons, this complexity allows us to perform fast collision queries even for models with a large number of polygons The complexity of performing collision query is O(n 2 ). Since the number of particles n is essentially smaller than the number of polygons, this complexity allows us to perform fast collision queries even for models with a large number of polygons Performance can also be noticeably improved, by using caching on the initial steps. If positional relationship changes slowly, the influence of distant particles remains almost constant. Thus we can efficiently cache this influence Performance can also be noticeably improved, by using caching on the initial steps. If positional relationship changes slowly, the influence of distant particles remains almost constant. Thus we can efficiently cache this influence

25 Results Illustration of particle distribution. Illustration of particle distribution. Benchmarks. Collision detection between two polygonal models of letters "W", defined by 11920 polygons, with 5 particles on each model. The average time needed to perform a collision detection query on active interval (queries nos. 950- 1984) was 12.67 ms., and the maximum time was 47 ms.; average time during the "warming" steps (queries nos. 1-49) was 12.06 ms., maximum time was 47 ms. also Benchmarks. Collision detection between two polygonal models of letters "W", defined by 11920 polygons, with 5 particles on each model. The average time needed to perform a collision detection query on active interval (queries nos. 950- 1984) was 12.67 ms., and the maximum time was 47 ms.; average time during the "warming" steps (queries nos. 1-49) was 12.06 ms., maximum time was 47 ms. also

26 Results (cont) Illustration of collision detection between two models undergoing deformations Illustration of collision detection between two models undergoing deformations collision_and_csrbf1. mpg collision_and_csrbf1. mpg collision_and_csrbf1. mpg collision_and_csrbf1. mpg

27 Motion of Rigid Bodies Under External Forces and Torques The general motion of a rigid body can be decomposed The general motion of a rigid body can be decomposed into a linear motion of a point mass equal to that of the body located at the center of mass of the body under an external force and into a linear motion of a point mass equal to that of the body located at the center of mass of the body under an external force and a rotational motion about the center of mass under an external torque. a rotational motion about the center of mass under an external torque. scrunchies_2160_comp.avi scrunchies_2160_comp.avi scrunchies_2160_comp.avi

28 Motion of Rigid Bodies Under External Forces and Torques The linear motion under a force F can be calculated by solving the set of coupled differential equations The linear motion under a force F can be calculated by solving the set of coupled differential equations V = F/m, X = V, where m is the mass of the object, X is the position vector, and V is the linear velocity

29 Motion of Rigid Bodies Under External Forces and Torques Euler Equations Euler Equations If we choose principal axes as the body fixed axes we get a set of simplified coupled first order differential equations for the angular velocity W, known as the Euler equations: If we choose principal axes as the body fixed axes we get a set of simplified coupled first order differential equations for the angular velocity W, known as the Euler equations: Ix Wx +(Iz -Iy)WzWy = Nx Iy Wy +(Ix -Iz)WxWz = Ny Iz Wz +(Iy -Ix)WyWx = Nz The x,y,z are the directions of the principal axes, I is the moment of inertia tensor of the body. It is important to realize that for any arbitrary shaped objects, one can find principal axes and the principal moments of inertia. The x,y,z are the directions of the principal axes, I is the moment of inertia tensor of the body. It is important to realize that for any arbitrary shaped objects, one can find principal axes and the principal moments of inertia.

30 Motion of Rigid Bodies Under External Forces and Torques Euler Equations Euler Equations These along with These along with Tx = Wx Ty = Wy Tz = Wz where Ts are the orientations in the principal axes coordinate, form a set which can be solved by a numerical technique such as Rung-Kutta method. where Ts are the orientations in the principal axes coordinate, form a set which can be solved by a numerical technique such as Rung-Kutta method.

31 Motion of Rigid Bodies Under External Forces and Torques Impact Dynamics Impact Dynamics When two bodies collide and the contact area of one of the bodies is locally planar, one can define the normal N to the tangent surface When two bodies collide and the contact area of one of the bodies is locally planar, one can define the normal N to the tangent surface Calculate the linear momentum p = mv Calculate the linear momentum p = mv And the torque  = r  F, where F is the force acting on the centre of mass And the torque  = r  F, where F is the force acting on the centre of mass

32 Penalty-based Multibody Animation In penalty-based multibody animation, a spring-damper system is used for penalizing penetrations. In penalty-based multibody animation, a spring-damper system is used for penalizing penetrations. A spring-damper system behaves like a harmonic oscilator in classical mechanics. A spring-damper system behaves like a harmonic oscilator in classical mechanics. Spring-damper models are even found in biomechanical muscle models. Spring-damper models are even found in biomechanical muscle models.

33 Penalty-based Multibody Animation The basics The basics The motion of a single rigid body is described in the Newton-Euler equations. The motion of a single rigid body is described in the Newton-Euler equations. The center of mass is given by r, the orientation is given by the quaternion q and the linear and angular velocities are given by v and  The center of mass is given by r, the orientation is given by the quaternion q and the linear and angular velocities are given by v and  One needs to find the values of the force F and torque  at a given instant in time in order to perform the numerical integration. One needs to find the values of the force F and torque  at a given instant in time in order to perform the numerical integration.

34 Penalty-based Multibody Animation The basics The basics In order to compute, the contact forces springs are inserted at all penetrations as shown in Figure In order to compute, the contact forces springs are inserted at all penetrations as shown in Figure The springs will try to remove the penetrations The springs will try to remove the penetrations The springs penalize penetrations The springs penalize penetrations

35 Penalty-based Multibody Animation The basics The basics The contact force from each point of contact is thus computed as a spring force. The contact force from each point of contact is thus computed as a spring force. Call the exernal contributions f and  and the i ’ th spring force f and . Call the exernal contributions f ext and  ext and the i ’ th spring force f spring and  spring. Now the total force an torque are computed as Now the total force an torque are computed as In case of gravity being the only external force, we have f = mg,  = 0. In case of gravity being the only external force, we have f ext = mg,  ext = 0.

36 Penalty-based Multibody Animation The basics The basics  The simulation loop of the penalty method can be summarized as Detect contact points Detect contact points Compute and accumulate spring forces Compute and accumulate spring forces Integrate equations of motion forward in time Integrate equations of motion forward in time  There are, however, several difficulties associated with it

37 Penalty-based Multibody Animation The basics The basics First of all it is not trivial to compute satisfactory contact normals or penetrating depths (lack of global knowledje). First of all it is not trivial to compute satisfactory contact normals or penetrating depths (lack of global knowledje).

38 Penalty-based Multibody Animation The basics The basics Some contact points like the face-face case appearing in a box stack is difficult to handle. Some contact points like the face-face case appearing in a box stack is difficult to handle. To alleviate this problem, researches have tried to sample the entire contact region with contact points. To alleviate this problem, researches have tried to sample the entire contact region with contact points.

39 Penalty-based Multibody Animation Modeling Friction Modeling Friction Friction is very imporatnt to seem physically plausible fo r a human observer. Friction is very imporatnt to seem physically plausible fo r a human observer. It seems reasonable to use a spring-damper system for friction force. It seems reasonable to use a spring-damper system for friction force. At first point of contact, an anchor point, a, is used. At first point of contact, an anchor point, a, is used. The friction is determined by the spring force stemming from the zero-length spring with spring coefficient k between the anchor point and the current position p of the contact point. The friction is determined by the spring force stemming from the zero-length spring with spring coefficient k between the anchor point and the current position p of the contact point. F friction = k(a – p).

40 Penalty-based Multibody Animation Modeling Friction Modeling Friction The general idea is illustrated in Figure The general idea is illustrated in Figure During the simulation we keep an eye on whether the following condition holds During the simulation we keep an eye on whether the following condition holds  F friction     F normal . Here  is the coefficient of friction. F normal is the normal force. Here  is the coefficient of friction. F normal is the normal force. If the condition is fulfilled we have static friction and we do nothing. If the condition is fulfilled we have static friction and we do nothing. On the other hand we have dynamic friction. On the other hand we have dynamic friction.


Download ppt "Time-dependent Shapes (I). IntroductionIntroduction In physical simulation collisions occur when two objects move through space and hit one another In."

Similar presentations


Ads by Google