111/16/2015 07:14 UML Instance Transformation x y z x y z x y z x y z SRT Model Coordinates.

Slides:



Advertisements
Similar presentations
Computer Graphics 2D & 3D Transformation.
Advertisements

Hierarchical Transformation. Summary Alternatively, OpenGL thinks: A transformation updates the coordinate system. For each change, the transformation.
Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
Viewpoint { eventIn SFBool set_bind exposedField SFFloat fieldOfView # (0,  ) exposedField SFBool jump TRUE exposedField SFRotation orientation.
Hierarchical Modeling I Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Transformations Objectives Understand how transformations work in 2D and 3D Understand the concept of homogenous coordinate system Understand scene graphs.
Objectives Learn to build arbitrary transformation matrices from simple transformations Learn to build arbitrary transformation matrices from simple transformations.
© De Montfort University, D Graphics and VRML Howell Istance and Chris Hand* De Montfort University * now at
A Standard Humanoid Representation on The Web: VRML/X3D Humanoid Animation Working Group (H-anim) Che-Jen Chen May/30/2003.
Hierarchical Modeling II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Cse591 Spring 981 VRML Basics The basic elements of VRML files are nodes. Every type of node has a set of fields associated with it. –Common single-valued.
Multimedia Web Components VRML. Introduction to VRML Case sensitive Most easy technique to provide interactive 3D environment in Web Required special.
Graphical Objects and Scene Graphs CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
VRML Virtual Reality Modeling Language. What Are We Going to See? What is VRML? Syntax of the language Features Examples.
2IV60 Computer Graphics 2D transformations
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
Hierarchical Transformations Hierarchical Models Scene Graphs
CS 4731: Computer Graphics Lecture 9: Introduction to 3D Modeling Emmanuel Agu.
Hierarchy, Modeling, and Scene Graphs Angel: Chapter 10 OpenGL Programming and Reference Guides, other sources. ppt from Angel, AW, etc. CSCI 6360/4360.
COMP 175: Computer Graphics March 10, 2015
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 3 – Object Definition in VRML.
Objectives Review some advanced topics, including Review some advanced topics, including Chapter 8: Implementation Chapter 8: Implementation Chapter 9:
Shapes Properties Binding Chung Ji Hye.
VRML - 1 Virtual Reality Modeling Language (VRML) Peter O’Grady.
VRML Shapes and Geometry
Transforms Hierarchical Modeling Scene Graphs Using hierarchical modeling techniques in 3D software design Transforms Local basis Matrix math review Matrices.
Demetriou/Loizidou – ACSC330 – Chapter 9 Hierarchical and Object-Oriented Modeling Dr. Giorgos A. Demetriou Dr. Stephania Loizidou Himona Computer Science.
1 Virtual Reality Modeling Language (VRML97) ©Anthony Steed
Week 4 Lecture 1: Hierarchical Modeling Part 1 Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E ©
Hierarchical Modeling. Instance Transformation Start with a prototype object (a symbol) Each appearance of the object in the model is an instance – Must.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 40 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 40 Computer Graphics Hierarchy I.
CS559: Computer Graphics Lecture 15: Hierarchical Modeling and Shading Li Zhang Spring 2008.
Geometry: 2-D Transformations Course web page: Chapter #3.
Computer Graphics Group Script node Jiří Žára. Computer Graphics Group Contents 1.Script node 2.Motion generators 2Script node.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
111/22/ :40 UML VRML 2.0 Scene Graph Structure Group Transformation Shape Nodes.
VRML Anthony Steed Department of Computer Science University College London ©Anthony Steed
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML.
1 Hierarchical and Object-Oriented Graphics Construct complex models from a set of simple geometric objects Extend the use of transformations to include.
Transformations Tutorial
1/50 CS148: Introduction to Computer Graphics and Imaging Transforms CS148: Introduction to Computer Graphics and Imaging Transforms.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 OpenGL Transformations.
Intro to VRML Let’s build something! The source code examples in this tutorial WORK!
Computer Graphics I, Fall 2008 Hierarchical Modeling II.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling.
Hierarchical Modeling. 2 Objectives Build a tree-structured model of a humanoid figure. Examine various traversal strategies. Build a generalized tree-model.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 6 – Texture Maps.
CS559: Computer Graphics Lecture 12: OpenGL - Transformation Li Zhang Spring 2008.
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
Computer Graphics I, Fall 2008 Hierarchical Modeling I.
CSCE 441: Computer Graphics: Hierarchical Models Jinxiang Chai.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 4 – Object Manipulation in VRML.
Hierarchical Models Chapter 9.
DLP for Virtual Environments (I)
Computação Gráfica VRML Rotação 07/12/2017.
Department of Computer Science University College London
Modeling and Hierarchy
Computer Graphics - Hierarchical Models-
Modeling and Hierarchy
Hierarchical and Object-Oriented Graphics
CSCE 441: Computer Graphics: Hierarchical Models
VRML Shapes.
Hierarchical and Object-Oriented Graphics
Hierarchical Modeling I
Transformations in OpenGL
Hierarchical Modeling & Constructive Solid Geometry
Hierarchical Modeling
Lecture 3. Virtual Worlds : Representation,Creation and Simulation
CSCE 441: Computer Graphics: Hierarchical Models
Presentation transcript:

111/16/ :14 UML Instance Transformation x y z x y z x y z x y z SRT Model Coordinates

211/16/ :14 UML Instancing in OpenGL glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(...); glRotate(...); glScale(...); glutSolidCylinder(...); /*or some other symbol*/ SymbolScaleRotateTranslate Cylinder sx, sy, sz  x,  y,  z dx,dy,dz Cylinder... Sphere Tabular Representation

311/16/ :14 UML Example of a Linked Structure: Robot Arm    y y y xxx z z z

411/16/ :14 UML Moving Robot Components and Frames h1 h2

511/16/ :14 UML Robot Construction display() { glRotate(theta, 0.0, 1.0, 0.0); base(); glTranslatef(0.0, h1, 0.0); glRotatef(phi, 0.0, 0.0, 1.0); lower_arm(); glTranslatef(0.0, h2, 0.0); glRotatef(psi, 0.0, 0.0, 1.0); upper_arm(); }

611/16/ :14 UML Hierarchical Structure Base Lower Arm Upper Arm * Draw Func. Transform * Child(ren) display() { glRotate(theta, 0.0, 1.0, 0.0); base(); glTranslatef(0.0, h1, 0.0); glRotatef(phi, 0.0, 0.0, 1.0); lower_arm(); glTranslatef(0.0, h2, 0.0); glRotatef(psi, 0.0, 0.0, 1.0); upper_arm(); }

711/16/ :14 UML Tree Representation of More Complex Robot Torso Head Left Upper Arm Right Upper Arm Left Upper Leg Right Upper Leg Left Lower Arm Right Lower Arm Left Lower Leg Right Lower Leg

811/16/ :14 UML Tree with Transformations Torso Head Left Upper Arm Right Upper Arm Left Upper Leg Right Upper Leg Left Lower Arm Right Lower Arm Left Lower Leg Right Lower Leg ThTluaTruaTlulTrul TllaTrlaTlllTrll

911/16/ :14 UML Traversing the Tree Torso Head Left Upper Arm Right Upper Arm Left Upper Leg Right Upper Leg Left Lower Arm Right Lower Arm Left Lower Leg Right Lower Leg ThTluaTruaTlulTrul TllaTrlaTlllTrll figure() { Torso(); glPushMatrix(); glTranslatef(...); glRotatef(...); Head(); glPopMatrix(...); glPushMatrix(...); glTranslatef(...); glRotatef(...); LeftUpperArm(); glTranslatef(...); glRotatef(...); LeftLowerArm(); glPopMatrix(...); glPushMatrix(...); glTranslatef(...); glRotatef(...); RightUpperArm(); glTranslatef(...); glRotatef(...); RightLowerArm(); T TTh T TTua TTuaTlla T TTrua TTruaTrla Current Transform.

1011/16/ :14 UML Scene Graphs Scene Translate Rotate Object 1 Object 2 Object 4 Object 3

1111/16/ :14 UML Scene Graphs Traversing the Graph glPushMatrix(); glTranslate(...); glRotate(..._; Object1(); glPopMatrix(); glPushMatrix(); glTranslate(...); Object2(); glPopMatrix(); glPushMatrix(); glTranslate(...); glRotate(...); Object3(); glPopMatrix(); glPush Matrix(); Object4();

1211/16/ :14 UML Architecture for Graphics on the Internet ModelApplicationAPI Graphics Pipeline Display UI TCP/IP Server TCP/IP Model Graphics Pipeline Graphics Pipeline UI Display Browser Network/Internet

1311/16/ :14 UML VRML Design Goals 0 Composability 0 Scalability 0 Extensibility 0 Simple authoring

1411/16/ :14 UML VRML 2.0 Scene Graph Structure Group Transformation Shape Nodes

1511/16/ :14 UML VRML 2.0 Node Format Node_Name { field_name field_value. field_name field_value } Each field has an associated class and type. Field class is one of: field, exposedfield, eventIn, enventOut

1611/16/ :14 UML VRML 2.0 Field Types SFBoolThe Boolean value TRUE or FALSE SFFloatA 32-bit floating point value SFInt32A 32-bit signed integer SFTimeAn absolute or relative time value SFVec2fA pair of floating point values, usually used to represent texture coordinates SFVec3fThree floating point values, usually used to represent a 3D position SFColorThree floating point values between zero and one, used to represent RGB SFRotationFour floating point values. The first three represent an axis, the fourth an angle

1711/16/ :14 UML VRML 2.0 Field Types SFImageA two-dimensional image with one to four color components SFStringA UTF8 (international character) string SFNodeA container for another VRML node MFFloatAn array of SFFloat values MFInt32An array of SFInt32 values MFVec2fAn array of SFVec2f values MFVec3f An array of SFVec3f values MFColorAn array of SFColor values MFRotationAn array of SFRotation values MFStringAn array of SFString values

1811/16/ :14 UML VRML 2.0 Composing Node Hierarchies Node_name_1 { field_name field_value field_name Node_name_2 { field_name field_value } field_name Node_name_3 { field_name field_value } 1 23

1911/16/ :14 UML VRML 2.0 The Shape Node Definition Shape { exposedField SFNode appearance NULL exposedField SFNode geometry NULL } Node Name Field ClassField Type Field Name Default Value Bold values are what is actually typed in source file.

2011/16/ :14 UML VRML 2.0 Geometry Nodes 0 Predefined shapes -Cone -Box -Cylinder -Sphere 0 PointSet 0 IndexedLineSet (polyline) 0 IndexedFaceSet (polygonal object) 0 ElevationGrid 0 Extrusion 0 Text

2111/16/ :14 UML VRML 2.0 Cone Definition Cone { field SFFloat bottomRadius 1 field SFFloat height2 field SfBool sideTRUE field SFBool bottomTRUE } The Cone node specifies a cone centered in the local coordinate system and whose axis is aligned with the local y axis. The Boolean fields define whether the sides or bottom of the cone are visible. All dimensions are in meters.

2211/16/ :14 UML VRML 2.0 Box Definition Box { field SFVec3f size } The Box node specifies a rectangular box in the local coordinate system centered at 0,0,0 and aligned with coordinate axes.

2311/16/ :14 UML VRML 2.0 Cylinder Definition Cylinder { field SFBool bottom TRUE field SFFloat height 2 field SFFloat radius 1 field SFBool side TRUE field SFBool top TRUE } Sphere Definition Sphere { field SFFloat radius 1 }

2411/16/ :14 UML VRML 2.0 Indexed Face Set - Partial Definition IndexedFaceSet { exposedField SFNode coord NULL field SFBool ccw TRUE field SFBool convex TRUE field MFInt32 coordIndex [] field SFBool solid TRUE... } Coordinate { exposedField MFVec3f point [] } There are 13 other fields in IndexedFaceSet, making it the most complex and flexible node in VRML.

2511/16/ :14 UML VRML 2.0 Simplest Possible World Shape{ geometry Cone { } } Shape Node Geometry Field Cone node has no fields: accept all default values. Shape node has no appearance field: accept all white.

2611/16/ :14 UML VRML 2.0 Appearance & Material Nodes Appearance { exposedField SFNode material NULL exposedField SFNode texture NULL exposedField SFNode textureTransform NULL } Material { exposedField SFFloat ambientIntensity 0.2 exposedField SFColor diffuseColor exposedField SFColor emissiveColor exposedField SFFloat shininess 0.2 exposedField SFColor specularColor exposedField SFFloat transparency 0 }

2711/16/ :14 UML VRML 2.0 Transform Node Definition Transform { enventInMFNode addChildren eventInMFNode removeChildren exposedFieldSFVec3f center exposedFieldMFNode children [] exposedFieldSFRotation rotation exposedFieldSFVec3f scale exposedFieldSFRotation scaleOrientation exposedFieldSFVec3f translation fieldSFVec3f bboxCenter fieldSFVec3f bboxSize } Order of application: T(translation) T(rotation) T(scale) {children}