Class Sierpinski

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

public class Sierpinski
extends RepeatedSegmentFractal

The fractal "Sierpinski" curve.

Nested Class Summary
Nested classes/interfaces inherited from class vmm.fractals.RepeatedSegmentFractal
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
Method Summary
protected  Complex[] computeNextLevel(Complex[] sierpinskiCurve, 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.
 boolean getUseInjectiveCurve()
          Returns the value of the useInjectiveCurves property.
 void setUseInjectiveCurves(boolean useInjectiveCurves)
          Sets the value of the setUseInjectiveCurves 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


public Sierpinski()
Method Detail


public boolean getUseInjectiveCurve()
Returns the value of the useInjectiveCurves property.


public void setUseInjectiveCurves(boolean useInjectiveCurves)
Sets the value of the setUseInjectiveCurves property. This property determines which of two approximations of the Sierpinski curve is drawn.

useInjectiveCurves - If set to true, then an injective approximation is used for the Sierpinski curve. Otherwise, a non-injective approximation is used.


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

getActionsForView in class Exhibit


protected Complex[] computeNextLevel(Complex[] sierpinskiCurve,
                                     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
sierpinskiCurve - 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.
An array containing the points in the next level approximation of the curve.