j3d.org Code

org.j3d.renderer.java3d.geom
Class Mobius

java.lang.Object
  extended byorg.j3d.renderer.java3d.geom.Mobius

public class Mobius
extends java.lang.Object

A mobius strip with specified number of divisions per strip, number of strips, position, and appearance.

The algorithm was adapted from Tore Nordstrand's Math Image Gallery: http://www.uib.no/people/nfytn/mathgal.htm (This algorithm is not perfect yet: The strips are slightly out of alignment. This is easy to see with a small number of strips

Version:
$Revision: 1.1 $
Author:
Unknown

Field Summary
 javax.media.j3d.QuadArray mobiusGeometry
           
 
Constructor Summary
Mobius(javax.media.j3d.Appearance mobiusAppearance)
          Constructs a mobius strip with 28 divisions per strip, 14 strips, appearance 'mobiusAppearance' at 0,0,0.
Mobius(int divs, int strips, javax.media.j3d.Appearance mobiusAppearance)
          Constructs a mobius strip with number of divisions per strip 'divs', number of strips 'strips', appearance 'mobiusAppearance' at 0,0,0.
Mobius(int divs, int strips, float xpos, float ypos, float zpos, javax.media.j3d.Appearance mobiusAppearance)
          Constructs a mobius strip with number of divisions per strip 'divs', number of strips 'strips', appearance 'mobiusAppearance' at xpos,ypos,zpos.
 
Method Summary
 javax.media.j3d.Shape3D getChild()
           
 javax.media.j3d.QuadArray getQuadArray()
           
 void Scale(float xs, float ys, float zs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mobiusGeometry

public javax.media.j3d.QuadArray mobiusGeometry
Constructor Detail

Mobius

public Mobius(javax.media.j3d.Appearance mobiusAppearance)
Constructs a mobius strip with 28 divisions per strip, 14 strips, appearance 'mobiusAppearance' at 0,0,0.


Mobius

public Mobius(int divs,
              int strips,
              javax.media.j3d.Appearance mobiusAppearance)
Constructs a mobius strip with number of divisions per strip 'divs', number of strips 'strips', appearance 'mobiusAppearance' at 0,0,0.


Mobius

public Mobius(int divs,
              int strips,
              float xpos,
              float ypos,
              float zpos,
              javax.media.j3d.Appearance mobiusAppearance)
Constructs a mobius strip with number of divisions per strip 'divs', number of strips 'strips', appearance 'mobiusAppearance' at xpos,ypos,zpos.

Method Detail

Scale

public void Scale(float xs,
                  float ys,
                  float zs)

getChild

public javax.media.j3d.Shape3D getChild()

getQuadArray

public javax.media.j3d.QuadArray getQuadArray()

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org