Introduction to Procedural Methods, Particles Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March.

Slides:



Advertisements
Similar presentations
Section 2: Newton’s Law of Gravitation
Advertisements

Formal Computational Skills
Forces.
1 Computer Graphics Physical simulation for animation Case study: The jello cube The Jello Cube Mass-Spring System Collision Detection Integrators.
Falling Objects and Gravity. Air Resistance When an object falls, gravity pulls it down. Air resistance works opposite of gravity and opposes the motion.
Dynamics of Articulated Robots Kris Hauser CS B659: Principles of Intelligent Robot Motion Spring 2013.
1Notes. 2 Building implicit surfaces  Simplest examples: a plane, a sphere  Can do unions and intersections with min and max  This works great for.
1Notes  Textbook: matchmove 6.7.2, B.9. 2 Match Move  For combining CG effects with real footage, need to match synthetic camera to real camera: “matchmove”
1Notes  Text:  Motion Blur A.3  Particle systems 4.5 (and 4.4.1, 6.6.2…)  Implicit Surfaces  Classic particle system papers  W. Reeves, “Particle.
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
1cs426-winter-2008 Notes  If you’re interested, read Bridson, Hourihan, Nordenstam, “Curl noise for procedural fluid flow”, SIGGRAPH ‘07.
1cs426-winter-2008 Notes  Course project: Will be due at the end of the term You can do it in pairs Create an animation that combines an algorithm for.
Physics , Mar 7 Announcements Exam 2 graded –Average = 71.4 –Standard Deviation = 15.8 –High score = 96 –Median score = 72 Exam 2 corrections due.
The Islamic University of Gaza Faculty of Engineering Numerical Analysis ECIV 3306 Introduction.
Particle Systems CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
Particle Systems Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
1cs426-winter-2008 Notes. 2 Velocity fields  Velocity field could be a combination of pre-designed velocity elements E.g. explosions, vortices, …  Or.
Gravity, Projectiles, and Satellites Physics Click HERE if the web page above does not open. In this lesson, we will discuss the following: Newton’s Law.
CE Statics Lecture 7. EQUILIBRIUM OF A PARTICLE CONDITION FOR THE EQUILIBRIUM OF A PARTICLE A particle is in EQUILIBRIUM if: 1. it is at rest, OR.
CS 4730 Physical Simulation CS 4730 – Computer Game Design.
Physical Science Mr. Barry. Gravity is a Force  Every object in the Universe exerts a force on every other object  Gravity: force of attraction between.
Chapter 10 Forces. Force and Net Force Force is a push or a pull on an object. Net force is the total force on an object.
Physically Based Animation and Modeling
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
Advanced Texturing Methods Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 8, 2003.
Isaac Newton (1642 – 1727) Newton’s Laws The Father of Force.
Polygon Lists & 3-D File Formats Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, February 18, 2002.
G RAVITY February 9, J OURNAL : 2/9/2011 A soccer ball is pushed with a force of 15.2 N. The soccer ball has a mass of 2.45 kg. What is the ball’s.
CS559: Computer Graphics Lecture 38: Animation Li Zhang Spring 2008 Slides from Brian Curless at U of Washington.
Newton’s 1 st Law of Mechanics A particle will continue is a straight line at constant speed unless acted upon by a net push or pull (i.e. force). The.
Gravity. Geocentric vs. Heliocentric Model The Geocentric Model Arguments For: Parallax not seen Almagest says so Fits with “heavenly” perfection Arguments.
Homogeneous Form, Introduction to 3-D Graphics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 20,
Shadows via Projection Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 5, 2003.
Equation of Motion for a Particle Sect nd Law (time independent mass): F = (dp/dt) = [d(mv)/dt] = m(dv/dt) = ma = m(d 2 r/dt 2 ) = m r (1) A 2.
Frank L. H. WolfsDepartment of Physics and Astronomy, University of Rochester Physics 121. Thursday, February 7, Carry-on Luggage.
Chapter 4 Forces and Newton’s Laws of Motion Why things move the way the do.
More on Advanced Interfaces, Image Basics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, November 21, 2003.
VR UI, Notes on Projects, Intro. to Object Descriptions Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday,
Chapter 3 Newton’s Laws of Motion Why things move the way the do.
Dynamics: Newton’s Laws of Motion. Concepts Force Newton’s First Law of Motion Mass Newton’s Second Law of Motion Newton’s Third Law of Motion Weight.
Monday, June 22, 2015PHYS , Summer 2015 Dr. Jaehoon Yu 1 PHYS 1441 – Section 001 Lecture #8 Monday, June 22, 2015 Dr. Jaehoon Yu Newton’s Second.
Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
FORCE AND MOTION November 19, WHAT CAN CHANGE AN OBJECTS MOTION?
Particles Paul Taylor Polygons are not so hot! Good for representing objects like A Cup A Robot A Pyramid Not so hot for creating Hair Snowflakes.
Chapter 2 Linear Motion. The Language of Physics.
Using Newton’s Laws Section 4.2 Page 96. Newton’s 2 nd Law Describes the connection between the cause of a change in an object’s velocity and the resulting.
Monday, Sept. 13, 2004PHYS , Fall 2004 Dr. Jaehoon Yu 1 1.Motion in two dimension Motion under constant acceleration Projectile motion Heights.
SPH3U – Unit 2 Gravitational Force Near the Earth.
Perpetual Visualization of Particle Motion and Fluid Flow Presented by Tsui Mei Chang.
Particles and their home in Geometry Shaders Paul Taylor 2010.
PHYS 1441 – Section 002 Lecture #13 Monday, March 4, 2013 Dr. Jaehoon Yu Newton’s Law of Universal Gravitation Motion in Resistive Force Work done by a.
More on Particles Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, March 24, 2004.
FORCES OF MOTION Georgia Shared Resources. STANDARDS.
Monday, Mar. 3, 2008 PHYS , Spring 2008 Dr. Jaehoon Yu 1 PHYS 1441 – Section 002 Lecture #12 Monday, Mar. 3, 2008 Dr. Jaehoon Yu Types of Forces.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
As this windsurfer is propelled through the air, his motion is determined by forces due to the wind and his weight. The relationship between the forces.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Notes: Forces Big “G” and little “g” Newton’s Law of Universal Gravity -F g, the force of attraction between two objects is directly proportional to the.
More on Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, April 14, 2004.
Chapter 3. Force, Mass, and Acceleration Newton’s first law of motion states that the motion of an object changes only if an unbalanced force acts on.
Newton’s Laws of Motion. What happens when one particle collides with another particle (of the same mass)? What is an elastic collision? What is an inelastic.
Forces: Gravitational, Magnetic, & Electrical. Forces between objects act when the objects are in direct contact or when they are not touching. Magnetic,
Gravitational Force  Gravity= a force of attraction between objects, “pulls” objects toward each other  Law of universal gravitation= all objects in.
Particle Systems Ed Angel Professor Emeritus of Computer Science
PHYS 1441 – Section 002 Lecture #13
Forces.
Particle Systems Ed Angel
Motion and force.
Chunk 5 Application of Newton’s Laws
Presentation transcript:

