The rgl Package - NexTag Supports Open Source Initiatives
The rgl Package - NexTag Supports Open Source Initiatives
The rgl Package - NexTag Supports Open Source Initiatives
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
46 subdivision3d<br />
Examples<br />
open3d()<br />
particles3d( rnorm(100), rnorm(100), rnorm(100), color=rainbow(100) )<br />
# is the same as<br />
sprites3d( rnorm(100), rnorm(100), rnorm(100), color=rainbow(100),<br />
lit=FALSE, alpha=.2,<br />
textype="alpha", texture=system.file("textures/particle.png", package="<strong>rgl</strong>") )<br />
subdivision3d<br />
generic subdivision surface method<br />
Description<br />
<strong>The</strong> Subdivision surface algorithm divide and refine (deform) a given mesh recursively to certain<br />
degree (depth). <strong>The</strong> qmesh3d algorithm consists of two stages: divide and deform. <strong>The</strong> divide step<br />
generates for each quad four new quads, the deform step drags the points (refinement step).<br />
Usage<br />
subdivision3d( x, ...)<br />
## S3 method for class 'qmesh3d':<br />
subdivision3d( x, depth=1, normalize=FALSE, deform=TRUE, ... )<br />
divide.qmesh3d(mesh, vb=mesh$vb, ib=mesh$ib )<br />
normalize.qmesh3d(mesh)<br />
deform.qmesh3d(mesh,vb=mesh$vb,ib=mesh$ib)<br />
Arguments<br />
x<br />
mesh<br />
depth<br />
normalize<br />
deform<br />
ib<br />
vb<br />
3d geometry mesh<br />
3d geometry mesh<br />
recursion depth<br />
normalize qmesh3d coordinates after division if deform is TRUE otherwise<br />
deform mesh after normalization<br />
vector of indices (i.e., which sets of vertices to combine into quads); 4xn matrix<br />
or equivalent vector<br />
vector of vertices: 4xn matrix (rows x,y,z,h) or equivalent vector, where h indicates<br />
scaling of each plotted quad<br />
... other arguments (unused)<br />
Details<br />
Generic subdivision surface method. Currently there exists an algorithm that can be applied on<br />
qmesh3d objects.