r_obj: R 3D Model

View source: R/r_obj.R

r_objR Documentation

R 3D Model

Description

3D obj model of R logo (created from the R SVG logo with the 'raybevel' package), to be used with 'obj_model()'

Usage

r_obj(simple_r = FALSE)

Arguments

simple_r

Default 'FALSE'. If 'TRUE', this will return a 3D R (instead of the R logo).

Value

File location of the 3d_r_logo.obj file (saved with a .txt extension)

Examples

#Load and render the included example R object file.
if(run_documentation()) {
generate_ground(material = diffuse(noise = TRUE, noisecolor = "grey20")) %>%
  add_object(sphere(x = 2, y = 3, z = 2, radius = 1,
                    material = light(intensity = 10))) %>%
  add_object(obj_model(r_obj(), scale=2.5,  material = diffuse(color="red"))) %>%
  render_scene(parallel=TRUE, lookfrom = c(0, 1, 10), clamp_value = 5, samples = 200)
}

rayrender documentation built on April 4, 2025, 1:13 a.m.

Related to r_obj in rayrender...