Java 3D

Example programs

 

Programs mentioned in the book
BackgroundExample An image from file as background. This program requires the file darkclouds.jpg. A background with a homogeneous colour can be found in the program StaticSceneExample.
ClippingPlanes Modification of the clipping volume by the angle for the field of view and the front and the back clipping plane
CollisionBehaviour1 A class that is used in CollisionExample in order to change the colour of an object when a collision occurs. A Switch is used here.
CollisionBehaviour2 A class that is used in CollisionExample in order to move an object when a collision occurs
CollisionExample Example for the application of collision detection. Uses also a Switch and navigation via keyboard commands. The classes CollisionBehaviour1 and CollisionBehaviour2 are needed.
ExpFogExample Exponential fog and the multiple use of transformation group in a scene as a Link
Extract3DExample Loading an object from a file in Wavefront Object Format. Only a selected part of the whole object is included in the scene. The file schiff.obj is required.
GeomArrayExample Definition of an object (tetrahedron) with triangles
InteractionExample Picking objects with the mouse and initiating movements. The class PickingExample is needed.
InteractionTest Picking objects with the mouse. Using the class PickingTest the name of the picked object is printed.
LightingExample Use of different light sources and different reflection properties of surfaces
LightingExample2 A rotating light source causing unrealistic colour effects for objects with badly modelled reflection properties
LinFogExample Linear fog and the multiple use of transformation group in a scene as a Link
Load3DExample Loading and displaying an object from a file in Wavefront Object Format. Printing out the names of all subobjects. Assigning a new colour to one of the sub-objects. The file schiff.obj is needed.
MovingLight A moving light source
MovingSpotLight A spotlight rotating around the scene. The intensity in the cone of light is constant and drops abruptly to zero at the edge.
NormalsForGeomArrays Definition of an object (tetrahedron) with triangles. Normal vectors are interpolated.
PickingExample A class needed for InteractionExample for initiating movements and scalings for picked objects.
PickingTest A class needed for InteractionTest in order to print out the names of picked objects
ShadingExample Use of constant instead of Gouraud shading
SimpleAnimation3d A simple animation with a starting and landing helicopter
SoundExample Incorporating sound effects into a scene in the form of a BackgroundSound and a PointSound. The files bgsound.wav, psound.wav and darkclouds.jpg are needed.
StaticSceneExample A static scene with a helicopter and a tree
TesselationBWExample Wire frame model of a static scene with a helicopter and a tree
TesselationExample Part of a static scene with a helicopter and a tree shown as a wire frame model
TesselationResolution Approximation of the surface of a sphere with different numbers of triangles
TextureExample Loading a texture from a file and mapping it to an object's surface. The file myTexture.jpg is needed.
TransparencyExample Example for interpolated and screen-door transparency
ViewParallelProjection Parallel projection for displaying a static scene with a helicopter and a tree

 

Additional Programs
ExtendedSimpleAnimation3d Extension of the scene with flying helicopter (see SimpleAnimation3d) by a tail rotor. (By G. Gehrmann)
GDVStuhlWS0405 A chair
TischClass A table (by G. Gehrmann)
BuildAChair A self-assembling chair with a rotating cube on it (by K. Riewe, M. Wernicke and H. Noehrenberg)
MyTent A wedge composed of triangles (by K. Riewe, M. Wernicke and H. Noehrenberg)
Alpha An interactive tool to visualise, how the Alpha-class in Java 3D controls interpolations. The main class is MVC.java. (By F. Knye)

 

Supplementary files
myTexture.jpg is used as texture in TextureExample.
schiff.obj Wavefront object needed in Load3DExample and Extract3DExample
darkclouds.jpg is used as background in BackgroundExample and SoundExample.
bgsound.wav is used in SoundExample.
psound.wav is used in SoundExample.


Copyright: Springer and Frank Klawonn
Optimised for 1024x768
We do not take any responsibility or liability for linked pages.