Skip to content

Instantly share code, notes, and snippets.

@i2pi

i2pi/simple.R Secret

Created December 7, 2011 05:15
  • Star 15 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save i2pi/0b7e1b4f88cd93c5fd03 to your computer and use it in GitHub Desktop.
Simple Logo
wave <- function (a, R, p, w) {
x <- (0.5 + 0.5*R*sin(p+w*a))*cos(a)
y <- (0.5 + 0.5*R*sin(p+w*a))*sin(a)
return (cbind(x,y))
}
blue <- '#3F8492'
red <- '#E57660'
t <- seq(0, 2*pi, length.out=100)
M<-0.8
plot(c(-1, 1)*M, c(-1, 1)*M, pch='', bty='n')
LWD=7
pinc=2*pi/5
amp <- 0.2
lines(wave(t,amp,0,2), lwd=LWD, col=sprintf('%s%2x', blue, 1.0 * 255))
lines(wave(t,amp,pinc*1,2), lwd=LWD, col=sprintf('%s%2x', red, 1.0 * 255))
lines(wave(t,amp,pinc*2,2), lwd=LWD, col=sprintf('%s%2x', blue, 0.8 * 255))
lines(wave(t,amp,pinc*3,2), lwd=LWD, col=sprintf('%s%2x', red, 0.8 * 255))
lines(wave(t,amp,pinc*4,2), lwd=LWD, col=sprintf('%s%2x', blue, 0.6 * 255))
@i2pi
Copy link
Author

i2pi commented Aug 16, 2013

logomatic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment