0
inspired by this blog: http://alstatr.blogspot.co.uk/2014/02/r-animating-2d-and-3d-plots.html I made a 2D gif of a heart with:
library(animation)
saveGIF({
for(i in 1:150){
dat<- data.frame(t=seq(0, 2*pi, by=0.1) )
xhrt <- function(t) 16*sin(t)^3
yhrt <- function(t) 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
dat$y=yhrt(dat$t)
dat$x=xhrt(dat$t)
with(plot(x,y, type="l", xlim = c(-100 , i ^ 2 / 10 )) )
}
}, interval = 0.1, ani.width = 550, ani.height = 550)
I wonder if anyone out there could show me how to do this in 3D!
1pepsimax I added three tags that seem relevant to your question. Hope that's ok. – DavidC – 2014-02-14T02:10:17.110
2@pepsimax You may want to add an objective winning criterion before this questions gets closed because its off-topic. – Howard – 2014-02-14T10:30:13.393
2Btw, if you remove the R tag, so other languages can compete, you may find that more folks take part. – DavidC – 2014-02-14T13:12:33.410