W2513 Emergence & Lindenmayer Systems (Part 3)

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

DRAFT ICON

Emergence & Lindenmayer Systems (Part 3)[edit]

Serpinski Lsystem

Prerequisites[edit]

Research[edit]

Background[edit]

Experiment[edit]

Getting Started[edit]

Breathe-document-new

Begin a new project


Create an Igis shell project within your "project" directory.

cd ~/projects
git clone https://github.com/TangoGolfDigital/IgisShell IgisShell-LSystems

Enter into the Sources directory of the new project.

cd IgisShell-LSystems/Sources/IgisShell/

Build the project. (This may take some time.)

swift build
Start button green arrow

Run the project.


swift run

Open a browser (or use a new tab on an already-open browser). Go to the URL: http://www.codermerlin.com/users/user-name/dyn/index.html

NOTE: You MUST change user-name to your actual user name. For example, http://www.codermerlin.com/users/john-williams/dyn/index.html

You'll know your successful if you see the title bar change to "Coder Merlin: IGIS". (The browser window will be blank because we haven't added any graphics yet.)

Oxygen480-actions-help-hint.svg Helpful hint: It's useful to bookmark this page in your browser.

First Steps[edit]

Add your LSystem File[edit]

Add your LSystem file from your previous project to your current project.

Warning icon.svg Warning: Be careful to rename this file during the copy operation so that you don't overwrite the current main.swift.

Assuming that your previous project is in the directory ~/Merlin/2512 CS-II Lindenmayer Systems/100 Lindenmayer/C100 LSystem-Swift:

cp ~/Merlin/2512\ CS-II\ Lindenmayer\ Systems/100\ Lindenmayer/C100\ LSystem-Swift/main.swift LSystem.swift

Remove LSystem Global Functions[edit]

Remove your global functions and variables from LSystem.swift, leaving only the classes (e.g. class ProductionRule, class LSystem) which you've defined. Then, ensure that you're able to successfully compile.

swift build

Be sure that you're able to successfully compile before continuing.

Geometric Structures[edit]

Recall from your previous lab that Lindenmayer Systems are defined by G = (V, ω, P) along with a mechanism to translate the generated strings into geometric structures. This lab will focus on this mechanism.

Exercises[edit]

Key Concepts[edit]