j3d.org Code

org.j3d.renderer.java3d.geom
Class Knot

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

public class Knot
extends java.lang.Object

A mobius strip with specified number of divisions per circle-strip, number of divisions per strip (lengthwise), and appearance.

The algorithm was adapted from Tore Nordstrand's Math Image Gallery: http://www.uib.no/people/nfytn/mathgal.htm

Version:
$Revision: 1.1 $
Author:
Unknown

Field Summary
 javax.media.j3d.QuadArray knotGeometry
           
 
Constructor Summary
Knot(javax.media.j3d.Appearance knotAppearance)
          Constructs a knot with 80 divisions per strip, 12 strips, appearance 'knotAppearance' at 0,0,0.
Knot(int divs, int strips, javax.media.j3d.Appearance knotAppearance)
          Constructs a knot with number of divisions per strip 'divs', number of strips 'strips', appearance 'knotAppearance' at 0,0,0.
Knot(int divs, int strips, float xpos, float ypos, float zpos, javax.media.j3d.Appearance knotAppearance)
          Constructs a knot with number of divisions per strip 'divs', number of strips 'strips', appearance 'knotAppearance' 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

knotGeometry

public javax.media.j3d.QuadArray knotGeometry
Constructor Detail

Knot

public Knot(javax.media.j3d.Appearance knotAppearance)
Constructs a knot with 80 divisions per strip, 12 strips, appearance 'knotAppearance' at 0,0,0.


Knot

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


Knot

public Knot(int divs,
            int strips,
            float xpos,
            float ypos,
            float zpos,
            javax.media.j3d.Appearance knotAppearance)
Constructs a knot with number of divisions per strip 'divs', number of strips 'strips', appearance 'knotAppearance' 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