annotate generateIcon.R @ 76:df8784695584

icons
author matthiasm
date Fri, 29 Nov 2013 14:35:39 +0000
parents 279cf9b11c73
children f2c853101aeb
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@75 7
matthiasm@75 8 lineWidth <- 15
matthiasm@75 9 outlineWidth <- 20
matthiasm@75 10 sz <- 200
matthiasm@75 11
matthiasm@76 12 png("tonyLogoWave.png", width = sz, height = sz, bg="transparent")
matthiasm@75 13 par(mar=c(0,0,0,0))
matthiasm@75 14 plot(t, sin1 * w + sin2 * (1-w), type='l',
matthiasm@75 15 lwd=lineWidth, bty='n', xaxt='n', yaxt='n',
matthiasm@76 16 ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1,
matthiasm@75 17 xlim = c(0, 8*pi) + c(1,-1)*0.1)
matthiasm@76 18 lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 19 lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 20 lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@76 21 lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2)
matthiasm@75 22 dev.off()