Mercurial > hg > tony
comparison generateIcon.R @ 81:f3ab20d784ff
white background to pitchtrack in icon
author | matthiasm |
---|---|
date | Sun, 01 Dec 2013 14:33:55 +0000 |
parents | f2c853101aeb |
children | 91cc6e6a4db3 |
comparison
equal
deleted
inserted
replaced
80:ce44317dd055 | 81:f3ab20d784ff |
---|---|
2 w <- pnorm(t, 4*pi, .7) | 2 w <- pnorm(t, 4*pi, .7) |
3 n <- length(t) | 3 n <- length(t) |
4 pitchDiff <- 6 | 4 pitchDiff <- 6 |
5 sin1 <- sin(t) + pitchDiff | 5 sin1 <- sin(t) + pitchDiff |
6 sin2 <- sin(t) | 6 sin2 <- sin(t) |
7 x <- sin1 * w + sin2 * (1-w) | |
7 | 8 |
8 pad <- 3 | 9 pad <- 3 |
9 lineWidth <- 15 | 10 lineWidth <- 15 |
10 outlineWidth <- 20 | 11 outlineWidth <- 20 |
11 sz <- 200 | 12 sz <- 200 |
12 | 13 |
13 png("tonyLogoWave.png", width = sz, height = sz, bg="transparent") | 14 png("tonyLogoWave.png", width = sz, height = sz, bg="transparent") |
14 par(mar=c(0,0,0,0)) | 15 par(mar=c(0,0,0,0)) |
15 plot(t, sin1 * w + sin2 * (1-w), type='l', | 16 plot(t, x, type='l', |
16 lwd=lineWidth, bty='n', xaxt='n', yaxt='n', | 17 lwd=lineWidth*3, bty='n', xaxt='n', yaxt='n', |
17 ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1, | 18 ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1, |
18 xlim = c(0, 8*pi) + c(1,-1)*0.1, | 19 xlim = c(0, 8*pi) + c(1,-1)*0.1, |
19 col="white") | 20 col="white") |
20 plot(t, sin1 * w + sin2 * (1-w), type='l', | 21 lines(t, x, |
21 lwd=lineWidth, col = blacj) | 22 lwd=lineWidth, col = "black") |
22 lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2) | 23 lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2) |
23 lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2) | 24 lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2) |
24 lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2) | 25 lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2) |
25 lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2) | 26 lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2) |
26 dev.off() | 27 dev.off() |