Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_object

Add Object


Description

Add Object

Usage

add_object(scene, objects)

Arguments

scene

Tibble of pre-existing object locations and properties.

objects

A tibble row or collection of rows representing each object.

Value

Tibble of object locations and properties.

Examples

#Generate the ground and add some objects
scene = generate_ground(depth=-0.5,material = diffuse(checkercolor="blue")) %>%
  add_object(cube(x=0.7,
                  material=diffuse(noise=5,noisecolor="purple",color="black",noisephase=45),
                  angle=c(0,-30,0))) %>%
  add_object(sphere(x=-0.7,radius=0.5,material=metal(color="gold")))

render_scene(scene,parallel=TRUE)

rayrender

Build and Raytrace 3D Scenes

v0.21.2
GPL-3
Authors
Tyler Morgan-Wall [aut, cph, cre] (<https://orcid.org/0000-0002-3131-3814>), Syoyo Fujita [ctb, cph], Melissa O'Neill [ctb, cph], Vilya Harvey [ctb, cph]
Initial release
2021-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.