search for: cube3d

Displaying 8 results from an estimated 8 matches for "cube3d".

2008 Jun 25
2
help with cube3d cube size
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 shade3d(translate3d(cube3d(identityMatrix() * myScalingFactor),-6,1,-1),col="green", alpha = 0.2) -- 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 (n...
2008 Mar 01
1
How to chain user mouse handlers in rgl
...How do I say in a custom mouse handler "after having done your work, forward to standard trackball once only"? The example below shows the idea, but it works only once, then reverts to standard trackball handling. Dieter #---------------------- library(rgl) r3dDefaults open3d() shade3d(cube3d(color=rep(rainbow(6),rep(4,6)))) btn3d <- function() { begin <- function(x, y) { # Add checking for key down later cat(x,y,"\n") # Forward to trackball (no easier way?) newhandler <- par3d("mouseMode") newhandler[1] <- "trackball"...
2010 Jul 23
1
greek letters in rgl plot3d
Dear RGL experts, I haven't been able to add greek letters to my rgl plot3d. I have tried "expression" with no success. Here is the interested bit: > library(rgl) > cb <- cube3d() > plot3d(cb,xlab=expression(alpha),ylab="",zlab="",box=FALSE,alpha=0.5) The expression(alpha) appears as "alpha", rather than as a greek symbol. I suspect greek and mathematical symbols in general can be added to a plot3d in rgl. Is that true? J Dr James Foadi...
2010 Sep 09
1
rgl and lighting
Dear R community (and Duncan more specifically), I can't work out how to make additional light sources work in rgl. Here is the example. First I create a cube and visualize it: > cubo <- cube3d(col="black") > shade3d(cubo) Next I position the viewpoint at theta=0 and phi=30: > view3d(theta=0,phi=30) Next, I want to create a 2nd light source which diffuses red light from the front face. I thought I could do: >light3d(diffuse="red",theta=0,phi=0) but...the...
2009 Oct 15
1
ImageMagick not seen by movie3d function from rgl package
Hello R-users, I have downloaded and installed a binary version for Windows OS of ImageMagick (ImageMagick6.5.6-10-q16-windows-dll.exe), I have installed the rgl package and i've tried running the following example from ?movie3d() library(rgl) open3d() plot3d( cube3d(col="green") ) M <- par3d("userMatrix") play3d( par3dinterp( userMatrix=list(M, rotate3d(M, pi/2, 1, 0, 0), rotate3d(M, pi/2, 0, 1, 0) ) ), duration=4 ) movie3d( spin3d(), duration=5 ) an...
2011 Feb 07
1
3D plots
Hi, Which package is your favorite one to create 3D bar plots? Which package is the easiest and fastest to use to your mind? I tried to download the R.basic package that has plot3d integrated. Unfortunately the installation from Henrik's webpage doesn't work. Do you know where else to get it from? Is there an update? Or maybe an even better package for plotting in 3D? Thank you!
2011 Jan 31
1
rgl: draw multiple ellipsoids
...rn(Rc%*%Rb%*%Ra) } require(rgl) ## create one ellipsoid at a given location, with axes a,b,c and Euler angles phi, theta, psi rgl.ellipsoid <- function (x=0,y=0,z=0, a = 1,b=1,c=1, phi=0,theta=0,psi=0, subdivide = 3, smooth = TRUE, ...) { sphere <- subdivision3d(cube3d(...), subdivide) class(sphere) <- c("mesh3d","shape3d") norm <- sqrt(sphere$vb[1, ]^2 + sphere$vb[2, ]^2 + sphere$vb[3, ]^2) for (i in 1:3) sphere$vb[i, ] <- sphere$vb[i, ]/norm sphere$vb[4, ] <- 1 sphere$normals <- sphere$vb resul...
2008 Jan 06
3
Can a dynamic graphic produced by rgl be saved?
Dear r-helpers, Can one save a dynamic graphic produced by rgl, e.g.: open3d(); x <- sort(rnorm(1000)); y <- rnorm(1000); z <- rnorm(1000) + atan2(x,y); plot3d(x, y, z, col=rainbow(1000), size=2) as a dynamic figure that can be embedded in a pdf? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400