addNormals

0th

Percentile

Add normal vectors to objects so they render more smoothly.

This generic function adds normals at each of the vertices of a polyhedron by averaging the normals of each incident face. This has the effect of making the surface of the object appear smooth rather than faceted when rendered.

Keywords
dynamic
Usage
addNormals(x, ...)
Arguments
x

An object to which to add normals.

Additional parameters which will be passed to the methods. Currently unused.

Details

Currently methods are supplied for "mesh3d" and "shapelist3d" classes.

Value

A new object of the same class as x, with normals added.

Aliases
  • addNormals
  • addNormals.mesh3d
  • addNormals.shapelist3d
Examples
# NOT RUN {
open3d()
y <- subdivision3d(tetrahedron3d(col = "red"), depth = 3)
shade3d(y) # No normals
y <- addNormals(y)
shade3d(translate3d(y, x = 1, y = 0, z = 0)) # With normals
# }
Documentation reproduced from package rgl, version 0.100.50, License: GPL

Community examples

Looks like there are no examples yet.