<span style="font-family:inherit">Ha, segue um cartão de natal feito com o R.<br>Eu vi no Blog da revista Oikos:<br><a href="http://oikosjournal.wordpress.com/2011/12/19/merry-christmas/">http://oikosjournal.wordpress.com/2011/12/19/merry-christmas/</a><br>
<br>Mas o código esta neste blog aqui:<br><a href="http://evol-eco.blogspot.com/2011/12/holiday-card.html">http://evol-eco.blogspot.com/2011/12/holiday-card.html</a><br><br>Feliz natal a todos :)<br><br>###holiday caRd <br>
 <br>#install "rgl" package if necessary: <br>install.packages("rgl") </span><br>
<div>
<span style="font-family:inherit">#load library <br>library(rgl) <br> <br>##Data <br>r=1.0 <br>h=5.0 <br>m=h/r <br>x=seq(0:99) <br>y=x <br>X=x*cos(y) <br>Y=x*sin(y) <br>Z=-1*(m*x) <br>Z1=Z+rnorm(length(Z),Z,5) <br>sub<-matrix(subset(c(X,Y,Z),Z==max(Z)),ncol=3) <br>
trunk<-matrix(c(0.54,0.84,-200,0.54,0.84,-650),byrow=TRUE,ncol=3) <br>sno<-c(0,rep(15,9)) <br> <br>##Plot card <br>open3d(FOV=1) <br>par3d(windowRect=c(100,100,600,600)) <br>bg3d("aquamarine2") <br>plot3d(X,Y,Z,col="darkgreen",type="l",box=FALSE,axes=FALSE,lwd=10,zlim=c(min(Z),0),xlab="",ylab="",zlab="",top=TRUE,border=TRUE)
 <br>plot3d(X,Y,Z,col=c("yellow","red"),add=TRUE,type="s",radius=3) <br>points3d(sub,col="orange",size=10) <br>lines3d(trunk,col="brown",lwd=20) <br>text3d(matrix(c(0.54,-100,300),ncol=3),text="Happy Holidays",font=5,cex=1.9,color="darkred",adj=c(0.5,1)) <br>
text3d(matrix(c(0.54,0.84,-650),ncol=3),text="and",font=5,cex=1.5,color="darkred",adj=c(0.5,1)) <br>text3d(matrix(c(0.54,75,-780),ncol=3),text="a Happy New Year",font=5,cex=1.9,color="darkred",adj=c(0.5,1)) <br>
mat<-par3d("scale") <br> <br>##Play card <br>for(i in 1:10){ <br> par3d(scale=mat,ignoreExtent=TRUE) <br> points3d(matrix(c(sample(-160:160,sno[i]),sample(-160:160,sno[i]),sample(-500:150,sno[i])),ncol=3),col="white",size=3) <br>
play3d(spin3d(axis=c(0,0,1)),duration=1) <br>if(i==10){points3d(sub,col="darkorange",size=17) <br>plot3d(X,Y,Z,col=c("yellow","red"),type="s",radius=4,add=TRUE) } } <br>text3d(matrix(c(0,140,-900),ncol=3),text="From the EEB & Flow",font=1,cex=1.0,color="darkgreen",adj=c(0.5,1)) <br>
<br> <br>##The
 rgl device window allows you to use your mouse to manipulate the plot 
in 3-dimensions, so feel free to do so before closing it.</span></div><br><br clear="all"><br>-- <br><div>Grato<br>Augusto C. A. Ribas</div>
<div> </div>
<div>Site Pessoal: <a href="http://augustoribas.heliohost.org" target="_blank">http://augustoribas.heliohost.org</a></div>
<div>Lattes: <a href="http://lattes.cnpq.br/7355685961127056" target="_blank">http://lattes.cnpq.br/7355685961127056</a><br></div><br>