Monday, February 15, 2010
orange
PImage back=null;
float rotti=0;
int bx=40;
int by=40;
void setup() {
size(300,400);
frameRate(5);
smooth();
}
void draw() {
if (back==null) {
drawO();
}
else {
image(back,155-bx/2,170-by/2);
}
noStroke();
translate(155,170);
rotate(rotti);
rotti+=0.03;
int i;
for (i=0;i<18;i++) {
rotate(TWO_PI/18);
quad(-1,-20,1,-20,3,-15,-3,-15);
}
}
void drawO() {
background(0xc1,0x1f,0x26);
pushMatrix();
translate(-30,0);
scale(0.5);
noStroke();
fill(0x03,0x03,0x03);
beginShape();
vertex(241.35557,339.97397);
vertex(247.84362,281.5815);
vertex(273.79583,229.67707);
vertex(345.16442,192.04637);
vertex(415.23539,168.68938);
vertex(472.33025,186.85592);
vertex(516.44901,234.86752);
vertex(538.50839,303.64088);
vertex(538.50839,367.22379);
vertex(524.23468,412.64017);
vertex(532.02034,412.64017);
vertex(534.61556,423.02105);
vertex(522.93706,447.67565);
vertex(516.44901,481.41353);
vertex(504.77052,504.77052);
vertex(495.68724,508.66335);
vertex(487.90158,504.77052);
vertex(473.62786,525.53229);
vertex(450.27087,539.806);
vertex(429.5091,569.65105);
vertex(404.8545,617.66264);
vertex(404.8545,625.4483);
vertex(400.96167,634.53157);
vertex(390.58079,644.91246);
vertex(355.5453,605.98414);
vertex(246.54601,515.1514);
vertex(242.65318,489.19919);
vertex(249.14123,435.99716);
vertex(223.18902,423.02105);
vertex(206.32008,384.09273);
vertex(216.70097,352.95008);
vertex(228.37946,339.97397);
vertex(241.35557,339.97397);
endShape();
fill(0xf8,0xf4,0xf2);
beginShape();
vertex(245.2484,515.1514);
vertex(238.76035,519.04423);
vertex(227.08185,538.50839);
vertex(266.01017,600.7937);
vertex(295.85521,657.88857);
vertex(328.29548,725.36432);
vertex(345.16442,769.48308);
vertex(368.52141,769.48308);
vertex(367.22379,740.93564);
vertex(372.41424,720.17387);
vertex(368.52141,709.79299);
vertex(336.08114,685.13839);
vertex(385.39034,646.21007);
vertex(399.66406,656.59095);
vertex(408.74733,678.65033);
vertex(408.74733,651.40051);
vertex(412.64017,629.34113);
vertex(410.04494,613.76981);
vertex(404.8545,620.25786);
vertex(406.15211,628.04352);
vertex(390.58079,644.91246);
vertex(360.73574,612.4722);
vertex(339.97397,594.30565);
vertex(295.85521,556.67494);
vertex(245.2484,515.1514);
endShape();
fill(0x6c,0x6a,0x6c);
beginShape();
vertex(442.48521,768.18546);
vertex(433.40193,740.93564);
vertex(420.42583,721.47148);
vertex(408.74733,677.35272);
vertex(398.36645,656.59095);
vertex(386.68795,647.50768);
vertex(336.08114,686.436);
vertex(368.52141,711.0906);
vertex(373.71185,722.76909);
vertex(367.22379,735.7452);
vertex(367.22379,769.48308);
vertex(442.48521,768.18546);
endShape();
fill(34,32,35);
beginShape();
vertex(228.37946,542.40122);
vertex(269.903,605.98414);
vertex(329.59309,726.66193);
vertex(345.16442,770.78069);
vertex(230.97468,768.18546);
vertex(197.23681,707.19777);
vertex(190.74876,670.86467);
vertex(198.53442,617.66264);
vertex(167.39177,574.84149);
vertex(169.98699,567.05582);
vertex(189.45115,559.27016);
vertex(208.9153,538.50839);
vertex(217.99858,532.02034);
vertex(228.37946,542.40122);
endShape();
fill(30,28,31);
beginShape();
vertex(88.23752,576.1391);
vertex(112.89212,570.94866);
vertex(168.68938,570.94866);
vertex(168.68938,578.73432);
vertex(199.83203,618.96025);
vertex(190.74876,676.05511);
vertex(197.23681,707.19777);
vertex(233.5699,772.0783);
vertex(86.939909,768.18546);
vertex(88.23752,576.1391);
endShape();
popMatrix();
ellipseMode(CENTER);
fill(0xe5,0x36,0x21);
ellipse(155,170,31,31);
fill(0xf3,0xf3,0xe6);
ellipse(155,170,25,25);
fill(0xe5,0x36,0x21);
ellipse(155,170,15,15);
back=createImage(bx,by,RGB);
loadPixels();
int i,j;
int offs=155-bx/2+(170-by/2)*300;
int offd=0;
for (i=0;i<by;i++) {
for (j=0;j<bx;j++) {
back.pixels[offd++]=pixels[offs++];
}
offs+=300-bx;
}
}
float rotti=0;
int bx=40;
int by=40;
void setup() {
size(300,400);
frameRate(5);
smooth();
}
void draw() {
if (back==null) {
drawO();
}
else {
image(back,155-bx/2,170-by/2);
}
noStroke();
translate(155,170);
rotate(rotti);
rotti+=0.03;
int i;
for (i=0;i<18;i++) {
rotate(TWO_PI/18);
quad(-1,-20,1,-20,3,-15,-3,-15);
}
}
void drawO() {
background(0xc1,0x1f,0x26);
pushMatrix();
translate(-30,0);
scale(0.5);
noStroke();
fill(0x03,0x03,0x03);
beginShape();
vertex(241.35557,339.97397);
vertex(247.84362,281.5815);
vertex(273.79583,229.67707);
vertex(345.16442,192.04637);
vertex(415.23539,168.68938);
vertex(472.33025,186.85592);
vertex(516.44901,234.86752);
vertex(538.50839,303.64088);
vertex(538.50839,367.22379);
vertex(524.23468,412.64017);
vertex(532.02034,412.64017);
vertex(534.61556,423.02105);
vertex(522.93706,447.67565);
vertex(516.44901,481.41353);
vertex(504.77052,504.77052);
vertex(495.68724,508.66335);
vertex(487.90158,504.77052);
vertex(473.62786,525.53229);
vertex(450.27087,539.806);
vertex(429.5091,569.65105);
vertex(404.8545,617.66264);
vertex(404.8545,625.4483);
vertex(400.96167,634.53157);
vertex(390.58079,644.91246);
vertex(355.5453,605.98414);
vertex(246.54601,515.1514);
vertex(242.65318,489.19919);
vertex(249.14123,435.99716);
vertex(223.18902,423.02105);
vertex(206.32008,384.09273);
vertex(216.70097,352.95008);
vertex(228.37946,339.97397);
vertex(241.35557,339.97397);
endShape();
fill(0xf8,0xf4,0xf2);
beginShape();
vertex(245.2484,515.1514);
vertex(238.76035,519.04423);
vertex(227.08185,538.50839);
vertex(266.01017,600.7937);
vertex(295.85521,657.88857);
vertex(328.29548,725.36432);
vertex(345.16442,769.48308);
vertex(368.52141,769.48308);
vertex(367.22379,740.93564);
vertex(372.41424,720.17387);
vertex(368.52141,709.79299);
vertex(336.08114,685.13839);
vertex(385.39034,646.21007);
vertex(399.66406,656.59095);
vertex(408.74733,678.65033);
vertex(408.74733,651.40051);
vertex(412.64017,629.34113);
vertex(410.04494,613.76981);
vertex(404.8545,620.25786);
vertex(406.15211,628.04352);
vertex(390.58079,644.91246);
vertex(360.73574,612.4722);
vertex(339.97397,594.30565);
vertex(295.85521,556.67494);
vertex(245.2484,515.1514);
endShape();
fill(0x6c,0x6a,0x6c);
beginShape();
vertex(442.48521,768.18546);
vertex(433.40193,740.93564);
vertex(420.42583,721.47148);
vertex(408.74733,677.35272);
vertex(398.36645,656.59095);
vertex(386.68795,647.50768);
vertex(336.08114,686.436);
vertex(368.52141,711.0906);
vertex(373.71185,722.76909);
vertex(367.22379,735.7452);
vertex(367.22379,769.48308);
vertex(442.48521,768.18546);
endShape();
fill(34,32,35);
beginShape();
vertex(228.37946,542.40122);
vertex(269.903,605.98414);
vertex(329.59309,726.66193);
vertex(345.16442,770.78069);
vertex(230.97468,768.18546);
vertex(197.23681,707.19777);
vertex(190.74876,670.86467);
vertex(198.53442,617.66264);
vertex(167.39177,574.84149);
vertex(169.98699,567.05582);
vertex(189.45115,559.27016);
vertex(208.9153,538.50839);
vertex(217.99858,532.02034);
vertex(228.37946,542.40122);
endShape();
fill(30,28,31);
beginShape();
vertex(88.23752,576.1391);
vertex(112.89212,570.94866);
vertex(168.68938,570.94866);
vertex(168.68938,578.73432);
vertex(199.83203,618.96025);
vertex(190.74876,676.05511);
vertex(197.23681,707.19777);
vertex(233.5699,772.0783);
vertex(86.939909,768.18546);
vertex(88.23752,576.1391);
endShape();
popMatrix();
ellipseMode(CENTER);
fill(0xe5,0x36,0x21);
ellipse(155,170,31,31);
fill(0xf3,0xf3,0xe6);
ellipse(155,170,25,25);
fill(0xe5,0x36,0x21);
ellipse(155,170,15,15);
back=createImage(bx,by,RGB);
loadPixels();
int i,j;
int offs=155-bx/2+(170-by/2)*300;
int offd=0;
for (i=0;i<by;i++) {
for (j=0;j<bx;j++) {
back.pixels[offd++]=pixels[offs++];
}
offs+=300-bx;
}
}
comments
loading...
Add a comment: