PREPARED BY : NURAINI MOHD GHANI   1
Shapes are the building blocks of a VRML worldPrimitive Shapes are standard building blocks:•Box•Cone•Cylinder•Sphere•Text...
Syntax: ShapeA Shape node builds a shapeappearance - color and texturegeometry - form, or structureshape {     appearance ...
Specifying appearanceShape appearance is described by appearance nodesFor now, well use nodes to create a shaded white   a...
Specifying geometry:    Shape geometry is built with geometry nodes:            Box    {...}            Cone { . . . }    ...
Syntax: BoxA Box geometry node builds a boxsize - width, height, depthShape {      appearance Appearance {      material M...
Syntax: Cone•  A Cone geometry node builds an upright cone•  height and bottomRadius - cylinder size•  bottom and side - p...
Syntax: Cylinder•  A Cylinder geometry node builds an upright cylinder•  height and radius - cylinder size•  bottom, top, ...
Syntax: Sphere•  A Sphere geometry node builds a sphere•  radius - sphere radiusShape {      appearance Appearance {      ...
Syntax: Text•  A Text geometry node builds text•  string - text to build•  fontStyle - font controlShape {          appear...
#VRML V2.0 utf8# A cylinderShape {     appearance Appearance {     material Material { }  }     geometry Cylinder {     he...
•   Shapes are built centered in the world•   A VRML file can contain multiple    shapes•   Shapes overlap when built at t...
 Shapes are built using a Shape node Shape geometry is built using geometry  nodes, such as Box, Cone, Cylinder,  Sphere...
Upcoming SlideShare
Loading in …5
×

VISUAL REALITY AND VRML [Chapter 2 - BUILDING PRIMITIVE SHAPES]

869 views

Published on

Visual Reality and VRML student..

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
869
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

VISUAL REALITY AND VRML [Chapter 2 - BUILDING PRIMITIVE SHAPES]

  1. 1. PREPARED BY : NURAINI MOHD GHANI 1
  2. 2. Shapes are the building blocks of a VRML worldPrimitive Shapes are standard building blocks:•Box•Cone•Cylinder•Sphere•Text PREPARED BY : NURAINI MOHD GHANI 2
  3. 3. Syntax: ShapeA Shape node builds a shapeappearance - color and texturegeometry - form, or structureshape { appearance . . . geometry . . .} PREPARED BY : NURAINI MOHD GHANI 3
  4. 4. Specifying appearanceShape appearance is described by appearance nodesFor now, well use nodes to create a shaded white appearance:Shape { appearance Appearance { material Material { } } geometry . . .} PREPARED BY : NURAINI MOHD GHANI 4
  5. 5. Specifying geometry: Shape geometry is built with geometry nodes: Box {...} Cone { . . . } Cylinder { . . . } Sphere { . . . } Text { . . . }• Geometry node fields control dimensions• Dimensions usually in meters, but can be anything PREPARED BY : NURAINI MOHD GHANI 5
  6. 6. Syntax: BoxA Box geometry node builds a boxsize - width, height, depthShape { appearance Appearance { material Material { } } geometry Box { size 2.0 2.0 2.0 }} PREPARED BY : NURAINI MOHD GHANI 6
  7. 7. Syntax: Cone• A Cone geometry node builds an upright cone• height and bottomRadius - cylinder size• bottom and side - parts on or offShape { appearance Appearance { material Material { } } geometry Cone { height 2.0 bottomRadius 1.0 bottom TRUE side TRUE }} PREPARED BY : NURAINI MOHD GHANI 7
  8. 8. Syntax: Cylinder• A Cylinder geometry node builds an upright cylinder• height and radius - cylinder size• bottom, top, and side - parts on or offShape { appearance Appearance { material Material { } } geometry Cylinder { height 2.0 radius 1.0 bottom TRUE top TRUE side TRUE }} PREPARED BY : NURAINI MOHD GHANI 8
  9. 9. Syntax: Sphere• A Sphere geometry node builds a sphere• radius - sphere radiusShape { appearance Appearance { material Material { } } geometry Sphere { radius 1.0 }} PREPARED BY : NURAINI MOHD GHANI 9
  10. 10. Syntax: Text• A Text geometry node builds text• string - text to build• fontStyle - font controlShape { appearance Appearance { material Material { } } geometry Text { string [ "Text","Shape" ] fontStyle FontStyle { style "BOLD" } }} PREPARED BY : NURAINI MOHD GHANI 10
  11. 11. #VRML V2.0 utf8# A cylinderShape { appearance Appearance { material Material { } } geometry Cylinder { height 2.0 radius 1.5 } } PREPARED BY : NURAINI MOHD GHANI 11
  12. 12. • Shapes are built centered in the world• A VRML file can contain multiple shapes• Shapes overlap when built at the same location PREPARED BY : NURAINI MOHD GHANI 12
  13. 13.  Shapes are built using a Shape node Shape geometry is built using geometry nodes, such as Box, Cone, Cylinder, Sphere, and Text ·Text fonts are controlled using a FontStyle node PREPARED BY : NURAINI MOHD GHANI 13

×