Download presentation
Presentation is loading. Please wait.
Published byMary Gardner Modified over 9 years ago
1
DYNAMICS Part 2 HOW DOES IT WORK?? by Willis Louie Jianfei Liao
2
Arcade Game - 1942
3
Presentation Milestone Presentation 1 What is a Physics Engine? Presentation 1 What is a Physics Engine? Presentation 2 How Does It Work? Presentation 2 How Does It Work? Presentation 3 Integration Presentation 3 Integration Presentation 4 Testing and Documentation Presentation 4 Testing and Documentation
4
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
5
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
6
Question: Question: How to implement the physics? How to implement the physics? Answer: Answer: Physics simulation Physics simulation
7
Simulation Process 1) Create a dynamic world 1) Create a dynamic world 2) Create dynamics bodies 2) Create dynamics bodies 3) Initializations 3) Initializations 4) Step forward in the world 4) Step forward in the world
8
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
9
Our Timeline
10
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
11
Applying Physics In order to apply physics we need to know the object properties and attributes In order to apply physics we need to know the object properties and attributes Objects Objects Joints Joints Collision Collision
12
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
13
Object Properties position vector(x,y,z) – shape,size position vector(x,y,z) – shape,size linear velocity(vx,vy,vz) – movement linear velocity(vx,vy,vz) – movement Orientation – rotation,direction Orientation – rotation,direction Total body mass Total body mass Center of mass(and inertia matrix) Center of mass(and inertia matrix)
14
Object Properties Geometry objects + Rigid body = simulated object Shape, etc Mass, etc
15
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
16
Joints, Joints, Joints!!! Joints (relationship between bodies) Joints (relationship between bodies) Can move or turn a certain way only Can move or turn a certain way only Different joints (human vs. robot) Different joints (human vs. robot) Ball, socket, universal joints, etc Ball, socket, universal joints, etc Joints must connect, if not they fly off Joints must connect, if not they fly off Constraint force mixing for soft material Constraint force mixing for soft material
17
TABLE OF CONTENT 1) Implementation 1) Implementation 2) Timeline / Current Status 2) Timeline / Current Status 3) Concepts 3) Concepts Objects Objects Joints Joints Collision Collision
18
Collision
19
Collision Why must we have it?
20
PING’S LAW Object A crashing into object B = EXPLOSION EXPLOSION = EXCITEMENT
21
Collision Detection collision detection engine collision detection engine collision detection function – touching or not? collision detection function – touching or not? Checks for contact points Checks for contact points Each contact point creates a contact joint Each contact point creates a contact joint To see what reaction should occur, To see what reaction should occur, Hard or soft, explode or bounce off Hard or soft, explode or bounce off
22
Collision Detection Each contact point creates a contact joint Each contact point creates a contact joint To see what reaction should occur, To see what reaction should occur, Hard or soft, explode or bounce off Hard or soft, explode or bounce off
23
Collision Detection Loop Loop Apply forces Apply forces Adjust joints Adjust joints Collision detection Collision detection Create contact joints Create contact joints Carry out action Carry out action Remove all contact joints Remove all contact joints
24
So…How does it work? Create the world Create the world Using attributes to simulate objects Using attributes to simulate objects Using joints to built complex objects Using joints to built complex objects Check the collision detection Check the collision detection Check the contact joints Check the contact joints If hit blow it up If hit blow it up
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.