Introduction to Procedural Methods, Particles Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March 22, 2004

22 Mar 2004CS 481/6812 Where Are We? [1/2] So far, we have covered: Organizing a 3-D Scene Drawable objects Tree representations Advanced HSR Image-space methods Object-space methods Buffer-Based Effects Accumulation, including jittering Stenciling Virtual Reality Representing transformations VR Juggler programming User-interface issues Describing Objects Explicit vs. implicit Splines Implicit representations & marching cubes Rapid prototyping & file formats

22 Mar 2004CS 481/6813 Where Are We? [2/2] Next: Procedural Methods Modeling particles Particle systems Fractals Non-Pipeline-Based Rendering Ray tracing, etc. As well as whatever VR-related topics can be made to work … Also, the take-home midterm exam is due on Wednesday (3/24) at the start of class. Do not turn it in via . Give me stapled sheets of paper. The midterm is available on the web page. Complete instructions are on the exam.

22 Mar 2004CS 481/6814 Procedural Methods: Introduction [1/2] We have considered various ways to represent a scene and objects within a scene. Sometimes objects are complex enough (in appearance or behavior) that we think primarily about the algorithm that generates the object, rather than any static representation. Such algorithms are generally known as procedural methods. Perlin’s noise-based texture generation technique (from CS 381, fall 2003) is a good example of a procedural method.

