# NOT RUN {
require(rgl)
require(Morpho)
data(nose)
### calculate vertex normals
shortnose.mesh$normals <- NULL ##remove normals
# }
# NOT RUN {
shade3d(shortnose.mesh,col=3)##render
# }
# NOT RUN {
shortnose.mesh <- updateNormals(shortnose.mesh)
# }
# NOT RUN {
rgl.clear()
shade3d(shortnose.mesh,col=3)##smoothly rendered now
# }
# NOT RUN {
## calculate facenormals
facemesh <- facenormals(shortnose.mesh)
# }
# NOT RUN {
plotNormals(facemesh,long=0.01)
points3d(vert2points(facemesh),col=2)
wire3d(shortnose.mesh)
# }
Run the code above in your browser using DataLab