Physically Based Modeling PowerPoint PPT Presentation

presentation player overlay
1 / 10
About This Presentation
Transcript and Presenter's Notes

Title: Physically Based Modeling


1
Physically Based Modeling
  • Let physics take over!

2
Physically Based Modeling
  • Account for forces in system
  • Account for object interaction, e.g. friction,
    collision

3
Spring-Mass-Damper
  • Model jello, cloth, muscle
  • Have gravity add mass to vertices
  • Have stability (add stiffness to flag pole)
  • Put springs on each vertex, allowing to stretch a
    finite amount
  • Another use angular springs on polygon corners
    to prevent self-penetration
  • Numerical integration for animation

4
Governing Equations
  • Hookes Law (for graphics)Fs ks(dist-len)
    where
  • len rest length
  • dist current length
  • ks spring constant
  • Fij -Fji ks(distij(t) lenij)dij
  • Where dij unit vector along i-j
  • t time
  • Fs S Fij (sum of all edges coming out of a
    vertex)

F
V1
E12
E31
V3
V2
E23
Look at neighbors when calculating spring force!
V
5
Damping Force Angular Springs
  • FD -kd v(t)
  • Damper force is proportional to velocity
  • and acts in direction opposite to velocity
  • NET FORCEF Fs Fd ks(dist-len) -kd v(t)

M2
M1
  • Angular spring t (torque) ks?(t) -?(rest) -
    kd?(t)

6
Object Representation
  • Vertices mass
  • Edges
  • Spring, damping constant
  • Resting length
  • Vertex IDs
  • Each vertex has
  • Current position
  • Current velocity
  • Current acceleration
  • Mass
  • Number of edges

X, Y, Z components
7
How it all comes together
  • Use Newtons Law (F ma) to calculateacceleratio
    n for every vertex(big system of linear
    equations)
  • Basic strategy accumulate acceleration from
    different sources (Gravity, Spring, Damper) and
    integrate 2 times to get velocity and position
  • Can use Runge-Kutta, for example
  • For project you can use xspringies (2D) ODE
    library or other library you can find or roll
    your own
  • Make sure to cite your sources

8
Details (source Paul Bourke)
  • Create the particles
  • Create the springs between the particles
    Initialize the particle and spring parameters
  • loop in time
  • Update the particle positions (solve ODEs)
    Display the results somehow

9
Update Particle Positions
  • Calculate force at each point
  • Add Positive force Forcemass for each X,Y,Z
  • Subtract Drag dragvelocity for each X,Y,Z
  • Handle spring interaction
  • For each spring
  • For each of X,Y,Z of attached points
  • Force Hookes law
  • Force damping constant(?velocity of
    points)(?len of points in direction)/lenx,y,z
  • Force -(?len of points)/lenx,y,z
  • Add or subtract force to/from point (if the point
    is not fixed)

10
Calculate derivatives for points
  • We already have velocities
  • dpx/dt velocityx
  • Velocity derivative
  • dvx/dt forcex/mass
  • And solve with your favorite ODE solver
    (Runge-Kutta..)
  • Update positions
  • Update velocity
Write a Comment
User Comments (0)
About PowerShow.com