Previous Page Next Page Contents

plot::Lsys -- graphical primitive for a Lindenmayer system

Introduction

plot::Lsys(deg, start, rule...) represents a Lindenmayer system with turning degree deg, starting word start and rule set rule....

Creating Elements

plot::Lsys(deg, start, rule...)

Parameters

deg - the degree by which the turtle turns left or right, an arithmetical expression
start - the starting word of the system, a string
rule - a rule of the system, an equation

Related Domains

plot::Scene, plot::Turtle

Related Functions

plot

Details

Result of Evaluation

Evaluating an object of type plot::Lsys returns itself.

Method getPlotdata: create the plot data of a Lindenmayer system

Method slot: read and write attributes and plot options

Method print: print a Lindenmayer system

Example 1

We simply list some examples without any interpretation:

>> L := plot::Lsys(90, "F-F-F-F", "F"="F-F+F+FF-F-F+F"):
   L::generations := 4:
   plot(L, Axes = None)
>> L := plot::Lsys(90, "F-F-F-F", "F"="FF-F--F-F"):
   L::generations := 4:
   plot(L, Axes = None)
>> L := plot::Lsys(90, "F-F-F-F", "F"="FF-F+F-F-FF"):
   L::generations := 4:
   plot(L, Axes = None)
>> L := plot::Lsys(90, "L", "L"="L+R+", "R"="-L-R", "L"=Line, "R"=Line):
   L::generations := 10:
   plot(L, Axes = None)
>> L := plot::Lsys(60, "R", "L"="R+L+R", "R"="L-R-L", "L"=Line, "R"=Line):
   L::generations := 7:
   plot(L, Axes = None)
>> L := plot::Lsys(20, "L", "L"="R[+L]R[-L]+L", "R"="RR", "L"=Line, "R"=Line):
   L::generations := 6:
   plot(L, Axes = None)
>> L := plot::Lsys(20, "L", "L"="BR[+HL]BR[-GL]+HL", "R"="RR",
                   "L"=Line, "R"=Line,
                   "B"=RGB::Brown, "H"=RGB::ForestGreen,
                   "G"=RGB::SpringGreen):
   L::generations := 6:
   plot(L, Axes = None)
>> L := plot::Lsys(60, "F++F++F", "F"="F-F++F-F"):
   L::generations := 5:
   plot(L, Axes = None)

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000