MilesMcBain / r2vr1_uluru_mesh

Repository for code and data described in: `R2VR: Meshing Uluru From Polygons and Rasters`
1 stars 1 forks source link

smooth surface using rgl::addNormals() #2

Open MilesMcBain opened 6 years ago

MilesMcBain commented 6 years ago
y <- tmesh3d(
      vertices = t(asHomogeneous(uluru_trimesh$P)), 
      indices = array(t(uluru_trimesh$T))
    )
y <- addNormals(y)    
shade3d(y) # No normals
y <- addNormals(y)
y$normals

material3d(color = "purple")
shade3d(y)