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

csg_scale

CSG Scale


Description

CSG Scale

Usage

csg_scale(object, scale = 1)

Arguments

object

CSG object.

scale

Default '1'.

Value

List describing the triangle in the scene.

Examples

#Scale a pyramid (translating it upwards because the object is scaled from the center):
generate_ground(material=diffuse(checkercolor="grey20")) %>% 
  add_object(csg_object(csg_pyramid(z=1,y=-0.99),
                        material=glossy(color="red"))) %>% 
  add_object(csg_object(csg_scale(csg_pyramid(z=-1,y=-0.5),2),
                        material=glossy(color="green"))) %>% 
  add_object(sphere(y=5,x=5,z=5,material=light(intensity=40))) %>% 
  render_scene(lookfrom=c(-3,4,10), fov=20, 
               lookat=c(0,-0.5,-0.5),clamp_value=10)

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.