PlantGeom.jl
Purpose
The package is designed around MultiScaleTreeGraph that serves as the basic structure for the plant topology and attributes.
The package provides different functionalities, the main ones being:
- IO for the OPF file format (see read_opf and write_opf );
- plotting using viz and viz! , optionally using coloring by attribute;
- mesh transformations using transform_mesh!
Note that :geometry
is a reserved attribute in nodes (e.g. organs) used for the 3D geometry. It is stored as a special structure (geometry
).
Note that this package is still under intensive development and major changes to the API may happen.
Try it !
Start by creating a new environment for your project using the pkg manager. To enter the package manager, just press ]
in the REPL, and it will become blue (press backspace to return to the Julia REPL). Then create the environment using this command:
activate .
Don’t forget the “.”! It is used to tell the pkg manager that you activate the project were you currently are.
You can then install PlantGeom using this command (still from the pkg manager):
add PlantGeom
Example
Here is an example usage with a simulation of the energy balance and assimilation of a leaf:
# Install a Makie backend, e.g. GLMakie:
# ]add GLMakie
using PlantGeom, WGLMakie
# This may take a while the first time:
mtg = read_opf(joinpath(dirname(dirname(pathof(PlantGeom))),"test","files","simple_plant.opf"))
# And this too:
viz(mtg)
# Color everything the same:
viz(mtg, color = :red)
# Or color by attribute, with a colorbar:
f, ax, p = viz(mtg, color = :Area)
colorbar(f[1, 2], p)
f
For a more extensive documentation and tutorials, please head over the official documentation website .
LICENSE
This package is distributed under the MIT license. A full description of the license can be found here .
Links
- Link to github
- Link to the official documentation