Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.0

Bring Colours to Your Life.

X3D Reference

Building extruded shapes

Motivation

Extruded shapes are very common

  • Tubes, pipes, bars, vases, donuts
  • Other tricky uses...

How can you do it:

  • You can build extruded shapes using an IndexedFaceSet node.
  • You can build extruded shapes more easily and efficiently using an Extrusion node.

Creating extruded shapes

Extruded shapes are described by:

  • A 2-D cross-section
  • A 3-D spine along which to sweep the cross-section

Extruded shapes are like long bubbles created with a bubble wand:

  • The bubble wand's outline is the cross-section
  • The path along which you swing the wand is the spine

Syntax: Extrusion

An Extrusion geometry node creates extruded geometry:

  • crossSection - 2-D cross-section
  • spine - 3-D sweep path
  • endCap and beginCap - cap ends

An Extrusion geometry node creates extruded geometry:

  • solid - shape is solid
  • ccw - faces are counter-clockwise
  • convex - faces are convex

Squishing and twisting extruded shapes

You can scale the cross-section along the spine:

  • Vases, musical instruments
  • Surfaces of revolution

You can rotate the cross-section along the spine

  • Twisting ribbons

Syntax: Extrusion

An Extrusion geometry node creates geometry using:

  • scale - cross-section scaling per spine point
  • orientation - cross-section rotation per spine point

Summary

  • An Extrusion node efficiently creates extruded shapes
  • The crossSection field specifies the cross-section
  • The spine field specifies the sweep path
  • The scale and orientation fields specify scaling and rotation at each spine point