Escolar Documentos
Profissional Documentos
Cultura Documentos
Computer Graphics
Presentation
„F‟->”F-F++F-F”
In the first stage the initial string is called the atom.
S1=“F-F++F-F”(1st curve)
S2=“F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F”(2nd
curve)
String Production and Peano
Curves
Call Produce String Function and read a string from
the Input file which contains the atoms and finally
writes it in the Output file the Desired Curve.
String Production and Peano
Curves
Where in each string is repeatedly fed back into same function and
produce the next higher order object.
Extending the Language
A richer set of curves can be generated by adding more rules to
string production process
The rule is that any X and Y characters are ignored where as F , +
and – are interpreted as before.
The atom is FX here.
For Example X and Y in FX+YF is interpreted as F+F+
Extending the Language
For the second order Dragon the turtle Responds to F+F++-F-F+
instead of S2=FX+YF++-FX-YF+.
The Resultant Curve is shown Below.
Producing String Recursively
and Drawing in a program.
To do this we store the variable called Order, the number of times to
apply the rule to the String.
For + and – the turtle turn accordingly but if the order is zero the turtle
moves forward for F. else it calls the Function it self to produce the
desired string
Curves based on String
Production
The five key intergradient's for each curve (atom, F-string, X-String,
Y-String, angle in degrees)
Curves based on String
Production
Allowing Branching
We need a character that commands the turtle to save its
current state