From c43a10f5d0a5ffbda63134d3effcda7f049a7c38 Mon Sep 17 00:00:00 2001 From: Rachel Lin <43388455+RachelDLin@users.noreply.github.com> Date: Wed, 4 Oct 2023 20:10:10 -0400 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b8df762..5c1327a 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,26 @@ Look at these iterations (n = 1, 2, 3) of a one-rule grammar. Using the built in square2 square3 +Solution: +![Screenshot 2023-10-04 192106](https://github.com/RachelDLin/lab04-lsystems/assets/43388455/e13e559c-0611-4a55-8aee-6882c6b23fa0) + +I noticed that the image from the first iteration is used recursively as a new "line segment" in the second iteration. I used this idea to write a recursive rule that has one stem with two branches coming off of it. I also noticed that in the second iteration, each repeated segment rotates off of the previous one. To account for this, I added a rotation at the end of the entire recursive rule. + ## 2. Square grammar puzzle How about this one?\ square1 square2 square3 +Solution: +![Screenshot 2023-10-04 192134](https://github.com/RachelDLin/lab04-lsystems/assets/43388455/f7989855-6e05-4ec3-abb6-a00b7de29a26) + +Similar to the previous puzzle, the pattern is plugged recursively into itself. I simply made a recursive rule for the L-system that goes straight, turns clockwise, goes straight, turns counter-clockwise, goes straight, turns counter-clockwise again, goes straight, turns clockwise, and goes straight. + ## 3. Custom plant Choose a plant in the world. Working off a reference, design a grammar that mimics the structure of that plant. Unlike our simple puzzles, please use multiple rules for greater complexity. You can take this as an opportunity to design a grammar for your homework assignment! Include images of your grammar's output. -## Submission -- Create a pull request against this repository -- In your readme, list your solutions to the puzzles, then your custom grammar and images of a few iterations of output -- Profit +Solution: +![Screenshot 2023-10-04 192322](https://github.com/RachelDLin/lab04-lsystems/assets/43388455/62ba604e-4595-4ff2-a1d3-ec29eddd2e81) + +I used the idea of a recursive rule that was implemented in the previous two parts. I started out creating a fern-like shape by having a middle stem with branches going off of it symmetrically that gradually taper towards the top of the branch. I then added a few commands to pitch down and roll clockwise at certain points in the rule. This was to add some more dimension to the shape and get a spiral shape.