Fractals[LSystem] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Fractals : Lindenmayer System : Fractals/LSystem/LSystemExamples

Fractals[LSystem]

  

LSystemExamples

  

Lindenmayer System Examples

 

Description

Examples

Compatibility

Description

• 

LSystemExamples is a package that exports 12 examples of Lindenmayer Systems that are ready for use with the LSystemPlot, and Iterate commands

• 

The 12 exported Lindenmayer Systems:

– 

SierpinskiTriangle

– 

Tree

– 

KochCurve

– 

FractalPlant

– 

DragonCurve

– 

GosperCurve

– 

Box

– 

Seaweed

– 

Crystal

– 

Rings

– 

Carpet

– 

PenroseTiling

• 

Each example is itself a module with four exports:

  

IterationRules, InitialState, PlottingConstants, and  InitialAngle

• 

IterationRules defines the rules of the LSystem Iteration process

• 

InitialState defines the Initial String of the LSystem

• 

PlottingConstants defines the plotting procedures that each character represents

• 

InitialAngle defines the initial plotting angle of the LSystem

• 

These exports can be given to LSystemPlot, and Iterate directly as input (for the respective parameters).

• 

LSystemExamples also exports three functions:

  

PlotExample, ViewStateAsString, ViewRulesAsStrings.

• 

PlotExample accepts an exported LSystem example and an optional positive integer (the default value is 1) to specify how many times the iteration rule will be applied to the initial state. PlotExample returns a plot of the LSystem.

• 

ViewStateAsString accepts an LSystem state and prints the string representing the state.

• 

ViewRulesAsStrings accepts a table of LSystem rules and prints the rules as a list(string=string).

Examples

withFractals:-LSystem:

withLSystemExamples:

LSKochKochCurve

LSKochKochCurve

(1)

ViewStateAsStringLSKoch:-InitialState

F

(2)

ViewRulesAsStringsLSKoch:-IterationRules

F=F+F-F-F+F

(3)

PlotExampleLSKoch

PlotExampleLSKoch,6

LSGosperCurveGosperCurve

LSGosperCurveGosperCurve

(4)

ViewStateAsStringLSGosperCurve:-InitialState

X

(5)

ViewRulesAsStringsLSGosperCurve:-IterationRules

Y=+X-YY--Y-X++X+Y,X=X-Y--Y+X++XX+Y-

(6)

PlotExampleLSGosperCurve

PlotExampleLSGosperCurve,5

Compatibility

• 

The Fractals:-LSystem:-LSystemExamples package was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.