Skip to content

Instantly share code, notes, and snippets.

View javimarlop's full-sized avatar

Martinez-Lopez Javier javimarlop

View GitHub Profile
@javimarlop
javimarlop / gist:579dd79d1fd32c000aa4
Created September 8, 2014 19:35
Fractal creation with R
require(RColorBrewer)
#fractal<-function(){
colorRampPalette(brewer.pal(9,'Spectral'))(25)->paleta
z0 <- complex(real = stats::rnorm(1000000), imaginary = stats::rnorm(1000000))
c<-complex(real=-.7,imaginary=.5)
#png('fractal2.png')
plot(z0,xlim=c(-1,1),ylim=c(-1,1),pch=20)
for(j in 1:length(z0)){
z<-complex(length.out=100)
modz<-NULL