PlantGeom

Everything 3D for plants 🌱

https://github.com/vezy/plantgeom.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • ✓
    CITATION.cff file
    Found CITATION.cff file
  • ✓
    codemeta.json file
    Found codemeta.json file
  • ✓
    .zenodo.json file
    Found .zenodo.json file
  • â—‹
    DOI references
  • â—‹
    Academic publication links
  • â—‹
    Committers with academic emails
  • â—‹
    Institutional organization owner
  • â—‹
    JOSS paper metadata
  • â—‹
    Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

3d julia plants

Keywords from Contributors

pinn pde control neural-sde interpretability matrix-exponential finite-volume numeric exoplanets hybrid-differential-equations
Last synced: 6 months ago · JSON representation ·

Repository

Everything 3D for plants 🌱

Basic Info
Statistics
  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • Open Issues: 32
  • Releases: 18
Topics
3d julia plants
Created about 4 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation Agents

README.md

PlantGeom.jl

Stable Dev Build Status

PlantGeom, a package for everything 3D in plants.

Introduction

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 plantviz and plantviz!, 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).

Example usage

Read an example OPF:

```julia using PlantGeom, MultiScaleTreeGraph

file = joinpath(dirname(dirname(pathof(PlantGeom))),"test","files","simpleplant.opf") mtg = readopf(file) ```

Plot the plant geometry:

julia using GLMakie # Choose a Makie backend here. plantviz(mtg)

plantviz search for the :geometry attribute in the MTG nodes, and computes the meshes using the reference meshes and the transformation matrices to plot the 3d geometry of the plants.

Colour by attribute, e.g. using the mesh max Z coordinates:

julia transform!(mtg, refmesh_to_mesh!, zmax => :z_max, ignore_nothing = true) plantviz(mtg, color = :z_max)

By design the 3D geometry of each node is stored in the :geometry attribute. It stores a reference mesh, a transformation matrix, and the resulting mesh. The resulting mesh is computed lazily, meaning it is computed only the first time it is needed. To compute it explicitly, you can use refmesh_to_mesh! (like above):

julia transform!(mtg, refmesh_to_mesh!)

Roadmap

  • [x] Add read_opf()
  • [x] Add write_opf().
  • [x] Use pointers to ref meshes instead of an index. It will be more simple then.
  • [x] Add read_ops()
  • [x] Add recipe for MTG diagram (no geometry )
  • [ ] Import reference meshes from disk (e.g. export from blender): make a tutorial.
  • [ ] Add tutorials:
    • [x] How to plot with Plots.jl
    • [x] How to plot with Makie.jl
    • [ ] How to build a geometry using attributes and reference meshes
    • [ ] How to build a plant + geometry manually and recursively
  • [ ] Manage different kind of information into an MTG:
    • [x] Mesh for the nodes
    • [x] Reference meshes + transformation matrix (e.g. from OPF)
    • [ ] Reference meshes + Length and/or Width/diameter for scaling. If only Length, scale the whole mesh by a factor, if Length + Width, scale accordingly, etc... This would be a shortcut to using Meshes.jl's scaling.
  • [ ] Remove coffee.opf from tests and add PlantBiophysics as a dependency instead. It will make PlantGeom much lighter.
  • [x] Improve the OPF parser using e.g. our own XML parser. See https://github.com/ordovician/PLists.jl for an example pure Julia XML parser, and the corresponding blogpost here. Make the reading in parallel ? For reference, reading a 80Mo OPF takes 8Go of memory and 4.5 minutes... -> The issue came from SVectors that took forever to be allocated. I replaced them by normal vectors. It is much faster now (~11s on my computer).
  • [ ] Make read_opf even faster (we should aim for e.g. 2-3s for an 80Mo OPF (largest file we have). We can make it parallel, but I think we can improve some things first (e.g. using structs instead of Dicts everywhere).
  • [ ] Improve the OPF writer similarly.
  • [ ] Add a section about the OPF format.
  • [ ] Fix the example simple OPF -> use one cylinder only, fix the scales of each node.
  • [ ] Fix the coffee OPF -> scales are wrong (Metamer = 6 -> 3, Leaf = 2 -> 3) + Fix the MTG accordingly
  • [ ] Add tests using both simpleplant.opf and simpleplant.mtg to make sure both work the same way.
  • [ ] Compute the vertex normals properly when writting the OPF to disk

Owner

  • Name: Rémi Vezy
  • Login: VEZY
  • Kind: user
  • Location: Montpellier
  • Company: CIRAD

I am a researcher in plant modelling at the AMAP lab in CIRAD.

Citation (CITATION.bib)

@misc{PlantGeom.jl,
	author  = {remi.vezy <VEZY@users.noreply.github.com> and contributors},
	title   = {PlantGeom.jl: Everything 3D for plants 🌱},
	url     = {https://github.com/VEZY/PlantGeom.jl},
	version = {v0.8.0},
	year    = {2024},
	month   = {11}
}

GitHub Events

Total
  • Create event: 16
  • Commit comment event: 15
  • Release event: 5
  • Issues event: 23
  • Delete event: 19
  • Member event: 1
  • Issue comment event: 12
  • Push event: 93
  • Pull request event: 26
  • Fork event: 1
Last Year
  • Create event: 16
  • Commit comment event: 15
  • Release event: 5
  • Issues event: 23
  • Delete event: 19
  • Member event: 1
  • Issue comment event: 12
  • Push event: 93
  • Pull request event: 26
  • Fork event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 144
  • Total Committers: 3
  • Avg Commits per committer: 48.0
  • Development Distribution Score (DDS): 0.25
Past Year
  • Commits: 29
  • Committers: 3
  • Avg Commits per committer: 9.667
  • Development Distribution Score (DDS): 0.276
Top Committers
Name Email Commits
remi.vezy V****Y 108
CompatHelper Julia c****y@j****g 32
github-actions[bot] 4****] 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 38
  • Total pull requests: 102
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 2 months
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 0.63
  • Average comments per pull request: 0.07
  • Merged pull requests: 60
  • Bot issues: 0
  • Bot pull requests: 89
Past Year
  • Issues: 22
  • Pull requests: 23
  • Average time to close issues: 11 days
  • Average time to close pull requests: 24 days
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.05
  • Average comments per pull request: 0.17
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 16
Top Authors
Issue Authors
  • VEZY (34)
  • Samuel-amap (3)
  • JuliaTagBot (1)
Pull Request Authors
  • github-actions[bot] (86)
  • VEZY (11)
  • dependabot[bot] (3)
  • Samuel-amap (2)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
dependencies (3) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 2 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 18
juliahub.com: PlantGeom

Everything 3D for plants 🌱

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Total
Rankings
Dependent repos count: 9.9%
Average: 38.8%
Dependent packages count: 38.9%
Stargazers count: 52.9%
Forks count: 53.5%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-docdeploy v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite