# Draw a teapot
data(teapot)
p <- plot3js(
xlim = range(teapot$vertices[,1]),
ylim = range(teapot$vertices[,2]),
zlim = range(teapot$vertices[,3]),
label_axes = FALSE,
aspect = c(1, 1, 1)
)
p <- shape3js(
p,
vertices = teapot$vertices,
faces = teapot$edges,
col = "lightblue"
)
r3js(p, rotation = c(-2.8, 0, 3.14), zoom = 1.2)
Run the code above in your browser using DataLab