Skip to content

ading0/lab03-grammars

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

lab03-grammars

Let's practice using grammars! For this lab, please pull up the L-system node in Houdini.

Solutions

by Andrew Ding

  1. with an angle of 20 degrees,

rules_1

  1. with an angle of 90 degrees,

rules_2

I chose the dragon blood tree.

reference:

ref_3

rules for generation:

rules_3

generated attempt (shown at 10 generations)

gen_3

There are visually two distinct parts to the tree; the branches which multiply quickly and the leaves which are short and thin.

The leaves exhibit no fractal pattern, which made it very difficult to find rules that had no generation limit. Duplication with a L-system is mainly accomplished by duplicating a symbol (e.g. A <- AA) and allowing that symbol to generate fully. There is a symbol for the leaves, L, but that symbol can't be duplicated because the leaves should only be drawn once; consequently, the generation where L is replaced by draw commands is the last one. (It's probably possible to find a different solution with other L-system capabilities, but I think it would be arduous.)

In this case, after the 7th generation the L-system is stationary. I used a symbol variable for B to keep track of the number of generations; B is also used to generate the branches, which were allowed to proliferate until the 6th generation. Random rotations of the branches ended up frequently looking bad; the tree was pretty much always asymmetric, so I just used four deterministically-rotated branches in each generation.

The results aren't perfect. A lot depends on the length/thickness scale per branch (in the B(i) rule), as well as the branch pitch (currently 30 degrees) each generation. I think that for a more accurate tree, the branch pitch can't be the same across all generations.

Because of the finite-generation approach, in the intermediate generations the tree is bare of leaves:

midgen_3

1. Wheat grammar puzzle

Look at these iterations (n = 1, 2, 3) of a one-rule grammar. Using the built in symbols in Houdini, design a grammar that produces this output. Take a screenshot of your rules.
square1 square2 square3

2. Square grammar puzzle

How about this one? Take a screenshot of your rules.
square1 square2 square3

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. Think carefully about the structure of your grammar! EXPLAIN the structure of your plant in the README. What are the components? What do each of the rules do? Be sure to also include images of a few iterations of your output plant.

Submission

  • Create a pull request against this repository
  • In your readme, list your solutions and format your README nicely
  • Profit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published