<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Nossa, que lindo. :)<br>Feliz Natal. :D<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Mon, 19 Dec 2011 20:37:36 -0300<br>From: ribas.aca@gmail.com<br>To: r-br@listas.c3sl.ufpr.br<br>Subject: [R-br] Cartão de Natal No R [off-topic]<br><br><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/" target="_blank">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" target="_blank">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>
<br>_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.</div>                                      </div></body>
</html>