vmm.fractals
Class Hilbert

java.lang.Object
  extended by vmm.core.Exhibit
      extended by vmm.fractals.RepeatedSegmentFractal
          extended by vmm.fractals.Hilbert
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable

public class Hilbert
extends RepeatedSegmentFractal

The square-filling Hilbert curve.


Nested Class Summary
 
Nested classes/interfaces inherited from class vmm.fractals.RepeatedSegmentFractal
RepeatedSegmentFractal.RSFView
 
Field Summary
 
Fields inherited from class vmm.fractals.RepeatedSegmentFractal
colorRepeatFactor, fastDrawRecursionLevel, fractality, recursionLevel
 
Fields inherited from class vmm.core.Exhibit
decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform
 
Constructor Summary
Hilbert()
           
 
Method Summary
protected  Complex[] computeNextLevel(Complex[] hilbertCurve, int computedLevel)
          This abstract method computes one approximation level from the previous one, which has already been computed.
 ActionList getActionsForView(View view)
          Adds a submenu that contains commands for selecting the value of the segmentChoice property.
 int getSegmentChoice()
          Returns the value of the segmentChoice property.
 void setSegmentChoice(int segmentChoice)
          Sets the value of the segmentChoice property.
 
Methods inherited from class vmm.fractals.RepeatedSegmentFractal
computeDrawData, doDraw, getCreateAnimation, getDefaultView
 
Methods inherited from class vmm.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addParameter, addView, clearDecorations, computeDrawDataHook, doDrawHook, fireExhibitChangeEvent, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeParameter, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hilbert

public Hilbert()
Method Detail

getSegmentChoice

public int getSegmentChoice()
Returns the value of the segmentChoice property.

See Also:
setSegmentChoice(int)

setSegmentChoice

public void setSegmentChoice(int segmentChoice)
Sets the value of the segmentChoice property. Legal values are 1 to 4. This property determines the shape of the segment that is repeated to make an approximation of the fractal curve.

Parameters:
segmentChoice - The new value of the segmentChoice property. Should be in the range 1 to 4; otehr values will be silently ignored.

getActionsForView

public ActionList getActionsForView(View view)
Adds a submenu that contains commands for selecting the value of the segmentChoice property.

Overrides:
getActionsForView in class Exhibit

computeNextLevel

protected Complex[] computeNextLevel(Complex[] hilbertCurve,
                                     int computedLevel)
Description copied from class: RepeatedSegmentFractal
This abstract method computes one approximation level from the previous one, which has already been computed. This abstract method must be defined in any concrete subclass.

Specified by:
computeNextLevel in class RepeatedSegmentFractal
Parameters:
hilbertCurve - This array stores the points that have been computed for the current approximation level. This array can be null, if the computedLevel is zero.
computedLevel - This is the approximation level that has been comptuted to get the points in curvePoints. A zero value for this paramter means that the first, or base level, approximation should be computed.
Returns:
An array containing the points in the next level approximation of the curve.