Developing An Educational Rigid Body Dynamics Physics Engine By Neal Milstein.

Slides:



Advertisements
Similar presentations
AP Physics C Mechanics Review.
Advertisements

A Workflow Engine with Multi-Level Parallelism Supports Qifeng Huang and Yan Huang School of Computer Science Cardiff University
Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica By Peter Woolf University of Michigan Michigan Chemical Process Dynamics.
Review Chap. 8 Momentum, Impulse, and Collisions
Developing Computer Simulations Using Object Oriented Programming. The Three Body Problem: A Case Study Mike O’Leary & Shiva Azadegan Towson University.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
Rotational Equilibrium and Rotational Dynamics
© 2005 Pearson Prentice Hall This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their.
Dynamics of Articulated Robots Kris Hauser CS B659: Principles of Intelligent Robot Motion Spring 2013.
Course Outline 1.MATLAB tutorial 2.Motion of systems that can be idealized as particles Description of motion; Newton’s laws; Calculating forces required.
GridFlow: Workflow Management for Grid Computing Kavita Shinde.
Game Physics Chris Miles. The Goal To learn how to create game objects with realistic physics models To learn how to simulate aspects of reality in order.
Chapter 6 Momentum and Collisions. Momentum The linear momentum of an object of mass m moving with a velocity v is defined as the product of the mass.
A Visualization System For Mineral Elasticity Richard Perkins.
Motion Map: Image-based Retrieval and Segmentation of Motion Data EG SCA ’ 04 學生 : 林家如
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
CE 1501 CE 150 Fluid Mechanics G.A. Kallio Dept. of Mechanical Engineering, Mechatronic Engineering & Manufacturing Technology California State University,
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
Computer graphics & visualization Rigid Body Simulation.
User Interface Programming in C#: Direct Manipulation Chris North CS 3724: HCI.
Linear Momentum and Collisions
Senior Project – Computer Engineering Integrated Workout Shoe Peter Katlic Advisor – Prof. Cotter Development: Consisting of an 8051 microcontroller.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Physically Based Animation.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Prof. Name Position (123) University Name Chapter 1: Introduction Spreadsheet-Based Decision Support Systems.
Java: Chapter 1 Computer Systems Computer Programming II.
_ Linear momentum and its conservation _ Impulse and momentum _ Collisions _ Two-dimensional collisions _ Center of mass _ Systems of particles. Momentum.
Model-View-Controller Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Chapter 9: Rotational Dynamics
Review for Test #3  Responsible for: - Chapters 9 (except 9.8), 10, and 11 (except 11.9) - The spring (6.2, 7.3, ) - Problems worked in class,
Lecture Fall 2001 Physically Based Animation Ordinary Differential Equations Particle Dynamics Rigid-Body Dynamics Collisions.
Momentum The linear momentum of an object of mass m moving with a velocity is defined as the product of the mass and the velocity SI Units are kg m / s.
Chapter 17 PLANE MOTION OF RIGID BODIES: ENERGY AND MOMENTUM METHODS
Developing An Educational Rigid Body Dynamics Physics Engine By Neal Milstein.
Detail-Preserving Fluid Control N. Th ű rey R. Keiser M. Pauly U. R ű de SCA 2006.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Chapter 6 Momentum and Collisions. Momentum The linear momentum of an object of mass m moving with a velocity is defined as the product of the mass and.
Chapter 6 Momentum and Collisions. Momentum The linear momentum of an object of mass m moving with a velocity is defined as the product of the mass and.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Chapter 6 Momentum and Collisions. Momentum The linear momentum of an object of mass m moving with a velocity v is defined as the product of the mass.
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Linear Momentum and Collisions
Raymond A. Serway Chris Vuille Chapter Six Momentum and Collisions.
Linear Momentum & Center of Mass. Introduction  Collisions  Impulse and Linear Momentum Single Collision Series of Collisions  Momentum and Kinetic.
Rigid Body Dynamics: A Graphical Simulation Eugene Paik
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Graphical Display of a Physics Simulation Steven Oetjen TJHSST Computer Systems Lab
Havok Xtra Training
Particle Kinematics Direction of velocity vector is parallel to path Magnitude of velocity vector is distance traveled / time Inertial frame – non accelerating,
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
PHY 151: Lecture 9B 9.5 Collisions in Two Dimensions 9.6 The Center of Mass 9.7 Systems of Many Particles 9.8 Deformable Systems 9.9 Rocket Propulsion.
Research and Development of a Physics Engine by Timmy Loffredo.
Advanced Computer Graphics Rigid Body Simulation
Physically Based Simulations For Games
Graphical Display of a Physics Simulation
Manipulator Dynamics 1 Instructor: Jacob Rosen
Mechanics Review – SEMESTER 1
Rigid Body Dynamics Simulation
Class Notes 19: Numerical Methods (2/2)
Building Graphical User Interface with Swing a short introduction
Manipulator Dynamics 2 Instructor: Jacob Rosen
Computer Animation Algorithms and Techniques
TJHSST Systems Lab Rigid Body Dynamics Simulation
GPAT – Chapter 7 Physics.
Kinetic Energy and Work
Presentation transcript:

