# a proper ellipsoid, and its inverse
c1 <- c(0,0,0)
C1 <- matrix(c(6, 2, 1,
2, 3, 2,
1, 2, 2), 3,3)
open3d()
zell1 <- gell(center=c1, Sigma=C1)
E1 <- ell3d(zell1, col="blue", alpha=0.1)
# inverse of C1
E1I <- ell3d(dual(zell1), col="blue", alpha=0.1, wire=TRUE)
#open3d() ## to see this in a new window
# a singular ellipsoid and its inverse
c2 <- c1
C2 <- matrix(c(6, 2, 0,
2, 3, 0,
0, 0, 0), 3,3)
E2 <- ell3d( zell2 <-gell( center = c2, Sigma = C2),
col = 'red', alpha = 0.25, wire = TRUE)
E2I <- ell3d( dual(gell( center = c2, Sigma = C2)),
length=3, col = 'red', alpha = 0.25, wire = TRUE )
# signatures
signature(zell1)
signature(zell2)
Run the code above in your browser using DataLab