CSG Pyramid
Note: This primitive slows down immensely for large values of base and height. Try using csg_scale() with this object for large pyramids instead.
csg_pyramid(x = 0, y = 0, z = 0, height = 1, base = 1)
x |
Default '0'. x-coordinate on the pyramid. |
y |
Default '0'. y-coordinate on the pyramid. |
z |
Default '0'. z-coordinate on the pyramid. |
height |
Default '1'. Pyramid height. |
base |
Default '1'. Pyramid base width. |
List describing the box in the scene.
#Generate a simple pyramid: generate_ground() %>% add_object(csg_object(csg_pyramid(y=-0.99), material=glossy(color="red"))) %>% add_object(sphere(y=5,x=5,z=5,material=light(intensity=20))) %>% render_scene(clamp_value=10,lookfrom=c(-3,1,10), fov=15, lookat=c(0,-0.5,0)) #Make a taller pyramid generate_ground() %>% add_object(csg_object(csg_pyramid(y=-0.95, height=1.5), material=glossy(color="red"))) %>% add_object(sphere(y=5,x=5,z=5,material=light(intensity=20))) %>% render_scene(clamp_value=10,lookfrom=c(-3,1,10), fov=15, lookat=c(0,-0.5,0)) #Make a wider pyramid generate_ground() %>% add_object(csg_object(csg_pyramid(y=-0.95, base=1.5), material=glossy(color="red"))) %>% add_object(sphere(y=5,x=5,z=5,material=light(intensity=20))) %>% render_scene(clamp_value=10,lookfrom=c(-3,1,10), fov=15, lookat=c(0,-0.5,0))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.