Developing An Educational Rigid Body Dynamics Physics Engine By Neal Milstein

Abstract Goal of Project: To create a rigid-body dynamics physics engine in order to allow physics students to visualize and solve physics models. Rigid-body dynamics: The study of the motion of non- deformable, free-moving bodies through space.

Abstract (continued) Engine Focus on accuracy and speed Algorithms Used: Runge-Kutta 4, Separate Axis Theorem, collision response Interface Focus on education, straightforwardness, and free flow

Introduction Proper visualization of physical models required to properly understand physics concepts. Computers are used because they replace real-life simulations and have less error margin My project: simulates rigid bodies and their interactions in two-dimensional space

Micro vs. Macro Physics engines – Present the unique problem of combining small-scale physical rigid-body oriented interactions with large-scale physics engine design Micro – Small-scale interactions, algorithms, and designs. e.g. Separate Axis Theorem, Hooke’s Law Macro – Large-scale design paradigms, architectural patterns. e.g. model-view-controller, separation of interactions from graphics.

Background - Separating Axis Theorem A line can always be drawn between two concave non- intersecting bodies What this means: objects are colliding if and only if all separating axes are colliding

Background – Runge-Kutta 4 Integration Uses weighted average of past slope measurements to estimate h, the best slope estimate for the differential equation at the given time interval. Much more accurate then Euler’s method, especially over large time step. Can be used in combination with optimization techniques to calculate differential over many objects.

Development – Model-View- Controller Separated into Model, View, and Controller (MVC design) Model - Storage structure for physical components. Includes ways components are grouped and their connections with each other. View - GUI to which components are displayed. Reads component models and outputs them to screen. Includes User Interface Controller - Manipulates Models and prepares them for the view. Includes physics engine and physical interactions between models.

Development – First step: Model Model, underlying structure of physical objects, was developed first. Made up of classes that store information, with not too many functional methods (by design)

Example of a Model Class package model; public abstract class Body extends Element implements Referenceable, Massable, Anchorable, Collideable { protected Reference reference; protected double mass; protected boolean isAnchored; private boolean colliding = false; public Body(Reference reference, double mass) { this.reference = reference; this.mass = mass; isAnchored = false; } public Body(Reference reference, double mass, boolean isAnchored) { this.reference = reference; this.mass = mass; this.isAnchored = isAnchored; } public void addForce(double forceMag, Vector direction) { double acceleration = forceMag / mass; this.getReference().addAcceleration(new Vector(acceleration, direction)); } /*... */ }

Development – Controller Implementation Increases time step Cycles through Interacter objects and calls their interact() method Passes the model as an argument to the Graphical User Interface Some current Interacters: CollisionInteracter (Separating Axis Theorem) SpringInteracter (Hooke’s Law) ReferenceableInteracter (Runge-Kutta 4)

Example of an Interacter Class public class SpringInteracter extends Interacter { public SpringInteracter(Model model) { super(model); } public void interact() { for (Element e : model) { if (e instanceof Spring) { Spring s = (Spring)e; double forceMag = s.getForce(); Vector direction = s.getBodyA().getReference().getPosition().minus(s.getBodyB().getReference().getPosition( )); s.getBodyA().addForce(forceMag, direction); s.getBodyB().addForce(forceMag, direction.getNegative()); }

Development - View Graphical User Interface View.render(Model model) method called every time step View draws the model to the screen Also contains interface buttons that feed commands back to the controller

Results Easily create new simulations just by drawing the objects to the GUI or programmatically defining them Demonstrated Conservation of Energy – Center of Mass always in center of screen.

Functionality Detect Collisions via the Separate Axis Theorem – collision response (dynamics) on the way Simulate tension interactions with Hooke’s Law 2-D motion accurate due to Runge- Kutta 4 Draw Bodies on screen, have them connected with springs Simulate any number of bodies in any configuration

Testing Results Online models of predefined physics problems Physics textbook problems that can be solved by hand Testing Conservation of Energy or Momentum

Conclusions If properly modularized, physics engines can be expandable and scalable. Key is in separation of programming areas (model from view from controller) Many physics formulas take new forms in computers.