1 Scene Graphs Week 4.2 ©Anthony Steed 1999-2002.

Slides:



Advertisements
Similar presentations
Points, Vectors, Lines, Spheres and Matrices
Advertisements

Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.
Transformations Objectives Understand how transformations work in 2D and 3D Understand the concept of homogenous coordinate system Understand scene graphs.
3-D Geometry.
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
General 3D Rotation- rotation about an arbitrary axis Taken from Angel Interactive Computer Graphics with OpenGL (out of print) P2 P1 P0 Let vector u =
Preorder Traversal with a Stack Push the root onto the stack. While the stack is not empty n pop the stack and visit it.
Spherical Coordinates
Hierarchical Transformations and Models CSE 3541 Matt Boggus.
Hierarchical Transformations Hierarchical Models Scene Graphs
04 – Geometric Transformations Overview Geometric Primitives –Points, Lines, Planes 2D Geometric Transformations –Translation, Rotation, Scaling, Affine,
Advanced Graphics (and Animation) Spring 2002
C O M P U T E R G R A P H I C S Stuff Jian Chen January 15, 2010 Transformations 1/28 Geometric Transformations By Andries van Dam.
COMP 175: Computer Graphics March 10, 2015
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
C O M P U T E R G R A P H I C S Stuff CMSC 435 / 634 Transformations 1/29 Geometric Transformations Readings: Chapters 5-6.
1 Preview At least two views are required to access the depth of a scene point and in turn to reconstruct scene structure Multiple views can be obtained.
Geometric Transforms Changing coordinate systems.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Part7: Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
1 General Camera ©Anthony Steed Overview n Simple camera is limiting and it is necessary to model a camera that can be moved n We will define.
©Larry F. Hodges (modified by Amos Johnson) 1 3-D Mathematical Preliminaries & Transformations.
1 Scene Graphs ©Anthony Steed Scene Graph Overview n Building Scene Structures n Traversal n Examples n Instancing and Re-Use n More Transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
CS654: Digital Image Analysis Lecture 6: Basic Transformations.
Rotation matrices 1 Constructing rotation matricesEigenvectors and eigenvalues 0 x y.
Transformations Tutorial
Computer Graphics 3D Transformations. Translation.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
January 19, y X Z Translations Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions.
CSCI 425/ D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.
Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.
Lecture 5: Introduction to 3D
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
3D Transformations 2D coordinates3D coordinates x y x y z x z y Right-handed coordinate system:
Computer Graphics I, Fall 2008 Hierarchical Modeling I.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Derivation of the 2D Rotation Matrix Changing View from Global to Local X Y X’ Y’  P Y Sin  X Cos  X’ = X Cos  + Y Sin  Y Cos  X Sin  Y’ = Y Cos.
REFERENCE: QUATERNIONS/ Ogre Transformations.
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Robotic Arms and Matrices By Chris Wong and Chris Marino.
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3D Transformations
Every segment is congruent to its image.
Every segment is congruent to its image.
Points, Vectors, Lines, Spheres and Matrices
Unit 1 Transformations in the Coordinate Plane
4-4 Geometric Transformations with Matrices
Unit 1: Transformations Day 3: Rotations Standard
2D Geometric Transformations
Hierarchical Modeling & Constructive Solid Geometry
Geometric Objects and Transformations (II)
Dr. Chih-Kuo Yeh 葉智國 Computer Graphics Dr. Chih-Kuo Yeh 葉智國
Presentation transcript:

1 Scene Graphs Week 4.2 ©Anthony Steed

2 Scene Graph Overview n Building Scene Structures n Traversal n Examples n Instancing and Re-Use n More Transformations

3 Concept of Scene Graph n Objects placed relative to one another n Objects made of similar components n Directed acyclic graph root

4 Use for Animation/Modelling

5 n One object has a local transformation relative to its parent shoulder is translation (0 1 0) from base upper arm is translation (0 3 0) from shoulder elbow is translation (0 3 0) from upper arm fore arm is rotation Z by 90 then translation (0 2 0)

6 Rendering Traverse n Must get object definitions in WC before passing to camera n For object under Base p.B is in WC n “inherit” matrices down stack n So for object under shoulder p.SB is in WC (p.S is in base coordinates)

7 In general n On traverse “push” on graph descend “pop” on graph ascend n Combined matrix is current transform (CTM)

8 Sharing Nodes n E.G. One table many places n Table1 has CTM T1T0 n Table1 has CTM T2T0 table table2 table1 T1 T2 T0

9 Spherical Coordinates n Represent a point on a using two angles and . Where r = length(x,y,z) Z P(x,y,z)   X Y Q O Q is projection of P onto XY plane is angle between X axis and OQ  is angle between OP and Z axis

10 Spherical Coordinates n Length OQ = r sin(  ) n So x = r sin(  )cos( ) y = r sin(  )sin( ) z = r cos(  )

11 Rotation About an Arbitrary Axis Z X Y O p1 p2 

12 … 1. Translate p1 so it is at the origin 2. Let p3 = p2-p1 (new position of p2) find spherical co-ordinate of p3 (r, , ) 3. Rotate about Z by - to bring p3 into ZX plane 4. Rotate about Y by -  to bring p3 onto Z axis 5. Now rotate about Z by  6. Invert steps 4-1

13 … Z Y O p1 p2 Z Y O p3 StartTranslate

14 … Z Y p3 Rotate1 Z Y p3 Rotate2 

15 … Z Y p3 After Steps 1-4 n Now we apply the transformation we are after n Invert steps 4-1

16 Scene Graph Recap n Use of scene graph to model environments n Notion of render traversal and the current transformation matrix n Instancing and sharing of nodes n Rotation of objects around an arbitrary axis