Image:Animated cardioid.gif
From Wikipedia, the free encyclopedia

Animated_cardioid.gif (480 × 480 pixel, file size: 78 KB, MIME type: image/gif)
[edit] Summary
This file was created by me (Deimos 28) using the following R source code:
N=40 theta = function(n) {return(2*pi*((0:(n-1))/((n-1))-1/2))} x=cos(theta(N))+cos(2*theta(N)) y=sin(theta(N))+sin(2*theta(N)) nbdigit=function(n) {return(floor(log(n,base=10))+1)} headingzeros=function(n) {return(3-nbdigit(n))} jpeg("animated_001.jpg") plot(x,y,type="l",xlim=c(-1.25,2.05),ylim=c(-1.75,1.75),axes=FALSE,xlab="",ylab="") dev.off() for (i in 2:N) { a="animated_" if (headingzeros(i)>0) { for (j in 1:headingzeros(i)) { a=paste(a,0,sep="") } } jpeg(paste(a,i,".jpg",sep="")) plot(x,y,type="l",xlim=c(-1.25,2.05),ylim=c(-1.75,1.75),axes=FALSE,xlab="",y lines(x[1:i],y[1:i],type="l",col=2,lwd=3) dev.off() }
Then using the following shell command:
convert -delay 2 -loop 50 ani*.jpg animated.gif
Note: image optimized by User:Kieff. The above code generates JPEG frames, which introducte compression artifacts that are extremely inneficient for the purpose of a GIF animation.
[edit] Licensing
I, the creator of this work, hereby grant the permission to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
Subject to disclaimers.
File history
Legend: (cur) = this is the current file, (del) = delete
this old version, (rev) = revert to this old version.
Click on date to download the file or see the image uploaded on that date.
- (del) (cur) 15:40, 25 September 2006 . . Kieff (Talk | contribs) . . 480×480 (79,799 bytes) (MUCH better version, no JPEG artifacts, severe size reduction.)
- (del) (rev) 14:45, 21 March 2006 . . Deimos 28 (Talk | contribs) . . 480×480 (552,741 bytes) (This file was created by me (~~~) using the following [http://wwwr-project.org R] source code: <pre><nowiki> N=40 theta = function(n) {return(2*pi*((0:(n-1))/((n-1))-1/2))} x=cos(theta(N))+cos(2*theta(N)) y=sin(theta(N))+sin(2*theta(N)) nbdigit=function()
- Edit this file using an external application
See the setup instructions for more information.