search for: shape3d

Displaying 1 result from an estimated 1 matches for "shape3d".

Did you mean: shade3d
2011 Jan 31
1
rgl: draw multiple ellipsoids
...ion, with axes a,b,c and Euler angles phi, theta, psi rgl.ellipsoid <- function (x=0,y=0,z=0, a = 1,b=1,c=1, phi=0,theta=0,psi=0, subdivide = 3, smooth = TRUE, ...) { sphere <- subdivision3d(cube3d(...), subdivide) class(sphere) <- c("mesh3d","shape3d") norm <- sqrt(sphere$vb[1, ]^2 + sphere$vb[2, ]^2 + sphere$vb[3, ]^2) for (i in 1:3) sphere$vb[i, ] <- sphere$vb[i, ]/norm sphere$vb[4, ] <- 1 sphere$normals <- sphere$vb result <- scale3d(sphere, a,b,c) rotM <- euler(phi,theta,psi) resul...