Displaying 1 result from an estimated 1 matches for "trees3d".
Did you mean:
  trees
  
2006 May 23
1
shapes in rgl
...roduce a simple visualisation of a forest model 
results using "lollipops". Its just a bit of fun, but as many of the 
trees are pines I would like to depict their crowns as cones. If there 
is a solution I need it to work under windows.
Here is the example.
library(rgl)
library(misc3d)
Trees3d<-function(x,y,z,rad,cols="lightgreen"){
  rgl.bg(color="white")
  rgl.spheres(x,(z-rad),-y,rad,col=cols,alpha=1)
  x<-rep(x,each=3)
  y<-rep(y,each=3)
  z<-rep(z-rad*2,each=3)
  a<-seq(3,length(x),by=3)
  y[a]<-NA
  x[a]<-NA
  z[a]<-NA
  a<-seq(1,lengt...