library(cgalMeshes)
data(bunny, package = "onion")
mesh <- AFSreconstruction(bunny)
rglMesh <- mesh$getMesh()
library(rgl)
open3d(windowRect = 50 + c(0, 0, 512, 512))
shade3d(rglMesh, color = "firebrick")
# jet smoothing example ####
library(cgalMeshes)
# no smoothing
mesh1 <- AFSreconstruction(SolidMobiusStrip)
mesh1$computeNormals()
rglMesh1 <- mesh1$getMesh()
# jet smoothing
mesh2 <- AFSreconstruction(SolidMobiusStrip, jetSmoothing = 30)
mesh2$computeNormals()
rglMesh2 <- mesh2$getMesh()
# plot
library(rgl)
open3d(windowRect = 50 + c(0, 0, 800, 400))
mfrow3d(1, 2)
view3d(20, -40, zoom = 0.85)
shade3d(rglMesh1, color = "gold")
next3d()
view3d(20, -40, zoom = 0.85)
shade3d(rglMesh2, color = "gold")
Run the code above in your browser using DataLab