For use with rgl, I'm looking for a function to draw a plane in an rgl scene that would function sort of like abline(a, b) does in base graphics, where abline(0, 1) draws a line of unit slope through the origin. Analogously, I'd like to have a plane3d function, so that plane3d(0, 1, 1) draws a plane through the origin with unit slopes in x & y and plane3d(3, 0, 0) draws a horizontal plane at z=3. I see that scatterplot3d in the scatterplot3d package returns a plane3d() *function* for a given plot. I could probably try to adapt this, but before I do, I wonder if something like this for rgl exists that I haven't found. -Michael -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA
On May 4, 2010, at 4:09 PM, Michael Friendly wrote:> For use with rgl, I'm looking for a function to draw a plane in an > rgl scene that would function > sort of like abline(a, b) does in base graphics, where abline(0, 1) > draws a line of unit slope through > the origin. Analogously, I'd like to have a plane3d function, so > that plane3d(0, 1, 1) draws a > plane through the origin with unit slopes in x & y and plane3d(3, 0, > 0) draws a horizontal plane > at z=3. > > I see that scatterplot3d in the scatterplot3d package returns a > plane3d() *function* for a given > plot. I could probably try to adapt this, but before I do, I wonder > if something like this for > rgl exists that I haven't found.?quads3d> > -MichaelDavid Winsemius, MD West Hartford, CT