Unformatted text preview:

1L-Systems11-21-20052Opening Discussion■What did we talk about last class?■Since I'm going to be talking to Dr. Livingstone about BLAST tomorrow I figure we should hold off on doing that topic until then. Instead, we are going to do a fun overlap between Biology and CS today.3References in Perl■Since living without references is such a pain, lets talk really quickly about how to use references in Perl.■A reference is a scalar value that can refer to a scalar, a list, or a hash. You get a reference to a variable by prefixing it with \.■Inside of a function you treat the reference like a scalar, but when you what to pull out what it refers to you put an extra special symbol in front. You use $$ to dereference a scalar reference, @$ to dereference a list and %$ for a hash.4L-Systems■L-Systems were developed by Lindenmayer to model the growth of various biological systems.■They are grammars much like what we discussed before for Chomsky grammars. However, in an L-system, all the characters have productions applied to them in parallel. Some characters can become themselves.■There are numerous types of L-systems. They can be context free or context sensitive. They can be deterministic or stochastic. For more power they can be parameterized or extended.5Graphical Interpretation■Most applications of L-systems involve converting the strings over to some type of graphical representation. This is typically done with turtle graphics.■There are two characters for move forward and draw a line forward (F, f). There are also various characters for rotating either in 2-D or 3-D space (+, -, ...). Lastly, they typically have some type of push and pop characters for the positions of things ([, ]).6Example■This figure shows some simple grasses generated with L-systems.7More■Let's go look at some L-systems stuff now and write some code in Perl to do L-systems as strings. We don't have any ability to draw in Perl so we can't render those strings unless we write to file and then read it back in in a different language.8Reminders■Remember that assignment #9 is due


View Full Document

TRINITY CSCI 2323 - L-Systems

Documents in this Course
Load more
Download L-Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view L-Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view L-Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?