rgl (version 0.83-3)

subdivision3d: generic subdivision surface method

Description

The Subdivision surface algorithm divide and refine (deform) a given mesh recursively to certain degree (depth). The qmesh3d algorithm consists of two stages: divide and deform. The divide step generates for each quad four new quads, the deform step drags the points (refinement step).

Usage

subdivision3d( x,  ...)
  ## S3 method for class 'qmesh3d':
subdivision3d( x, depth=1, normalize=FALSE, deform=TRUE, ... )
  divide.qmesh3d(mesh,  vb=mesh$vb, ib=mesh$ib )
  normalize.qmesh3d(mesh)
  deform.qmesh3d(mesh,vb=mesh$vb,ib=mesh$ib)

Arguments

x
3d geometry mesh
mesh
3d geometry mesh
depth
recursion depth
normalize
normalize qmesh3d coordinates after division if deform is TRUE otherwise
deform
deform mesh after normalization
ib
vector of indices (i.e., which sets of vertices to combine into quads); 4xn matrix or equivalent vector
vb
vector of vertices: 4xn matrix (rows x,y,z,h) or equivalent vector, where h indicates scaling of each plotted quad
...
other arguments (unused)

Details

Generic subdivision surface method. Currently there exists an algorithm that can be applied on qmesh3d objects.

See Also

r3d qmesh3d

Examples

Run this code
open3d()
  shade3d( subdivision3d( cube3d(), depth=3 ), color="red", alpha=0.5 )

Run the code above in your browser using DataLab