# Monday, December 16, 2013

## Rosie

// just type here
// and click "save" when your done

void setup() {
size(800,800);
smooth();
background(17);
batman(350,150,color(100,100,255),0.4);
batman(250,250,color(150,150,252),0.4);
batman(150,350,color(200,200,250),0.4);

}

// DO NOT EDIT CODE BELOW HERE.
void batman(int x, int y, color c, int s){
pushMatrix();
translate(x,y);
scale(s);
stroke(255);
strokeWeight(10);

float [] x2=new float [800];
float [] y1=new float [800];
float [] y2=new float [800];
float [] y3=new float [800];
float [] y4=new float [800];
int j=0;
for (float i=-8;i<8;i+=0.02){
j++;
x2[j]=i;
}

for (int i=1;i<800;i++) {
y1[i]=-50*(2*sqrt(-abs(abs(x2[i])-1)*abs(3-abs(x2[i]))/((abs(x2[i])-1)*(3-abs(x2[i]))))*(1+abs(abs(x2[i])-3)/(abs(x2[i])-3))*sqrt(1-(x2[i]/7)*(x2[i]/7))+(5+0.97*(abs(x2[i]-0.5)+abs(x2[i]+0.5))-3*(abs(x2[i]-0.75)+abs(x2[i]+0.75)))*(1+abs(1-abs(x2[i]))/(1-abs(x2[i]))));
if (y1[i]!=y1[i]) //removes NaN entries
{
y1[i]=0;
}

y2[i]=-50*(-3*sqrt(1-(x2[i]/7)*(x2[i]/7))*sqrt(abs(abs(x2[i])-4)/(abs(x2[i])-4)));
if (y2[i]!=y2[i]) //removes NaN entries
{
y2[i]=0;
}
y3[i]=-50*(abs(x2[i]/2)-0.0913722*(x2[i]*x2[i])-3+sqrt(1-(abs(abs(x2[i])-2)-1)*(abs(abs(x2[i])-2)-1)));
if (y3[i]!=y3[i]) //removes NaN entries
{
y3[i]=0;
}
y4[i]=-50*((2.71052+(1.5-0.5*abs(x2[i]))-1.35526*sqrt(4-(abs(x2[i])-1)*(abs(x2[i])-1)))*sqrt(abs(abs(x2[i])-1)/(abs(x2[i])-1))+0.9);
if (y4[i]!=y4[i]) //removes NaN entries
{
y4[i]=0;
}
}

for (int i=2;i<800;i++) {
stroke(c);
line(i,0,i,y1[i]);
line(i,0,i,y2[i]);
line(i,0,i,y3[i]);
line(i,0,i,y4[i]);
}

popMatrix();

}

## info

submitted by: technocampsuog
views: 76
Newport University Open Day

This sketch has a parent
Tags: Im, batman, newport