[R] 3D package in R

Duncan Murdoch dmurdoch at pair.com
Sat Jan 6 20:38:09 CET 2001


On Sat, 06 Jan 2001 14:47:55 +0100, you wrote:

>I am considering writing a 3D visualisation package for R. 
>
>Purposes:
>- Visualise 3 dimension data 
>- Manipulate the data or series or any other object with the mouse as in any 3D software (3D Studio Max, Lightwave...)
>- Eventually display more than just 3D objects.

I'm in the process of writing a package which is somewhat less
ambitious than what you seem to be hoping for, but it might give you
some ideas.  Mine is based on OpenGL; I'm planning on versions for
Windows and X.  There are OpenGL implementations for the Mac and OS/2
as well, but I don't know of any on other platforms; I don't have
access to anything but Windows and X for testing, so I'm not planning
to support anything else.

Right now I've got a Windows-only version with the underlying code
written in Delphi; later I'll simplify and rewrite in C for Windows,
then do the port to X.  If anyone is interested in a binary-only
preview of the Windows version, I could send you one.  I'm not ready
for the translation yet; once it's in C, it'll be much harder to
modify and debug, so I want to make sure the feature set is stable
first.

I've got no plans for more than 3 dimensions, though it wouldn't be
hard to add, if you could decide how you wanted to select the
projections.

Here's the current INDEX file:

This package contains routines for 3D graphics based on the OpenGL 
graphics library.  See the opengl help topic for details.

lines3d		Draw a joined set of line segments
segments3d	Draw a set of separate line segments
points3d	Draw a set of points 
triangles3d	Draw a set of triangles
quads3d		Draw a set of quadrilaterals
text3d		Draw text in 3D

persp3d		Draw a surface plot of a matrix (like persp)
hist3d		Draw a histogram of two variables (like hist)

open3d		Open a new 3D window
close3d		Close a 3D window
clear3d		Clear a 3D window

setcolors3d	Set the colors of a 3D object
setnormals3d	Set the normal vectors of a 3D object
setpoints3d	Set the coordinates of a 3D object
settext3d	Set the text of a text3d object

axis3d		Draw a single 3D axis
axes3d		Draw a set of 3D axes
box3d		Draw a 3D box around the plot
mtext3d		Draw marginal text on the plot
title3d		Draw titles and axis labels on the plot

scale3d		Create a 4x4 matrix to rescale
translate3d	Create a 4x4 matrix to do a linear translation
rotate3d	Create a 4x4 matrix to rotate

begingroup3d	Start a new group, returning the handle of the old one
endgroup3d	End a group, inserting it into an old one

colorlist	A list of color names and hex codes
colorname.to.hex	Convert a color name to hex code
hex.to.rgb	Convert a color hex code to a packed rgb integer
color.to.rgb	Convert a color to a packed rgb integer
rgb.to.hex	Convert a packed rgb integer to hex
rgb.to.color	Convert a packed rgb integer to a color name

ThreeDHandle	The default window handle

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list