On 2/2/2006 5:01 PM, Michael wrote: > shape3d only gives rigid sphere... not the free form ellipsoid that I > want...
? If you run the demo, you'll see ellipsoids... You just need to work out the appropriate transform to apply to a sphere to get the ellipsoid you want. I imagine something like this: sphere <- ellipsoid3d(2,2,2, qmesh=TRUE) ellipsoid <- translate3d(rotate3d(sphere, matrix=chol(S)), xbar, ybar, zbar) shade3d(ellipsoid) is what you want, where S is the covariance matrix, and xbar,ybar,zbar have the obvious meaning. (rotate3d() is used with a matrix that isn't a rotation matrix; it may not be obvious that this is allowed, but it is.) Duncan Murdoch > > On 2/2/06, Ben Bolker <[EMAIL PROTECTED]> wrote: >> Duncan Murdoch <murdoch <at> stats.uwo.ca> writes: >> >>> On 2/2/2006 3:39 AM, Michael wrote: >>>> Hi all, >>>> >>>> How do I visualize a contour of a tri-variate normal distribution? >>>> >>>> I just like to see the ellipsoid very much. I hope there is a easy way >> or >>>> existing method in R. >>> The misc3d package includes a function for 3d contour plots; that should >>> do what you want. >>> >> is contour3d really necessary or could you just plot ellipsoids? >> (library(rgl); demo(shapes3d)) -- still a little bit of figuring >> to do, but this should get you most of the way there. >> >> Ben Bolker >> >> ______________________________________________ >> [email protected] mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >> > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
