search for: usermatrix

Displaying 15 results from an estimated 15 matches for "usermatrix".

2008 Oct 24
1
movie3d function in the rgl package
...able 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() lista[[k]]=M; k=k+1; } #zooming v=seq(from=1,to=0.12,by=-0.02) for (i in 1:length(v)){ pa...
2011 Jun 07
1
rgl: insert pauses in animation sequence / movie formats other than gif?
Two questions related to creating animated movies with rgl: 1. I've created an rgl scene with 5 different views I want to display in a movie, but I'd like to insert pauses (say, 5 seconds) at each view. How can I do this? I first created 5 userMatrix's, then play3d( par3dinterp( userMatrix=list(M1, M2, M3, M4, M5)), ,duration=2*60/5) ) then tried simply repeating each twice, play3d( par3dinterp( userMatrix=list(M1, M1, M2, M2, M3, M3, M4, M4, M5, M5)), ,duration=2*60/5) ) but that didn't give the desired effect. I see that play...
2010 Dec 17
2
rgl: coordinating and saving viewpoints, zoom, scale for multiple images
...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 code what I did ma...
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:
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 want to specify rotation with respect to the image as it originally appeared, or with respect to the viewpoint that is currently in effect. Experimentation has revealed that when usi...
2009 Oct 15
1
ImageMagick not seen by movie3d function from rgl package
...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 ) and then I get the following message: Writing movie050.pn...
2011 Sep 09
1
Rgl and plotmath symbols (via sprites): a trial
...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 1 # # $zoom # [...
2011 Sep 09
1
rgl: axis/viewport/box problems in persp3d()
...t;") 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")
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
2011 Jun 03
1
movie3d in rgl object 'movie' not found
...ular="black", axes=FALSE, box=FALSE, xlab="", ylab="", zlab="", normal_x=x, normal_y=y, normal_z=z) #I run the above, note the device ID and then enter the following with rgl.cur(1) if my device ID is 1. movie3d(par3dinterp(par3dsave(params = c("userMatrix", "scale", "zoom", "FOV"), times = FALSE, dev = rgl.cur(1))), duration = 5, fps = 10, movie = "movie", frames = movie, dir=tempdir(), type = "gif") #The par3d window pops up, I move the globe around a bit and press "record" a few tim...
2008 Sep 01
1
play3d() translation
Hi All, I would like to be able to use play3d() to translate the view along a surface, and zoom in and out. All the examples in play3d() function description are of rotations. I would also like to know if there is a method of creating a legend of for the 3d surface using rgl package. Thanks in advance. Chibisi [[alternative HTML version deleted]]
2012 Oct 08
1
3d polar coordinates in rgl function view3d()
Dear all: I'm enjoying using rgl and I want to set a specific viewpoint. I understand that view3d() will do so by setting the 3d polar coordinate angles, theta and phi. In standard polar coordinates, theta is the angle away from the X axis in the X-Y plane and phi (inclination angle) is the angle between the Z axis and the radius vector It appears that when you use view3d() theta is
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
2012 Mar 09
2
rgl: cylinder3d() with elliptical cross-section
For a paper dealing with generalized ellipsoids, I want to illustrate in 3D an ellipsoid that is unbounded in one dimension, having the shape of an infinite cylinder along, say, z, but whose cross-section in (x,y) is an ellipse, say, given by the 2x2 matrix cov(x,y). I've looked at rgl:::cylinder3d, but don't see any way to make it accomplish this. Does anyone have any ideas? thx,
2008 Mar 26
4
Want to draw 3D cylinder objects
Hello, I want to draw 3D cylinder objects in R. Given is the length and the diameter of the cylinder. Has anybody an example? Thank you very much! Best regards -- ---------------------- Dr. Hans-Joachim Klemmt Forstoberrat Organisationsprogrammierer IHK Bayerische Landesanstalt f?r Wald und Forstwirtschaft zugewiesen an Lehrstuhl f?r Waldwachstumskunde Technische Universit?t M?nchen