search for: spheres3d

Displaying 17 results from an estimated 17 matches for "spheres3d".

2006 Feb 20
1
Further rgl()/spheres3d() query
...] - zlim[1])*100 colorlut <- terrain.colors(zlen) # height color lookup table col <- colorlut[ ((z*amp)-zlim[1])*100+1 ] # assign colors to heights surface3d(x,y,z*amp,color=col) for (i in 1:30) { for (i in 1) { pc <- g.pca$rotation[,i] pc.pos <- (pc > 0) if (any(pc.pos)) { spheres3d(xval[pc.pos],yval[pc.pos],6*zsamp[pc.pos], radius=scale*pc[pc.pos],color="red") } if (any(!pc.pos)) { spheres3d(xval[!pc.pos],yval[!pc.pos],6*zsamp[!pc.pos], radius=scale*pc[!pc.pos],color="blue") } points3d(sample[i,1],sample[i,2],sample[i,3],color="white&...
2006 Jun 29
3
advice on arguments
...guments, I can't just use "..." ; I did write some code a while ago that would look at formals() to dissect out arguments that should be passed to the different functions, but it seemed overly complex. The particular case I have now is a little simpler. foo2 (points3d) and foo3 (spheres3d) are both functions from the rgl package that pass arguments such as color, alpha, etc. along to an rgl.material() command with lots of possible arguments. (The function may also call segments3d or lines3d, but these all have the same arguments as points3d.) However, to change the size of points yo...
2009 Apr 28
1
image3d in misc3d
...here plot with the image plot. library(misc3d) ##Set up array: arr <- array(1:27, dim = rep(3,3)) ## Plot image, with x, y, z positions all set (I thought) to 1:3 image3d(arr, x = 1:3, y = 1:3, z = 1:3, vlim = quantile(arr, c(0.01, 0.99))) ## Add spheres of the same data at the same positions spheres3d(x=expand.grid(x = 1:3, y = 1:3, z = 1:3), radius = 0.1 *sqrt(arr)) ## Ooops! So why don't they match up? Add axes: axes3d() ## For some reason the image3d is generating negative values of z... spheres3d(x=expand.grid(x = 1:3, y = 1:3, z = -(1:3)), radius = 0.1 * arr^(1/3)) ## But is this rel...
2010 Nov 22
1
Plotting a cloud/fog of variable density in rgl
...ybe there is a better overall solution. Here is some code that reads the result of the interpolation on a coarse grid and plots it: # read a set of gridded data points in 3D d = read.table("http://dl.dropbox.com/u/1047321/R/test3Ddata.txt", header=T) # plot library("rgl") spheres3d(d$x, d$y, d$z, alpha=alpha, radius=0.05) And here is a version that actually performs the interpolation a random set of points in 3D through kriging in case you want to try with increase precision. # create a set of random data points in 3D n = 50 data3D = data.frame(x = runif(n), y = runif(n)...
2009 May 29
1
labels in rgl.sphere
Dear R list I am using rgl.sphere to visualize scatter plot data in three dimensional space. Thanks to the rgl library, I can easily find out the data point that I am interested in. However, as I can not see the labels of each data point directly in RGL window, I usually look for the values of x, y, z axis to find out the label (or line number of the data point). Is there any way that I
2007 Apr 04
1
rgl.postscript generating pdf: floating xlab, font size, transparency
...by adding the next two lines to a plot. However, by adding rgl.material(), also my next plots have the new updated properties I only intended for the sphere. How can I re-set the rgl.material to their defaults or how can I assign properties only for one object? rgl.material(alpha = 0.2 ) spheres3d(0,0,0,1, col= "yellow") I am working under Win XP with R 2.4.1 and the most current version of rgl. Thanks, Kim ## Generating data-set X <- c(1:6) endpoint <- 4 interval <- 1 data.length <- 1200 data.rep <- 10 R <- rep(seq(1,endpoint, by =interval),rep((data.length/...
2006 Aug 23
3
rgl: exporting to pdf or png does not work
Hej, When exporting a image from rgl, the following error is encountered: > rgl.postscript('testing.pdf', fmt="pdf") RGL: ERROR: can't bind glx context to window RGL: ERROR: can't bind glx context to window Warning messages: 1: X11 protocol error: GLXBadContextState 2: X11 protocol error: GLXBadContextState The pdf file is created and is readable, but all the labels
2016 Apr 04
0
Question about function DrawDensity3D {VecStatGraphs3D}
...seq(min(Cr$d), max(Cr$d), len = Layers + 2) ramp <- colorRamp(c("white", "yellow", "red")) colo <- rgb(ramp(seq(0, 1, length = Layers)), maxColorValue = 255) al <- seq(0.1, 0.6, len = Layers) module = sqrt(Cx * Cx + Cy * Cy + Cz * Cz) spheres3d(0, 0, 0, radius = max(module), color = "black", front = "line", back = "line", lwd = 1, smooth = TRUE, lit = TRUE, line_antialias = FALSE, alpha = 0.2) x <- c(0, max(module), 0, 0) y <- c(0, 0, max(module), 0) z <- c(0, 0, 0, m...
2008 Nov 21
2
rgl lighting question
Hi, I'm using rgl to generate a 3D surface plot and I'm struggling to get the lighting correct. Currently the surface gets plotted, but is very 'shiny'. On rotating the view, I get to see parts of the surface - but overall I don't see much detail because of the spotlight like lighting. I've played around with the specular, ambient and diffuse but I can't
2012 Jan 09
4
RGL- Drawing Circle
hi, i want to draw a simple circle by using 3d package RGL. i think i can use the command rgl.lines by studying the code from: http://www.swiftless.com/tutorials/opengl/circle.html but is there a faster and easier way to do it?? graham -- View this message in context: http://r.789695.n4.nabble.com/RGL-Drawing-Circle-tp4278717p4278717.html Sent from the R help mailing list archive at
2009 Oct 28
2
Labelling individual points on 3D PCA scatterplot
Hi There, I'm attempting to plot 10 values on a three-dimensional PCA with text labels next to each point. While i have no trouble doing this on 2D plots using the 'text' or 'textxy' function, I cannot find a function to do this on a 3D plot. I am using princomp for my PCA: >PCA<-princomp(eucdata, cor=TRUE) >PCA$scores [,1:3] # the three principal components i
2012 Nov 02
1
rgl package and animation
I am trying to figure out how to use rgl package for animation. It appears that this is done using the play3d() function. Below I have some sample code that plots a 3D path and puts a sphere at the point farthest from the origin (which in this case also appears to be at the end of the path). What I would like to do is animate the movement of another sphere along the length of the path
2007 Jun 05
2
biplot package
...x=hl[,1]*var.red, y=hl[,2]*var.red, labels = rownames(hl), cex=cex, col=col.var) } if(n.values == 3) { if (rgl.use) { require(rgl) require(mgcv) size = max(g)/20 * sphere.factor if (clear3d) clear3d() if (spheres) spheres3d(g, col=col.obj, radius=size, alpha=.5) else text3d(g, texts=rownames(g), col=col.obj, alpha=.5) aspect3d(aspect3d) for(i in 1:nrow(hl)) { segments3d(rbind(matrix(0, nc=3), hl[i,]*var.red), col=col.var) }...
2008 Jan 10
6
4 dimensional graphics
Dear all I want to display 4 dimensional space by some suitable way. I searched CRAN and found miscellaneous 3 dim graphics packages which I maybe can modify but anyway I am open to any hint how to efficiently display data like: longitude, latitude, height, value Thank you Petr Pikal petr.pikal at precheza.cz
2007 Jun 11
0
biplot package II
...col.var, var.factor, spheres, sphere.factor, box) { require(rgl) size = max(g)/20 * sphere.factor if (clear3d) clear3d() if (spheres) spheres3d(g, col=col.obj, radius=size, alpha=.5) else text3d(g, texts=rownames(g), col=col.obj, alpha=.5) aspect3d(aspect3d) for(i in 1:nrow(hl)) { segments3d(rbind(matrix(0, nc=3), hl[i,]*var.factor), col=col.var) } text3d(hl*var.factor, tex...
2011 May 23
3
RGL package installation problem on Centos
Dear R users, I have installed the latest version of R from source on Centos (using configure and make install). This seemed to work fine, with no Errors reported and R at the command line starts R. However, if I try and installed the package rgl using; install.packages("rgl") I get the following error; installing to /usr/local/lib64/R/library/rgl/libs ** R ** demo ** inst ** preparing
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...ybe there is a better overall solution. Here is some code that reads the result of the interpolation on a coarse grid and plots it: # read a set of gridded data points in 3D d = read.table("http://dl.dropbox.com/u/1047321/R/test3Ddata.txt", header=T) # plot library("rgl") spheres3d(d$x, d$y, d$z, alpha=alpha, radius=0.05) And here is a version that actually performs the interpolation a random set of points in 3D through kriging in case you want to try with increase precision. # create a set of random data points in 3D n = 50 data3D = data.frame(x = runif(n), y = runif(n)...