Hi, my name is Antonio Sánchez Chinchón and I live in Madrid, Spain.

I like cooking because I love eating. I like playing banjo because I love music. I like doing silly things because I love my children’s laughter. I like doing this blog because I love mathematics. All these things make my life worth of living.

All your comments are more than welcome. You can find me in aschinchon (at) gmail (dot) com where I will answer all your emails, be sure.

Thanks to all of you who spend your time reading my *entertainments*.

### Like this:

Like Loading...

Nice blog and nice posts too! Congratulations!

Fantastic!

Thank you very much!

Very interesting blog. Congratulations. Keep it up.. And your English is NOT poor!!

Thanks so much!

Hi, I was fascinated by the harmonographs – I remember seeing similar things done on paper on kids tv in the seventies. I took your code and extended it into 3d so I could experiment with the rgl package. I created some beautiful figures (which I would attatch if this would let me.

In lieu of that here is the code:

library(rgl)

library(evd)

xt <- function(t) exp(-d1*t)*sin(t*f1+p1)+exp(-d2*t)*sin(t*f2+p2)

yt <- function(t) exp(-d3*t)*sin(t*f3+p3)+exp(-d4*t)*sin(t*f4+p4)

zt <- function(t) exp(-d5*t)*sin(t*f5+p5)+exp(-d6*t)*sin(t*f6+p6)

t <- seq(1, 100, by=.001)

f1 <- jitter(sample(c(2,3),1))

f2 <- jitter(sample(c(2,3),1))

f3 <- jitter(sample(c(2,3),1))

f4 <- jitter(sample(c(2,3),1))

f5 <- jitter(sample(c(2,3),1))

f6 <- jitter(sample(c(2,3),1))

d1 <- runif(1,0,1e-02)

d2 <- runif(1,0,1e-02)

d3 <- runif(1,0,1e-02)

d4 <- runif(1,0,1e-02)

d5 <- runif(1,0,1e-02)

d6 <- runif(1,0,1e-02)

p1 <- runif(1,0,pi)

p2 <- runif(1,0,pi)

p3 <- runif(1,0,pi)

p4 <- runif(1,0,pi)

p5 <- runif(1,0,pi)

p6 <- runif(1,0,pi)

x <- xt(t)

y <- yt(t)

z <- zt(t)

cr <- abs(z)/max(abs(z))

cg <- abs(x)/max(abs(x))

cb <- abs(y)/max(abs(y))

zscale <- 1

# clear scene:

clear3d("all")

# setup env:

bg3d(color="white")

light3d()

# draw shperes in an rgl window

spheres3d(x, y, z, radius=0.025, color=rgb(cr,cg,cb))

Its really impressive!! Thanks a lot for sharing with us. Congratulations!!

Loved the Harmonographs….plan to use it in a “Math as Art” lesson for public school students here in the states….if that is OK with you?

One tiny change I made is to add a randomly selected color.

f1=jitter(sample(c(2,3),1));f2=jitter(sample(c(2,3),1));f3=jitter(sample(c(2,3),1));f4=jitter(sample(c(2,3),1))

d1=runif(1,0,1e-02);d2=runif(1,0,1e-02);d3=runif(1,0,1e-02);d4=runif(1,0,1e-02)

p1=runif(1,0,pi);p2=runif(1,0,pi);p3=runif(1,0,pi);p4=runif(1,0,pi)

xt = function(t) exp(-d1*t)*sin(t*f1+p1)+exp(-d2*t)*sin(t*f2+p2)

yt = function(t) exp(-d3*t)*sin(t*f3+p3)+exp(-d4*t)*sin(t*f4+p4)

t=seq(1, 100, by=.001)

dat=data.frame(t=t, x=xt(t), y=yt(t))

cv = sample(1:657,1)

with(dat, plot(x,y, type=”l”,col=cv, xlim =c(-2,2), ylim =c(-2,2), xlab = “”, ylab = “”, xaxt=’n’, yaxt=’n’))

I am ok, of course! Thanks for your comment

Excellent! Thanks.

I have created a web page with my first 28 of the 3D Harmonographs all at 1300×1300 pixels.

You can find here: http://www.glassblower.info/harmonograph/3D-harmonographs.html

Thanks so much for sharing the “R” code!

Tony Patti

I also put of a post on Rpubs showing some fun graphics I’ve done in the past with SAS. Enjoy the Cowboy Hat! The tanh() function is especially fun.

http://www.rpubs.com/lb82443/cowboyhat

Great blog Antonio! It’s really fun reading what you do with R… I especially like your aRt skills! Awesome! Keep posting!

Thank you! I keep writing until I run out of ideas

Great site and nice introduction, hello there. 🙂