annotate generateIcon.R @ 374:ff797e8967b6 tonioni_multi_transform

Close old branch tonioni_multi_transform
author Chris Cannam
date Mon, 21 Jul 2014 13:02:12 +0100
parents f3ab20d784ff
children 91cc6e6a4db3
rev   line source
matthiasm@75 1 t <- seq(0,8*pi,.01)
matthiasm@76 2 w <- pnorm(t, 4*pi, .7)
matthiasm@75 3 n <- length(t)
matthiasm@75 4 pitchDiff <- 6
matthiasm@75 5 sin1 <- sin(t) + pitchDiff
matthiasm@75 6 sin2 <- sin(t)
matthiasm@81 7 x <- sin1 * w + sin2 * (1-w)
matthiasm@75 8
matthiasm@79 9 pad <- 3
matthiasm@75 10 lineWidth <- 15
matthiasm@75 11 outlineWidth <- 20
matthiasm@75 12 sz <- 200
matthiasm@75 13
matthiasm@76 14 png("tonyLogoWave.png", width = sz, height = sz, bg="transparent")
matthiasm@75 15 par(mar=c(0,0,0,0))
matthiasm@81 16 plot(t, x, type='l',
matthiasm@81 17 lwd=lineWidth*3, bty='n', xaxt='n', yaxt='n',
matthiasm@76 18 ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1,
matthiasm@79 19 xlim = c(0, 8*pi) + c(1,-1)*0.1,
matthiasm@79 20 col="white")
matthiasm@81 21 lines(t, x,
matthiasm@81 22 lwd=lineWidth, col = "black")
matthiasm@76 23 lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 24 lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 25 lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 26 lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@75 27 dev.off()