R Art

Galaxy

Spirals

 

---------------------------------------------------------------------------------------------------

Sourcecode 

1)
a=2
b=0.21
t<- seq(0,20*pi,by=0.002)
ex<-rnorm(length(t),0,30)
ey<-rnorm(length(t),0,30)
x<- a*exp(b*t)*cos(t)
y<- a*exp(b*t)*sin(t)
par(bg = "black")
plot(-x-ex,y+ey,type="p", xlab="", ylab="",xaxt='n', ann=FALSE,yaxt='n', frame.plot=FALSE,col="white",lwd=2,pch=20,ylim=c(min(-y-ey,y+ey),max(-y-ey,y+ey)),xlim=c(min(-x,x),max(-x,x)) )
points(x+ex,-y-ey,type="p", col="white",lwd=1,pch=20)

2)


<pre>
<pre>par(bg = "white")
plot(x,y,type="l", xlab="", ylab="", xlim=c(min(c(x,-x)), max(c(x,-x))), ylim=c(min(c(y,-y)), max(c(y,-y))), col=1, lwd=2, frame.plot=FALSE, xaxt='n', ann=FALSE, yaxt='n')
</pre>
</pre>
points(-x,-y,type="l",col=2,lwd=2)
points(5*x,5*y,type="l",col=3,lwd=2)
points(-5*x,-5*y,type="l",col=4,lwd=2)
points(y,x,type="l",col=5,lwd=2)
points(-y,-x,type="l",col=6,lwd=2)
points(y,x,type="l",col=5,lwd=2)
points(-y,-x,type="l",col=6,lwd=2)
points(5*y,5*x,type="l",col=7,lwd=2)
points(-5*y,-5*x,type="l",col=8,lwd=2)

3)

par(mfrow=c(2,2),bg="grey")

plot(x,y,type="l", xlab="", ylab="",xlim=c(min(c(-x,x)),max(c(-x,x))),ylim=c(min(c(-y,y)),max(c(-y,y))),xaxt='n', ann=FALSE,yaxt='n', frame.plot=FALSE,lwd=2)
points(-x,-y,type="l",lwd=2)

#####################################################################
plot(x,y,type="l", xlab="", ylab="",xlim=c(min(c(-x,x)),max(c(-x,x))),ylim=c(min(c(-y,y)),max(c(-y,y))),xaxt='n', ann=FALSE,yaxt='n', frame.plot=FALSE,lwd=2)
points(-x,-y,type="l",lwd=2)
points(-x,y,type="l",lwd=2)
points(x,-y,type="l",lwd=2)
#####################################################################
y<- a*exp(b*t)*sin(t)^2

plot(x,y,type="l", xlab="", ylab="",xlim=c(min(c(-x,x)),max(c(-x,x))),ylim=c(min(c(-y,y)),max(c(-y,y))),xaxt='n', ann=FALSE,yaxt='n', frame.plot=FALSE,lwd=2)
points(-x,-y,type="l",lwd=2)
########################################################################
y<- a*exp(b*t)*sin(t)^3

plot(x,y,type="l", xlab="", ylab="",xlim=c(min(c(-x,x)),max(c(-x,x))),ylim=c(min(c(-y,y)),max(c(-y,y))),xaxt='n', ann=FALSE,yaxt='n', frame.plot=FALSE,lwd=2)
points(-x,-y,type="l",lwd=2)
Tagged ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s