User Tools

Site Tools


11._random_regeneration

The Capsis training online

Back to the table of contents

11. Random regeneration

Purpose: Add a regeneration method to add new trees each year, randomly located on the terrain.

Statement of the exercise:

  1. Each year during the simulation, create new trees with dbh = 3cm and height = 1.3m
  2. Each year, at max n trees (with n in a variable called regenerationMax) may appear (default value is 10)
  3. All tree identifiers (id) must be unique in the scene

Option:

  • The user can choose the value of regenerationMax at simulation initialisation time

Helper and solution

Back to the table of contents

11._random_regeneration.txt ยท Last modified: 2021/12/13 09:28 by 127.0.0.1