3d physical simulation n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
3D Physical Simulation PowerPoint Presentation
Download Presentation
3D Physical Simulation

Loading in 2 Seconds...

play fullscreen
1 / 22

3D Physical Simulation - PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on

3D Physical Simulation. Cao Han D-A7-2819-0 Project Supervisor: Dr. Wu Wen Faculty of Science and Technology University of Macau. Outline. Part I: construct a Newton’s cradle by a physical engine and the C++ language. Principle of physical simulation Newton’s cradle analysis

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '3D Physical Simulation' - bedros


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
3d physical simulation

3D Physical Simulation

Cao Han

D-A7-2819-0

Project Supervisor: Dr. Wu Wen

Faculty of Science and Technology

University of Macau

outline
Outline
  • Part I: construct a Newton’s cradle by a physical engine and the C++ language.
    • Principle of physical simulation
    • Newton’s cradle analysis
    • Collision detection
    • Numerical Computation
    • Deformable body simulation
outline cont
Outline (cont.)
  • Part II: implement a Newton’s cradle with haptic feedback
    • Interaction with Newton’s cradle
    • Scenes Switching
    • Cutting Ropes
    • Haptic Feedback
    • Spring Effects
  • Conclusion
principle of simulation
Principle of Simulation
  • Problem: Given the physical environment, tofind the position of the object
newton s cradle analysis
Newton’s cradle analysis

Problem: how to compute

the sumforce

Drag Force

Gravity

Drag Force provide centripetal force

Drag Force = centripetal force(1/2mv^2) + the subforce of gravity along the rope

collision detection
Collision Detection

Problem: Detects if two balls

collide

If Distance < 2 * radius

Collision Happen

collision detection cont
Collision Detection (cont.)

Energy and Momentum keeps the conservation in the system

Center line

b

a

: the mass of body a : the mass of body b

: the velocity of a before the collision : the velocity of bbefore the collision

along the rope along the rope.

: the velocity of a after the collision : the velocity of b after the collision

along the rope along the rope

numerical computation
Numerical Computation
  • The Euler Method
  • The Fourth-order Runge-Kutta (RK4) Method

Problem: given the acceleration, calculate the position every dt time

the euler method
The Euler Method

T=92

Ball

Real motion

T=198

Euler Method

T=244

the fourth order runge kutta rk4 method
The Fourth-order Runge-Kutta (RK4) Method

T=66

Ball

Real motion

RK4

T=90

T=306

Euler Method

deformable body simulation
Deformable Body Simulation

Rope

Spring Force

Which indicates the force direction

A particle

SpringForce = - Distance * SpringConstant

FrinctionForce = - Velocity * FrictionalConstant

part ii i mplement a newton s cradle with haptic feedback
Part II: Implement a Newton’s cradle with haptic feedback
  • Interaction with Newton’s cradle
  • Handle Mirror Reflection Problem
  • Cutting Ropes
  • Haptic Feedback
  • Spring Effects
  • User Interface

Sensable Phantom Desktop

interaction with newton s cradle
Interaction with Newton’s Cradle

mass

ballCount

stringLength

globalCreation

->Create()

Main.x3d

(Update)

UI.x3d

UI.py

bounce

damping

ballRadius

Damping, mass, ballCount, stringLength,

Bounce, ballRadius, bounce:

Parameters of Newton’s cradle controlled by

UI components

Main.x3d: main modeling file

UI.x3d : file used for modeling UI

UI.py : to pass messages between UI components

handle mirror reflection problem
Handle Mirror Reflection Problem

Mirror Reflection

Scene 1

Scene 2

Scene 3

Scene 4

Scene 5

Scene 6

Transparent Objects

Problem of Mirror Reflection

Problem : <PlanReflection> have a bug

handle mirror reflection problem cont
Handle Mirror Reflection Problem (cont.)

Mirror Reflection

Scene 1

Scene 2

Scene 3

Scene 4

Scene 5

Scene 6

1. decrease the size of transparent objects

2. untransparentize the objects

1. recover the size of objects

2. transparentize the objects

cutting ropes
Cutting Ropes

The cylinders for receiving the mouse event

Multiple Cuts

Single Cut

Cutting Rope = Delete node <SingleAxisHingeJoint />

haptic feedback
Haptic Feedback

SmoothSurface

DepthMapSurface

HapticTexturesSurface

MagneticSurface

FrictionalSurface

OpenHapticsSurface

Make the geometry touchable by defining a touchable surface to the geometry

<SmoothSurface/>

spring effect
Spring Effect

Which indicates the force direction

SpringForce = - Distance * SpringConstant

FrinctionForce = - Velocity * FrictionalConstant

SpringConstant = 30

FrictionalConstant = 10

Start: Button Event

& Object is touched

End: Button Event

Special: the feedback of the device would be provided by node < SpringEffect >

Spring Effect with Mouse

Spring Effect with Haptic Device

play sound
Play Sound
  • Requirements
    • Two stationary bodies: no sound
    • The sound function can adjust the volume of the sound according to the intensity of the collision.
play sound cont
Play Sound (cont.)

Collision History

…,…,…

Ball, Board, CollisionTime

…,…,…

…,…,…

…,…,…

  • Two stationary bodies: no sound

…,…,…

If Bodies are new

Then play sound

Else if last collision time+0.01 < Current Collision time

Then Play Sound

play sound cont1
Play Sound (cont.)
  • The sound function can adjust the volume of the sound according to the intensity of the collision.

Compute the subtraction of velocities on the direction of the center line and map it to 0~1 range to represent the intensity

Center line

conclusion
Conclusion
  • A Newton’s cradle has been constructed by a physical engine we design.
  • A Newton’s cradle with haptic feedback has been implemented by H3D.
  • I get lots of experiences about haptic programming and 3D physical simulation. With these experience, I will still work hard in the further study