Learn R Programming

tree3d (version 0.1.2)

get_trunk_file: Get Trunk File

Description

This function retrieves a trunk OBJ file. The trunk OBJ file can be used to create a tree trunk in a 3D scene. The function has an option to scale the trunk model based on the radius.

Usage

get_trunk_file(scaled = TRUE, offset = TRUE)

Value

Returns the filename of the selected OBJ file (as a .txt file) for the tree trunk. This file can be used to create tree trunk models in a 3D scene.

Arguments

scaled

Default TRUE. This parameter determines whether the trunk model should be scaled from a radius of 0.1 to 1. If TRUE, the trunk model will be scaled; otherwise, it will use the original size.

offset

Default TRUE. This parameter determines whether the trunk model should be offset to start at the origin, or centered at the origin (FALSE).

Examples

Run this code
# Fetch an trunk OBJ path
get_trunk_file()

Run the code above in your browser using DataLab