Information on the Extrusion examplesThese two example VRML scenes are made using a regular text editor only. It is a test to show of the power of the Extrusion node, and how it can be used. B
The Rotating Torus and SphereVRML Scene, Source code
This VRML scene consist of a torus rotating around a sphere. The torus was made using the Extrusion node. The cross-section is an approximate circle with 8 vertices, and the spine (path) is an approximate circle with 16 vertices. This results in a rather edgy torus, but saves a lot of disk and memory space, compared to what it would be like described vertex for vertex.
The Sphere is made using the VRML Sphere primitive. It is placed within a Billboard node, which means the Y-axis will point to the viewer at all times. The camera (Viewpoint) is then placed at 35 meters from the origin of the scene (which is in the middle of the sphere), and the camera is rotated a little to view the torus from a higher angle. A TimeSensor is looping and triggers a PositionInterpolator that moves the camera in a circle with radius 35 from the origin, and an OrientationInterpolator makes sure the camera is pointed towards the origin at all times.
The camera is the only thing moving, but this creates an illusion that the objects are in fact what appears to be moving. And the sphere seems to have a different rotation from the rest of the scene, but this is a result of the Y-axis always turning against the viewer.
Both the sphere and the Torus have been texturemapped with a Rainbow GIF texture.
The Glass, Bottle and StrawberriesVRML Scene, Source Code
All models in this scene have been created with extrusion. The glass, the bottle, and the cork is a result of extruding approximate circles (16 vertices) along a straight spine. The circles are scaled uniformly in the spine nodes to create the models, which makes them look like surfaces of revolution.
The red part of the strawberries is created with the same circular cross-section but it is scaled differently along the X-axis than along the Y-axis. This creates a more elliptic shape. The green part is created by extruding a triangular cross-section along a straight spine, and is PROTOtyped. The PROTO is then used in the Strawberry PROTOtype and rotated around the Y-axis in 8 different angles. The Strawberry proto is then made to create two identical strawberries from different angles.
Because of my clumsiness I accidently created the whole scene up-side-down, so the viewport is rotated 180 degrees around the X-axis.
Back to main Thesis page