#
# R
#
# Atratores de Clifford
# Seg~Ter 9-10 fevereiro 2026
# by
# j
# 

x <- c()
y <- c()

tipo <- 1

a <- switch(tipo,
                 -1.24458046630025,
                 -2.0,
                 -3.0,
                 -1.0
            )

b <- switch(tipo,
                 -1.25191834103330,
                  3.0,
                  2.0,
                  3.0
            )

w <- switch(tipo,
                 -1.81590817030519,
                 2.0,
                 5.0,
                 2.0
           )

z <- switch(tipo,
                 -1.90866735205054,
                 3.0,
                 3.0,
                 -5.0
            )

xn <- 0
yn <- 0

i <- 0

maxL <- 30000

while (i<=maxL) {

   xnp1 <- sin(a*yn) + w*cos(a*xn)
   ynp1 <- sin(b*xn) + z*cos(b*yn)
    
   xn <- xnp1
   yn <- ynp1

   x <- c(x,xn)
   y <- c(y,yn)

   # cat(xn,yn,"\n")
   
   i <- i + 1
   
}

plot(x, y, pch=19, col="darkblue", cex = 0.15)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: