Dear list, I wish to visualise some 4D data as a kind of colour / translucent cloud in 3D. I haven't seen such plots in R (but perhaps I missed a feature of rgl). The easiest option I found would be to export the data in povray's df3 (density file) format and visualise it with povray. The format specification baffles me a little, http://www.povray.org/documentation/view/3.6.1/374/ ; fortunately I found a few C++ utilities that could do the conversion from a plain ascii datafile to this format. Basically, I wish to create a set of xyz coordinates and a scalar function value in R, export it as a regular ascii file, convert it to df3 and visualise it in povray. An example of data from the R side would be, N <- 10 xx <- seq(0,N) d <- expand.grid(x=xx,y=xx,z=xx) d$t <- runif(nrow(d), 0, 255) cat(file="data.dat", "1 1 1\n") write.table(d,file="data.dat",row.names = F, col.names = F,append=T) I wonder if anyone here ever played with this idea and could offer some suggestions (I couldn't get it to work so far). Best regards, baptiste -- ____________________ Dr. Baptiste Augui? Departamento de Qu?mica F?sica, Universidade de Vigo, Campus Universitario, 36310, Vigo, Spain tel: +34 9868 18617 http://webs.uvigo.es/coloides
On Fri, Aug 27, 2010 at 3:41 PM, baptiste auguie <baptiste.auguie at googlemail.com> wrote:> Dear list, > > I wish to visualise some 4D data as a kind of colour / translucent > cloud in 3D. I haven't seen such plots in R (but perhaps I missed a > feature of rgl). The easiest option I found would be to export the > data in povray's df3 (density file) format and visualise it with > povray.This is not answering your question, but might the misc3d package be relevant for you? http://www.jstatsoft.org/v28/i01/ -Deepayan
On 08/27/2010 08:11 PM, baptiste auguie wrote:> Dear list, > > I wish to visualise some 4D data as a kind of colour / translucent > cloud in 3D. I haven't seen such plots in R (but perhaps I missed a > feature of rgl). The easiest option I found would be to export the > data in povray's df3 (density file) format and visualise it with > povray. > > The format specification baffles me a little, > http://www.povray.org/documentation/view/3.6.1/374/ ; fortunately I > found a few C++ utilities that could do the conversion from a plain > ascii datafile to this format. Basically, I wish to create a set of > xyz coordinates and a scalar function value in R, export it as a > regular ascii file, convert it to df3 and visualise it in povray. > > An example of data from the R side would be, > > N<- 10 > xx<- seq(0,N) > d<- expand.grid(x=xx,y=xx,z=xx) > d$t<- runif(nrow(d), 0, 255) > > cat(file="data.dat", "1 1 1\n") > write.table(d,file="data.dat",row.names = F, > col.names = F,append=T) > > I wonder if anyone here ever played with this idea and could offer > some suggestions (I couldn't get it to work so far). >Hi Baptiste, I once fooled around with a set of functions I wrote to produce 3D plots as rendered objects with POVray. The functions really just translated R code into POVray code and wrote a file that was then passed to the POVray interpreter. If you find that Deepayan's suggestion of misc3d won't do it, I could probably dig out the old code I wrote, although it wasn't exactly what you are doing. Jim
Seemingly Similar Threads
- lattice::panel.levelplot.raster too picky with unequal spacing
- [LLVMdev] Using Povray with the test suite
- (RFC) Adjusting default loop fully unroll threshold
- (RFC) Adjusting default loop fully unroll threshold
- (RFC) Adjusting default loop fully unroll threshold