Skip to contents

Generate a specific 3D representation of a tree crown, given the parameters for the type of tree crown, the desired level of detail or resolution, and whether or not to offset the crown to align it with the trunk at the origin.

Usage

get_solid_crown_file(
  tree = "oval",
  resolution = "medium",
  offset_origin = TRUE
)

Arguments

tree

Default "oval". Crown type. Full list of options: "columnar" "pyramidal1" "pyramidal2" "oval" "spreading1" "weeping"

resolution

Default "medium". Level of detail of the tree mesh. All options: "low" "medium" "high

offset_origin

Default TRUE. Whether to offset the crown so that the bottom of the tree will be exactly at the origin, aligning it with the trunk.

Value

Filename of OBJ file (as .txt file)

Examples

#Load an arrow OBJ
get_solid_crown_file(tree = "oval", resolution = "high")
#> [1] "/home/runner/work/_temp/Library/tree3d/extdata/highres/oval_crown_clean_offset.txt"