VIRTUAL ENVIRONMENT - PowerPoint PPT Presentation

About This Presentation
Title:

VIRTUAL ENVIRONMENT

Description:

Title: Programmable Interrupt Controller 8259 Author: SERAPHIM Last modified by: HOME Created Date: 8/16/2006 12:00:00 AM Document presentation format – PowerPoint PPT presentation

Number of Views:805
Avg rating:3.0/5.0
Slides: 27
Provided by: SERA170
Category:

less

Transcript and Presenter's Notes

Title: VIRTUAL ENVIRONMENT


1
VIRTUAL ENVIRONMENT
2
VIRTUAL ENVIRONMENT
  • The Dynamics of Numbers
  • Numerical Interpolation
  • Linear Interpolation
  • Non-Linear Interpolation
  • The Animation of Objects
  • Linear Translation
  • Non-Linear Translation
  • Shapes and Objects in between

3
The Dynamics of Numbers
  • Virtual Environment A Complex Numerical DB
  • It changes one number to another
  • Important Numerical Envelope of the change
  • Example In animating the bouncing of a ball,
    its centroid is used to guide its motion
  • Realistic motions are simulated by numerical
    interpolation
  • Numerical Interpolation Linear and Non-Linear

4
Numerical Interpolation
  • Interpolation produces a function that matches
    the given data exactly.
  • The function then can be utilized to approximate
    the data values at intermediate points
  • It is also used to produce a function for which
    values are known only at discrete points, either
    from measurements or calculations.

5
Numerical Interpolation
  • Given data points
  • Obtain a function, P(x)
  • P(x) goes through the data points
  • Use P(x)
  • To estimate values at intermediate points
  • For example, given data points
  • At x0 2, y0 3 and at x1 5, y1 8
  • Find the following
  • At x 4, y ?

6
Numerical Interpolation
7
Linear Interpolation
  • Linear Interpolation - Simplest interpolation
    method
  • Apply LI(a sequence of points) ? A polygonal line
    where each straight line segment connects two
    consecutive points of the sequence
  • Therefore, for every segment (P,Q)
  • P(x) (1 - x)P xQ where x ? 0,1
  • By varying x from 0 to 1, we get all the
    intermediate points between P and Q
  • P(x) P for x 0 and P(x) Q for x 1.
  • We get points on the line defined by P, Q,
    when 0 x 1

8
Non-Linear Interpolation
  • A linear interpolation ensures that equal steps
    in the parameter x give rise to equal steps in
    the interpolated values
  • It is often required that equal steps in x give
    rise to unequal steps in the interpolated values
  • We can achieve this using a variety of
    mathematical techniques
  • For example, we could use trigonometric functions
    or polynomials to achieve this

9
Trigonometric interpolation
  • sin2(x) cos2(x) 1
  • If x varies between 0 and p/2
  • cos2(x) varies between 1 and 0, sin2(x) varies
    between 0 and 1
  • which can be used to modify the two interpolated
    values n1 and n2 as follows
  • nn1cos2(t)n2sin2(t) for 0 t p/2

10
Trigonometric interpolation
11
Trigonometric interpolation
  • Let n1 1 and n2 3

12
Cubic interpolation
13
Cubic interpolation
14
Cubic interpolation
15
The Animation of Objects
  • Newtons Laws of Motion provide a useful
    framework to predict an objects behavior under
    dynamic conditions
  • This scenario can be simulated within a Virtual
    Environment
  • It can be achieved through a simple linear
    translation of objects

16
Uses of Translation
  • Modeling transformations
  • build complex models by positioning simple
    components
  • transform from object coordinates to world
    coordinates
  • Viewing transformations
  • placing the virtual camera in the world
  • i.e. specifying transformation from world
    coordinates to camera coordinates
  • Animation
  • vary transformations over time to create motion

17
Linear Translation
  • Consider an object located at VEs origin and
    assigned a speed S0 across the XY plane
  • To simulate its sliding movement, the x z
    coordinates of the object must be modified
    (tnow tprev)V0
  • The objects new velocity can be computed after
    it is bouncing off the boundary.

18
Linear Translation
19
Non-Linear Translation
  • Consider an object moving along the x-axis in 1s,
    pause momentarily and then returns to its
    original position in 2s
  • The non-linear movement of the object can be
    simulated by computing the x-translation as a
    function of time
  • At time t1, the translation begins. At time t2,
    i.e.,(t11) it pauses momentarily and at time t3,
    i.e., (t13), it comes to rest
  • t T t1 while t1 T t2 T
    Current time
  • t (T t1 1)/2 while t2 T t3 t- Control
    parameter

20
Euler Angles
  • Orientation of an object in computer graphics is
    often described using Euler Angles
  • Orientation of an object in computer graphics is
    often described using Euler Angles
  • RxRyRz
  • Any axis order will work and could be used.
  • Yaw, Pitch Roll

21
Problem with Euler Angles
  • Rotations not uniquely defined
  • Ex (z, x, y) roll, yaw, pitch (90, 45, 45)
    (45, 0, -45)takes positive x-axis to (1, 1, 1)
  • Cartesian coordinates are independent of one
    another, but Euler angles are not
  • Remember, the axes stay in the same place during
    rotations
  • Gimbal Lock
  • Term derived from mechanical problem that arises
    in gimbal mechanism that supports a compass or a
    gyro
  • Second and third rotations have effect of
    transforming earlier rotations, we lose a degree
    of freedom
  • ex Rot x, Rot y, Rot z
  • If Rot y 90 degrees, Rot z is equivalent to
    -Rot x
  • With Euler Angles, knowing the transformations
    for the entire rotation does not help us with
    the intermediate rotations. Each is a unique set
    of three rotations about the x,y and z axes

22
Quaternions
  • Invented by Sir William Hamilton (1843)
  • Do not suffer from Gimbal Lock
  • Provide a natural way to interpolate intermediate
    steps in a rotation about an arbitrary axis
  • Are used in many position tracking systems and VR
    software support systems

23
Quaternions
  • You can think of quaternions as an extension of
    complex numbers where there are three different
    square roots of -1.
  • q w i x j y k z where
  • i ?(-1), j ?(-1), k ?(-1)
  • ij k, jk i, ki j
  • ji -k, kj -i, ik -j
  • You could also think of q as a value in
    four-dimensional space, q w, x, y, z
  • Sometimes written as q w, v where w is a
    scalar and v is a vector in 3-space

24
Shape and Object Inbetweening
  • Shape Inbetweening
  • It is a technique in the cartoon industry to
    speed up the process of creating art works
  • The inbetween objects are derived from two key
    images drawn by a skilled animator
  • The images are called as Key Frames
  • The key frames shows an object in two different
    positions
  • The number and position of inbetweenig images
    determines the dynamics of final animation

25
Shape Inbetweening
26
Object Inbetweening
  • By inbetweening the z-coordinate, the above
    technique can be applied to 3D contours
  • We cannot expect to interpolate between two
    different complex objects and geometrically
    consistent
  • Given suitable geometric definitions, it is
    possible to transform one object into another and
    create subtle animation
Write a Comment
User Comments (0)
About PowerShow.com