[R] help with cube3d cube size

Mark Kimpel mwkimpel at gmail.com
Wed Jun 25 23:49:23 CEST 2008


Thanks for the pointers. I think the package is great, just want to
use it to its full potential without driving the list crazy with
questions.  Below is my output to help and sessionInfo(). I don't see
the scaling functions, although I now see that they can be retrieved
with ?matrices. You guys are the experts as to what should go where,
but for someone unfamiliar with how rgl works, having them print out
with help(package = "rgl") would make some of these functions more
obvious to the newbie.  Mark

aspect3d                Set the aspect ratios of the current plot
axes3d                  Draw boxes, axes and other text outside the
                        data
ellipse3d               Make an ellipsoid
grid3d                  Add a grid to a 3D plot
matrices                Work with homogeneous coordinates
par3d                   Set or Query RGL Parameters
par3dinterp             Interpolator for par3d parameters
persp3d                 Surface plots
play3d                  Play animation of rgl scene
plot3d                  3D Scatterplot
points3d                add primitive set shape
qmesh3d                 3D Quadrangle Mesh objects
r3d                     Generic 3D interface
rgl-package             3D visualization device system
rgl.bbox                Set up Bounding Box decoration
rgl.bg                  Set up Background
rgl.bringtotop          Assign focus to an RGL window
rgl.clear               scene management
rgl.light               add light source
rgl.material            Generic Appearance setup
rgl.postscript          export screenshot
rgl.primitive           add primitive set shape
rgl.setMouseCallbacks   User callbacks on mouse events
rgl.snapshot            export screenshot
rgl.spheres             add sphere set shape
rgl.surface             add height-field surface shape
rgl.texts               add text
rgl.user2window         Convert between rgl user and window coordinates
rgl.viewpoint           Set up viewpoint
select3d                Select a rectangle in an RGL scene
spin3d                  Create a function to spin a scene at a fixed
                        rate
sprites3d               add sprite set shape
subdivision3d           generic subdivision surface method
surface3d               add height-field surface shape


> sessionInfo()
R version 2.7.1 (2008-06-23)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rgl_0.79     graph_1.18.1

loaded via a namespace (and not attached):
[1] cluster_1.11.11 tools_2.7.1

On Wed, Jun 25, 2008 at 5:25 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> Mark Kimpel wrote:
>>
>> Ben and Duncan,
>>
>> Thanks for your helpful suggestions. I"m having some difficulty
>> navigating this really good package using my normal learning
>> techniques. When I do 'help(package = "rgl") it seems only a very
>> small subset of functions available show up.
>
> I think the full list shows up there, if you're using a current version.
>  What specific function is missing?
>>
>>  Perusing the rgl.pdf
>> downloaded from CRAN demonstrates the same lack of documentation.
>>
>
> All of the functions intended for users are documented, and they show up in
> rgl.pdf.
>>
>> There is no vignette. In addition, I have found at least one other
>> package with 3d functions (emdbook::curve3d()).
>>
>
> A vignette would be nice, but there isn't one.  Our paper from useR 2007 is
> the most recent reference (see
> http://www.r-project.org/conferences/useR-2007/program/presentations/murdoch.pdf);
> it cites Daniel's 2003 thesis and the 2003 paper about the package.
> After those, the NEWS file lists some recent additions.
>
> emdbook makes use of rgl and some other 3d engines, as does misc3d.
>  scatterplot3d does it's own drawing.  rggobi is a completely different
> interactive package.
>>
>> What is the best resource for learning about all the foo3d() and lower
>> level functionality that rgl and its dependents provide? I saw a book
>> at B&N just last week on openGL. Would that be helpful?
>>
>
> It might, but probably not.  rgl is intended to be a higher level R-style
> interface to the things described in a book like that.  So if you have a
> particular question about how to do something, you'd never find it there.
>  On the other hand, if you want to know if something is possible, then that
> might be a place to look for ideas.
>
> Duncan Murdoch
>>
>> Mark
>>
>> On Tue, Jun 24, 2008 at 10:54 PM, Ben Bolker <bolker at ufl.edu> wrote:
>>
>>>
>>> Mark Kimpel <mwkimpel <at> gmail.com> writes:
>>>
>>>
>>>>
>>>> I'm using the command below on an open3d() object to create a shaded
>>>> cube. Changes to myScalingFactor do not effect changes in the size of
>>>> the cube. What is the correct approach? Mark
>>>>
>>>
>>>  how about scale3d() ?
>>>
>>> shade3d(translate3d(scale3d(cube3d(),5,5,5),-6,1,-1),col="blue", alpha =
>>> 0.2)
>>> shade3d(translate3d(cube3d(),-6,1,-1),col="green", alpha = 0.2)
>>> shade3d(translate3d(scale3d(cube3d(),10,10,10),-6,1,-1),col="red", alpha
>>> = 0.2)
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>>
>>
>>
>
>



-- 
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN 46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 663-0513 Home (no voice mail please)



More information about the R-help mailing list