tutorials:simple-tomato-model
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorials:simple-tomato-model [2024/12/07 13:58] – [Preliminary steps] ksmolen | tutorials:simple-tomato-model [2024/12/07 16:02] (current) – [A simple tomato plant model] ksmolen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== A simple tomato plant model ====== | ====== A simple tomato plant model ====== | ||
| - | In this tutorial we will create a simple model of architecture and development | + | In this tutorial we will create a simple model of a tomato plant architecture. |
| ===== Preliminary steps ===== | ===== Preliminary steps ===== | ||
| Line 77: | Line 77: | ||
| ==== Specifying organ geometry ==== | ==== Specifying organ geometry ==== | ||
| - | The geometry of organs will be specified using instantiation rules '' | + | We extend the modules' |
| An '' | An '' | ||
| Line 199: | Line 199: | ||
| </ | </ | ||
| - | By applying | + | The turtle command '' |
| + | |||
| + | Now that we have specified the '' | ||
| + | |||
| + | By applying | ||
| In tomato, after a certain number of phytomers (internodes with leaves), specified by a parameter '' | In tomato, after a certain number of phytomers (internodes with leaves), specified by a parameter '' | ||
| - | We first specify a new parameter for the number of phytomers in a primary shoot: | + | We first specify a new parameter for the number of phytomers in primary shoot: |
| <code java> | <code java> | ||
| Line 278: | Line 282: | ||
| For an example on how to generate a leaflet mesh, see the tutorial [[: | For an example on how to generate a leaflet mesh, see the tutorial [[: | ||
| + | |||
| + | We use the code from the leaf triangulation tutorial to create a leaflet mesh '' | ||
| + | |||
| + | To use the leaflet mesh in our tomato model, we create a new module for leaflet: | ||
| + | |||
| + | <code java> | ||
| + | module Leaflet(double length) | ||
| + | ==> | ||
| + | RL(90) Scale(length, | ||
| + | ; | ||
| + | </ | ||
| + | |||
| + | Then we replace '' | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code java> | ||
| + | module Leaf extends Organ | ||
| + | { | ||
| + | ... | ||
| + | } | ||
| + | ==> | ||
| + | ... | ||
| + | | ||
| + | // leaflet pairs | ||
| + | for (int i: | ||
| + | [RU(-80) RL(-30) Cylinder(0.04, | ||
| + | [RU( 80) RL(-30) Cylinder(0.04, | ||
| + | RL(20) | ||
| + | Cylinder(segmentLength, | ||
| + | ) | ||
| + | // terminal leaflet | ||
| + | Leaflet(segmentLength) | ||
| + | ; | ||
| + | </ | ||
| + | |||
tutorials/simple-tomato-model.1733576316.txt.gz · Last modified: 2024/12/07 13:58 by ksmolen
