add_object: Add Object

Description Usage Arguments Value Examples

View source: R/add_object.R

Description

Add Object

Usage

1

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

1
2
3
4
5
6
7
8
#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 documentation built on April 19, 2020, 4:17 p.m.