search for: par3d

Displaying 20 results from an estimated 45 matches for "par3d".

2008 Oct 24
1
movie3d function in the rgl package
...t;ImageMagik" is working properly, R packages are working, basic examples available in the manual also working fine. Problem Solved: when I tried to create more complex movies, i.e. combining different views and zooming, the R-console crashed or returned error playing the function returned by par3dinterp, using heterogeneous parameters. When not crashing, "Error: length(userMatrix) == 16 * length(times) is not TRUE." Counterexample: #rotating v=seq(from=1,to=61,by=2.5) for (i in 1:length(v)){ rgl.viewpoint(270+v[i],80-(v[i]/1)) #This is a counterexample M <- par3d() lis...
2006 Jan 03
1
How to set the size of a rgl window, par3d() ?
Dear R- Users, is there a way to determine the size of an rgl window (rgl.open()) either in advance or afterwards, (without using the mouse, of course) ? Intuitively, one would assume to set the size by: library("rgl"); par3d(viewport=c(0,0,500,500)); #rgl.open(); for example. As the parameter 'viewport' is 'readonly' this results in an error message: Error in par3d(viewport = c(0, 0, 500, 500)) : invalid value specified for rgl parameter "viewport" In addition: Warning messa...
2008 Sep 17
1
rgl: How to position a window during open3d call
...lace on my screen. So, I try to set the "windowRect" parameter as follows: > library("rgl") > open3d(windowRect=c(100,100,500,500)) [1] 1 Obviously you can't see where the window appears, so I'll ask for the "windowRect" parameter: > par3d()["windowRect"] $windowRect [1] 2300 764 2556 1020 As you can see, the window is not positioned at (100,100) nor is the size 400x400. The size is the default 256x256 and the position is where the window manager would put a new window if its position is unspecified. [note: I have...
2008 Jan 26
2
scatterplot3d with categorical data
Dear users, I'm trying to produce a 3d bar plot but the x and y dimensions have categorical data -- so I only want 3 points on each axis. So I try: require(scatterplot3d) mymat<-data.frame( x=c(1,1,1,2,2,2,3,3,3), y=c(1,2,3,1,2,3,1,2,3), z=c(1,2,3,4,5,6,7,8,9)) scatterplot3d(mymat, type="h", lwd=5, pch=" ", xlab="xlabel",
2010 Dec 17
2
rgl: coordinating and saving viewpoints, zoom, scale for multiple images
...so that one could flip back/forth among graphs and see only the relevant differences. In 2D, all this usually requires is setting the same xlim, ylim and other constant aspects across multiple graphs. In 3D with rgl, I can do one graph, rotate, zoom, etc. by hand and capture the viewpoint with par3d("userMatrix"), but I can't figure out how to save the zoom and scale values to reproduce that viewpoint in another graph, in a way I could feed to view3d or rgl.viewpoint and get an equivalent view of the new data/model. An example follows, but I don't know how to capture in co...
2011 Sep 09
1
rgl: axis/viewport/box problems in persp3d()
...ction(u,v) M(cbind(u,v))) persp3d(u, v, z, aspect="iso", front="line", lit=FALSE, axes=FALSE, xlab="", ylab="", zlab="") axes3d(edges=c('x--','y--','z+-'), xlab="x", ylab="y", zlab="z") par3d(windowRect=c(0,0,480,480)) R1 <- rotationMatrix(-55*pi/180, 1,0,0) R3 <- rotationMatrix(50*pi/180, 0,0,1) R <- R1 %*% R3 rgl.viewpoint(interactive=TRUE, userMatrix=R) # rotate rgl.postscript("myplot.pdf", fmt="pdf")
2011 Apr 25
1
Defining origin for rotation in RGL device
Hi all, How can I tell RGL to set the center for the rotation to the origin of the coordinate system (0,0,0). It seems that the default is to use the center of the display not the origin of the coordinate system. open3d() lines3d(c(0, 1), c(0,0), c(0,0)) lines3d(c(0,0), c(0, 1), c(0,0)) lines3d(c(0,0), c(0,0), c(0, 1)) TIA Mark ??????????????????????????????????????? Mark Heckmann Blog:
2008 Mar 01
1
How to chain user mouse handlers in rgl
...ter #---------------------- 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" par3d(mouseMode = newhandler) } rgl.setMouseCallbacks(1, begin) } btn3d()
2014 Apr 17
1
rgl rotations
Is there a way to change the viewpoint using view3d (or rgl.viewpoint) with respect to the image that currently appears rather than the perspective that rgl thinks is the default? For example, if I create an image and then perform what should be a no-op: rgl.viewpoint(userMatrix=rotationMatrix(0,1,0,0)) the image is rotated. Then I can perform rotations on the result without surprises. But I
2008 Jun 24
2
problem with rgl interactivity with R-2.7.1 and Ubuntu Hardy
I'm trying to use the rgl package on R-2.7.1 running on top of Ubuntu Hardy amd64. using open3d() and plot3d() I get a plot, but it is not interactive. Furthermore, changes to par3d("FOV"=my.new.value) do nothing. I suspect something is wrong with the rendering engine or interface to it. I do have an Nvidia driver installed and compiz works correctly on the desktop. I've corresponded with Duncan Murdoch, the package maintainer about this and he feels there is pr...
2011 Sep 09
1
Rgl and plotmath symbols (via sprites): a trial
...quot;", ylab="", zlab="") axes3d(edges=c('x--','y--','z+-')) sprites3d(1,-0.4,0.65, radius=0.5, lit=FALSE, textype="alpha", texture="zlabel.png") rgl.postscript("W.pdf", fmt="pdf") # print to file # par3d(c("userMatrix", "zoom", "FOV")): # # $userMatrix # [,1] [,2] [,3] [,4] # [1,] 0.7262191 -0.6867201 0.03195775 0 # [2,] 0.2750087 0.3328032 0.90200466 0 # [3,] -0.6300603 -0.6462642 0.43054202 0 # [4,] 0.0000000 0.0000000 0.00000000...
2009 Apr 07
2
Annotation rgl plot
Hi, i was wondering if there is a way to annotate rgl plot, after searching i haven't found anything suitable. I saw function text3d but was thinking more about text on the margin, so not interactive. Thanks -- View this message in context: http://www.nabble.com/Annotation-rgl-plot-tp22930428p22930428.html Sent from the R help mailing list archive at Nabble.com.
2010 Apr 27
2
how to set chart output size in rgl (surface3d)?
Hi R users, Does anyone know how to change the size of 3d charts? I'm using surface3d in rgl package, opening a new window each time to display the chart. I want it so that the chart fills the whole window, because when I output it to png, I don't want all the white space around the chart (right now, i'm getting this white "border" around the chart because the chart is
2010 May 18
1
[RGL] Need help to modify current plot
Dear folks, I have created a plot on RGL device :   x = 1:6 y = seq(-12, 5, by=1) z = matrix(0, length(y), length(x)) z[13,3] = 1; z[13,4] = 1.011765 surface3d(x, y, t(z), col=rainbow(1000)) grid3d(c("x-", "y-", "z"))   Now I want to draw 2 lines along x=3 & x=4, over the surface (with different colour). Could somebody help me how to draw that?   Thanks,
2011 Jun 18
1
[rgl] Dynamically change the color of 3d objects
Hi, I'm new here. This question concerns the package rgl. Is it possible to change the colour of a set of points drawn with plot3d /without/ removing them from the scene? The idea is to create a presentation of a clustering algorithm, step by step, representing the currently assigned cluster by a colour. Removing all the points with "rgl.pop" and replotting them at each step
2011 Jul 14
1
rgl: reproduce final state of interactive plot?
After interacting with a 3d plot (eg plot3d, persp3d), is there a way to capture the final settings of view angles, etc, so that the final plot could be easily reproduced? The plot functions themselves just return a vector of 'ids'. -- View this message in context: http://r.789695.n4.nabble.com/rgl-reproduce-final-state-of-interactive-plot-tp3667866p3667866.html Sent from the R help
2011 Oct 21
1
windows limits
Hello, Using the rgl package, I can set the device window to any dimension (that I have tested): par3d(windowRect=c(1,1,700,700)) With windows I can't get the window to span from the top to the bottom of the monitor. In the following, no matter how large the ypinch value gets it stops, leaving about 2 inches of space at the bottom of my screen: windows(record=TRUE, ypinch=1100, xpinch=10, xpos=...
2012 Jan 06
1
how to use rgl to plot dynamic orbit
Dear all, I have a question about the plotting of the dynamical orbit by using rgl. My code is as follows: open3d() par3d(cex=2) bg3d("white") for(i in 1:out.length){ ind<-which plot3d(x[1:i],y[1:i],out[,"z"][1:i],xlim=c(-10,10),ylim=c(-10,10),zlim=c(-10,10),col="red",cex=2) Sys.sleep(0.0001) } ,where x,y,out[,"z"] are the position of the object in different time. I would lik...
2006 Aug 23
1
rgl package: color of the axes
...pect=TRUE,col="#000000") or decorate3d(aspect=TRUE,color="#000000") does not help, the axes still have the last color used for plotting an object. In the help page of decorate3d on can find the following line: ...: additional parameters which will be passed to 'par3d', 'material3d' or 'decorate3d'. So the 'color' argument should have an effect. The workaround is simple. Set the color with rgl.material before calling decorate3d: rgl.material(color="#000000") Maybe this should be done directly in the decorat...
2009 Feb 16
1
Help with rgl
...ext=vertices[2],adj=0,color="blue") text3d(coord.3,text=vertices[3],adj=0,color="blue") text3d(coord.4,text=vertices[4],adj=1,color="blue") text3d(coord.5,text=vertices[5],adj=0,color="blue") # couldn't make this work... #open3d(viewport=c(0,0,686,489)) #par3d(zoom = 1.157625) filename = "piramide.png" rgl.snapshot(filename)