© TMC Computer School HC20203 VRML 4 - 1 HIGHER DIPLOMA IN COMPUTING Chapter 4 – Object Manipulation in VRML.

Slides:



Advertisements
Similar presentations
Lecture 7 2D Transformation. What is a transformation? Exactly what it says - an operation that transforms or changes a shape (line, shape, drawing etc.)
Advertisements

Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
Links and Joints.
Math 10F Transformational Geometry Examples. Translations Translations are “slides” Described by a length and direction Eg. translate the following shape.
TRANSFORMATIONS.
Three Dimensional Modeling Transformations
Transformation in Geometry Created by Ms. O. Strachan.
Introduction to VRML By Salman Yussof Diego Iglesias.
2.1 si SI31 Advanced Computer Graphics AGR Lecture 2 Basic Modelling.
An Overview of VRML §Scene Graph Structure VRML files describe 3D objects and worlds using a hierarchical scene graph. Entities in the scene graph are.
3-D Geometry.
© 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.
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.
Reflection symmetry If you can draw a line through a shape so that one half is the mirror image of the other then the shape has reflection or line symmetry.
Lesson 10-5: Transformations
Hierarchical Transformations and Models CSE 3541 Matt Boggus.
Hierarchical Transformations Hierarchical Models Scene Graphs
6.1 Introduction The General Quadratic Equation in x and y has the form: Where A, B, C, D, E, F are constants. The graphs of these equations are called.
3-D Modeling Concepts V part 2.
Vectors and the Geometry of Space 9. Functions and Surfaces 9.6.
Rotations and Translations
COMP 175: Computer Graphics March 10, 2015
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 3 – Object Definition in VRML.
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.
Copyright - Planchard 2012 History of Engineering Graphics Stephen H. Simmons TDR 200.
EMSE 3123 Math and Science in Education
VRML - 1 Virtual Reality Modeling Language (VRML) Peter O’Grady.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Translations, Reflections, and Rotations
VRML Scene Graphs. Learning Objectives Understand the concept of a scene graph Understand how VRML defines transformations (translations, rotations, and.
1 of 66 KS4 Mathematics S6 Transformations. 2 of 66 A A A A A A Contents S6.1 Symmetry S6 Transformations S6.2 Reflection S6.3 Rotation S6.4 Translation.
7.1 – Rigid Motion in a Plane
1 Virtual Reality Modeling Language (VRML97) ©Anthony Steed
Vectors and the Geometry of Space 9. Three-Dimensional Coordinate Systems 9.1.
Chapter 9 Transformations.
Transformation in Geometry Transformation A transformation changes the position or size of a shape on a coordinate plane.
111/16/ :14 UML Instance Transformation x y z x y z x y z x y z SRT Model Coordinates.
Transformations A rule for moving every point in a figure to a new location.
Virtual Reality Modeling Language 97. What’s VRML? Virtual Reality Modeling Language 2D/3D graphics Audio:.wav,.mid Video: MPEG-1 Interactivity: time-
An operation that moves or changes a geometric figure (a preimage) in some way to produce a new figure (an image). Congruence transformations – Changes.
VRML Anthony Steed Department of Computer Science University College London ©Anthony Steed
Lesson 10-5: Transformations 1 Lesson 9 Transformations G.CO2, Represent transformation in plane describe as a function that take points in the plane as.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML.
Year 8 Revision Bluesmartie14. Year 8 Topics Click on which topic you wish to revise Transformations Symmetry Reflection Translation Enlargement MINI.
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
Modeling, CG, and others Jyun-Ming Chen Fall 2001.
Objective Identify and draw dilations..
Intro to VRML Let’s build something! The source code examples in this tutorial WORK!
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.
11-19 S 6.7: Perform Similarity Transformations. Review: Transformations: when a geometric figure is moved or changed in some way to produce a new figure.
Computer Graphics Matrices
VECTORS AND THE GEOMETRY OF SPACE 10. VECTORS AND THE GEOMETRY OF SPACE In this chapter, we introduce vectors and coordinate systems for three-dimensional.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 6 – Texture Maps.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Equations of Circles. You can write an equation of a circle in a coordinate plane, if you know: Its radius The coordinates of its center.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Activation—Unit 5 Day 1 August 5 th, 2013 Draw a coordinate plane and answer the following: 1. What are the new coordinates if (2,2) moves right 3 units?
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 5 – Animation in VRML.
Section 1-4 Shifting, Reflecting, and Stretching Graphs
Properties of Transformations. Translate Figures and Use Vectors Translation: moves every point of a figure the same distance in the same direction Image:
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Lesson 10-5: Transformations 1 Lesson 10-5 Transformations.
Computação Gráfica VRML Rotação 07/12/2017.
Constructive Solid Geometry CSG (Geometri Padat Konstruktif)
Transformations.
Lecture 3. Virtual Worlds : Representation,Creation and Simulation
Presentation transcript:

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 4 – Object Manipulation in VRML

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Understanding Coordinate System  VRML defines the unit of measure of the world coordinate system to be metres  All other coordinate systems are built from transformations based from the world coordinate system  The VRML convention that one unit equals one meter  In VRML, we can create any number of coordinate systems

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Understanding Coordinate System  Each new coordinate system is positioned or translated relative to the origin of another coordinate system  When a new coordinate system is relative to another, we say that the new coordinate system is a child coordinate system that is nested within the within the parent coordinate system  The entire family tree of coordinate systems including any shape we build within those coordinate system is called the scene graph

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Understanding Coordinate System  Try to visualize the coordinate system as indicated in the diagram below

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Understanding Coordinate System  The ability to create coordinate systems is a very powerful feature of VRML  Consider the steps in placing the lamp on the table while the table is inside a room  We need to perform the following steps:  Create a lamp, building each of its components relative to a lamp coordinate system  Create a table, building each of its components relative to a table coordinate system

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Understanding Coordinate System  Place the lamp on the table by positioning the lamp coordinate system relative to the table coordinate system  Now the lamp coordinate system is a child of the table coordinate system  Create a room, building each of its components relative to a room coordinate system  Place the table (and its lamp) by positioning the table coordinate system relative to the room coordinate system

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Grouping Coordinate Systems  We need to use a Transform node to create a new coordinate system and specify the position or translation relative to a parent coordinate system  The Transform node is similar to the Group node in that it contains a list of child nodes  These child nodes could be Shape node, Group node or Transform nodes  All of the child nodes are built at the origin within the Transform node’s coordinate system

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Grouping Coordinate Systems  All of the child nodes are built at the origin within the Transform node’s coordinate system  If the position of that node changes, all its child nodes will change accordingly with the changed coordinate system  Like Shape and Group nodes, the Transform node may be the child of a parent Group or Transform node

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Grouping Coordinate Systems  The coordinate system of the parent node is the parent coordinate system of the Transform node coordinate system  If the root node is a Transform node, then the parent coordinate system is the world coordinate system of the VRML file

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING The Transform Node  The Transform node creates a new coordinate system relative to its parent node coordinate system Transform { children [ ]# exposedField MFNode translation # exposedFieldSFVec3f rotation # exposedFieldSFRotation scale # exposedFieldSFVec3f scaleOrientation # exposedFieldSFRotation bboxCenter # fieldSFVec3f bboxSize # fieldSFVec3f center # exposedFieldSFVec3f addChildren# eventInMFNode removeChildren# eventOutMFNode }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING The Transform Node  The value of the children exposed field specifies a list of child nodes to be included in the group  Typical values in the children are the Shape nodes, Group nodes and Transform nodes  The value of the translation exposed field specify the distances in X, Y, Z directions  The value of the translation exposed field can be changed by routing an event to the exposed field’s implied set_translation eventIn.  When the event is received, the translation field is set and the new translation is sent using the exposed field’s implied translation_changed eventOut.

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating 2.0 units along x-axis and building Cylinder #VRML V2.0 utf8 Transform { translation children [ Shape { appearance Appearance { material Material { } } geometry Cylinder { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating -2.0 units along x-axis and building Cylinder #VRML V2.0 utf8 Transform { translation children [ Shape { appearance Appearance { material Material { } } geometry Cylinder { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating 2.0 units along y-axis and building Cylinder #VRML V2.0 utf8 Transform { translation children [ Shape { appearance Appearance { material Material { } } geometry Cylinder { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating 2.0 units along z-axis and building Cylinder #VRML V2.0 utf8 Transform { translation children [ Shape { appearance Appearance { material Material { } } geometry Cylinder { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating along x-, y-, z-axis and building Cylinder #VRML V2.0 utf8 Transform { translation children [ Shape { appearance Appearance { material Material { } } geometry Cylinder { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Building Shapes in Multiple Coordinate Systems #VRML V2.0 utf8 Group { children [ # Draw the hut walls Shape { appearance DEF White Appearance { material Material { } } geometry Cylinder { height 2.0 radius 2.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Building Shapes in Multiple Coordinate Systems # Draw the hut roof Transform { translation children [ Shape { appearance USE White geometry Cone { height 2.0 bottomRadius 2.5 } ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Coordinate Systems #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Coordinate Systems # Left Column Transform { translation children Shape { appearance USE White geometry Cylinder { radius 0.3 height 6.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Coordinate Systems # Right Column Transform { translation children Shape { appearance USE White geometry Cylinder { radius 0.3 height 6.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Coordinate Systems # Archway span Transform { translation children Shape { appearance USE White geometry Box { size } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Coordinate Systems #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Coordinate Systems # First archway # Left Column DEF LeftColumn Transform { translation children DEF Column Shape { appearance USE White geometry Cylinder { radius 0.3 height 6.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Coordinate Systems # Right Column DEF RightColumn Transform { translation children USE Column }, # Archway span DEF ArchwaySpan Transform { translation children Shape { appearance USE White geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Coordinate Systems # Second archway Transform { translation children [ USE LeftColumn, USE RightColumn, USE ArchwaySpan ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating Shapes  In order to make the object more realistic, we must also control the orientation or rotation using the rotation field of the Transform node  A rotation axis is an imaginary line about which a coordinate system in rotated  A rotation axis can point to any direction in space  In order to specify a direction for a rotation axis, one could imagine drawing a line between two coordinates in space

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating Shapes  Usually, one coordinate corresponds to the origin. Therefore in specifying a rotation axis, (0, 1.0, 0) and (0, 2.0, 0) are all equivalent as they all point upwards  In addition to specifying a rotation axis, we must also indicate how much we want the new coordinate system to rotate about that axis and this value is measured in radian  By default, the centre of rotation is the origin of that coordinate system

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating Shapes  Using the Transform node, we could specify the 3D coordinates for rotation centre within a new coordinate system Transform { children [ ]# exposedField MFNode translation # exposedFieldSFVec3f rotation # exposedFieldSFRotation scale # exposedFieldSFVec3f scaleOrientation # exposedFieldSFRotation bboxCenter # fieldSFVec3f bboxSize # fieldSFVec3f center # exposedFieldSFVec3f addChildren# eventInMFNode removeChildren# eventOutMFNode }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating Shapes  The values of the rotation exposed field specify a rotation axis about which the new coordinate system and a rotation angle, measured in radian  The rotation exposed field value can be changed by routing an event to the exposed field’s implied set_rotation eventIn.  When the event is received, the rotation field is set and the new rotation is sent using the exposed field’s implied rotation_changed eventOut

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating in Different Direction #VRML V2.0 utf8 Transform { rotation children [ Shape { appearance Appearance { material Material { } } geometry Box { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating in Different Direction #VRML V2.0 utf8 Transform { rotation children [ Shape { appearance Appearance { material Material { } } geometry Box { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating in Different Direction #VRML V2.0 utf8 Transform { rotation children [ Shape { appearance Appearance { material Material { } } geometry Box { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating in Different Direction #VRML V2.0 utf8 Transform { rotation children [ Shape { appearance Appearance { material Material { } } geometry Box { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Rotated Coordinate Systems #VRML V2.0 utf8 Group { children [ # Arm 1 DEF Arm1 Shape { appearance Appearance { material Material { } } geometry Cylinder { height 1.0 radius 0.1 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Rotated Coordinate Systems # Arm 2 Transform { rotation children USE Arm1 }, # Arm 3 Transform { rotation children USE Arm1 } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Rotated Coordinate Systems #VRML V2.0 utf8 Group { children [ # Arm 1 DEF Arm1 Shape { appearance Appearance { material Material { } } geometry Cylinder { height 1.0 radius 0.1 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Rotated Coordinate Systems # Arm 2 DEF Arm2 Transform { rotation children USE Arm1 }, # Arm 3 DEF Arm3 Transform { rotation children USE Arm1 },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Rotated Coordinate Systems # Arms 4 and 5 Transform { rotation children [ USE Arm2, USE Arm3 ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Rotating Coordinate Systems #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Rotating Coordinate Systems # First archway # Left Column DEF LeftColumn Transform { translation children DEF Column Shape { appearance USE White geometry Cylinder { radius 0.3 height 6.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Rotating Coordinate Systems # Right Column DEF RightColumn Transform { translation children USE Column }, # Archway span DEF ArchwaySpan Transform { translation children Shape { appearance USE White geometry Box{ size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Rotating Coordinate Systems # Left Roof DEF LeftRoof Transform { translation rotation children DEF Roof Shape { appearance USE White geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Rotating Coordinate Systems # Right Roof DEF LeftRoof Transform { translation rotation children USE Roof } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating about a Center Point #VRML V2.0 utf8 Group{ children [ # Lamp base Shape { appearance DEF White Appearance { material Material { } } geometry Cylinder { radius 0.1 height 0.01 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Rotating about a Center Point # Base joint Transform { translation rotation center children [ # Lower arm Shape { appearance USE White geometry Cylinder { radius 0.01 height 0.3 } ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling Shapes  VRML also enables us to scale a coordinate system, increasing or decreasing the size relative to a parent coordinate system  Shapes created within the scaled coordinate system are built at the new scale of the coordinate system  By scaling coordinate systems, we can enlarge or shrink shapes or groups of shapes  A scale factor is used in scaling and this scale factor is a multiplication factor.  If the value of this scale factor is 0.5, then the original object will shrink in size by half

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling Shapes  The Transform node’s scale field uses three scale factors, one along the x-axis, one along the y-axis and one along the z-axis  By default, the centre of scaling is the original of that coordinate system  Now we could make use of the combination of translation, rotation and scaling within the same Transform node to achieve the effect that we want  The value of the scale exposed field specify the scale factors in the X, Y and Z directions for the new coordinate system

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling Shapes  All the scale factors have to be a positive value  Values between 0.0 and 1.0 would imply reduction and values above 1.0 would imply expansion  The value of the scaleOrientation field specify a rotation axis and angle which to rotate the new coordinate system prior to scaling, and then unrotate if after scaling  Like the rotation field, the first values specify the X, Y and Z components of a 3D coordinate in the new, translated coordinate system and last value specifies the rotation angle measured in radian

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling in Different Direction #VRML V2.0 utf8 Transform { scale children [ Shape { appearance Appearance { material Material { } } geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling in Different Direction #VRML V2.0 utf8 Transform { scale children [ Shape { appearance Appearance { material Material { } } geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling in Different Direction #VRML V2.0 utf8 Transform { scale children [ Shape { appearance Appearance { material Material { } } geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling in Different Direction #VRML V2.0 utf8 Transform { scale children [ Shape { appearance Appearance { material Material { } } geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling in Different Direction #VRML V2.0 utf8 Transform { scale children [ Shape { appearance Appearance { material Material { } } geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Scale Coordinate Systems #VRML V2.0 utf8 Group { children [ # Wing Transform { scale children Shape { appearance DEF White Appearance { material Material { } } geometry Cylinder { radius 1.0 height } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Constructing Multiple Scaled Coordinate Systems # Fuselage Transform { scale children Shape { appearance USE White geometry Sphere { } } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Scaled Coordinate Systems #VRML V2.0 utf8 Group { children [ # Wing DEF Wing Transform { scale children Shape { appearance DEF White Appearance { material Material { } } geometry Cylinder { radius 1.0 height } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Scaled Coordinate Systems # Fuselage DEF Fusalage Transform { scale children Shape { appearance USE White geometry Sphere { } } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Nesting Scaled Coordinate Systems # Wing detail and fusalage dome Transform { scale children [ USE Wing, USE Fusalage ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems # First archway DEF Archway Group { children [ # Left Column DEF LeftColumn Transform { translation children DEF Column Shape { appearance USE White geometry Cylinder { radius 0.3 height 6.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems # Right Column DEF RightColumn Transform { translation children USE Column }, # Archway span DEF ArchwaySpan Transform { translation children Shape { appearance USE White geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems # Left Roof DEF LeftRoof Transform { translation rotation children DEF Roof Shape { appearance USE White geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems # Right Roof DEF RightRoof Transform { translation rotation children USE Roof } ] }, # Left small archway Transform { translation scale children USE Archway },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Translating and Scaling Coordinate Systems # Right small archway Transform { translation scale children USE Archway } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling about a Center Point #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling about a Center Point # Tree Transform { translation scale center children [ # Trunk Shape { appearance USE White geometry Cylinder { radius 0.5 height 2.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Scaling about a Center Point # Branches Transform { translation children Shape { appearance USE White geometry Cone { bottomRadius 2.0 height 4.0 } ] } ] }

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Using a Scale Orientation #VRML V2.0 utf8 Group { children [ # Ground Shape { appearance DEF White Appearance { material Material { } } geometry Box { size } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Using a Scale Orientation # Tree Transform { translation scale scaleOrientation center children [ # Trunk Shape { appearance USE White geometry Cylinder { radius 0.5 height 2.0 } },

© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Using a Scale Orientation # Branches Transform { translation children Shape { appearance USE White geometry Cone { bottomRadius 2.0 height 4.0 } ] } ] }