22 Mar 2004CS 481/6815 Procedural Methods: Introduction [2/2] We will consider two main categories of procedural methods: Particle systems Independently moving particles, obeying some set of laws. Used for: Smoke. Sparks (from welding or whatever). Explosions (not too different from sparks). Semi-rigid solids (particles connected by stiff springs). Cloth (particles connected by things that act like fibers). Crowd scenes (each particle is a person). Flocks of birds & schools of fish. Etc. Fractals Definitions later … Used for: Clouds. Terrain. Tree bark. Pretty pictures.

22 Mar 2004CS 481/6816 Particles: Definition A particle is an object that has a time-dependent position. That’s essentially all it has. So it can be somewhere, and it can move. In CG, particles are used in many types of modeling. Particles may interact with each other in complex ways. We can render a particle however we want. Particles are most interesting when they form groups in which each particle moves (somewhat) independently. This is called a particle system.

22 Mar 2004CS 481/6817 Particles: Position & Motion [1/2] We look at how to model a single particle. Suppose our particle obeys Newton’s Laws of Motion. Newton’s First Law says that a particle’s velocity stays constant unless it is subjected to an external force. So the state of a very simple particle can be stored as a position and a velocity. In TRANSF, this might be a pos and a vec. So a simple particle can be represented by a two-element struct : struct Particle { pos position; vec velocity; };

22 Mar 2004CS 481/6818 Particles: Position & Motion [2/2] Code for a particle, with no force acting on it, might look like this: Global: Particle p; In the idle function: static double previous_time = get_the_time(); double current_time = get_the_time(); double elapsed_time = current_time – previous_time; p.position += p.velocity * elapsed_time; glutPostRedisplay(); previous_time = current_time; In the display function: render(p);

22 Mar 2004CS 481/6819 Particles: Force Newton’s Second Law says that when a force acts on a particle, the resulting acceleration is proportional to the force and inversely proportional to the mass of the particle: So when we deal with forces, we might want to store a mass for our particle as well. The simplest force is gravity, which, at human scales, can be considered as giving a constant acceleration in the downward direction. How do we find the position of a moving particle whose velocity is changing? This question leads to the very deep topic of differential equations and their solutions. We will not cover this in detail here, but we can say a little bit …

22 Mar 2004CS 481/68110 Particles: Simple Approximation Suppose the force on a particle is small. Then its velocity will not change much between two frames. And we can approximate its changing velocity by its current velocity. vec force = compute_force(p.position); p.position += p.velocity * elapsed_time; p.velocity += force / p.mass * elapsed_time; This is based on a simple method for solving differential equations, called Euler’s Method. This method has two problems: Accuracy The velocity is not constant, after all. Stability Small initial errors in position can quickly turn into large errors.

22 Mar 2004CS 481/68111 Particles: Better Approximation We can do better if, instead of using the current velocity of the particle to update its position, we use the average of its current velocity and its next velocity. Except we do not necessarily know what the latter is.  So, we approximate it, the same way we have been: vec force = compute_force(p.position); vec next_velocity = p.velocity + force / p.mass * elapsed_time; p.position += (p.velocity + next_velocity) / 2. * elapsed_time; p.velocity = next_velocity; This is based on a method for solving differential equations, called the Order 2 Runge-Kutta Method. It has both better accuracy and stability. When the acceleration is constant (e.g., gravity), it is exactly right. I mean mathematically, of course. Floating-point computations are always wrong. When the acceleration is not constant, we should do better than the above code.

22 Mar 2004CS 481/68112 Particles: Other Forces Other common forces: Planetary-Scale Gravity Attractive force between two particles. Proportional to the product of their masses. Inversely proportional to the distance between them. Drag/Friction/Air Resistance Force is opposite to the direction of motion. Speed and mass may have effects. Spring Forces Pulls an object toward the at-rest point of the spring. Force is proportional to the distance of the object from this point. Usually combined with drag to give a realistic simulation. Can be used in a “grid” to simulate a semi-rigid object. Buoyancy In air (for smoke!) or water. Elastic (or Inelastic) Collisions