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:

Helper and solution

Back to the table of contents