Skip to content

Instantly share code, notes, and snippets.

@JoeJoeMango
Created October 8, 2014 02:46
Show Gist options
  • Save JoeJoeMango/864ebd9d1293f55d7cb7 to your computer and use it in GitHub Desktop.
Save JoeJoeMango/864ebd9d1293f55d7cb7 to your computer and use it in GitHub Desktop.
ICM class change
class Orb {
//point of the orb
float pointAx = 244.09;
float pointAy = 244.09;
float pointBx = 400;
float pointBy = 179.51;
float pointCx = 555.91;
float pointCy = 244.09;
float pointDx = 620.49;
float pointDy = 400;
float pointEx = 555.91;
float pointEy = 555.91;
float pointFx = 400;
float pointFy = 620.49;
float pointGx = 244.09;
float pointGy = 555.91;
float pointHx = 179.51;
float pointHy = 400;
float pointIx = 244.09;
float pointIy = 244.09;
float pointJx = 400;
float pointJy = 179.51;
//float pointKx = 555.91;
float pointKx = 244.09;
float pointKy = 244.09;
PImage stage;
//constructor
Orb(){
}
void circle() {
fill(30, 200, 150);
fill(random(100, 150)*.05+map(cos(frameCount*0.05), -1, 1, -50, 50), random(100, 200)*0.05, map(cos(frameCount*0.03), -1, 1, -50, 50));
noStroke();
// curveTightness(10);
beginShape();
curveVertex(pointAx+map(cos(frameCount*0.01), -1, 1, -50, 50), pointAy*2+map(cos(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointBx+map(sin(frameCount*0.02), -1, 1, -50, 50), pointBy+map(cos(frameCount*0.02), -1, 1, -50, 50));
curveVertex(pointCx+map(cos(frameCount*0.01), -1, 1, -50, 50), pointCy+map(cos(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointDx+map(cos(frameCount*0.2), -1, 1, -50, 50), pointDy+map(cos(frameCount*0.2), -1, 1, -50, 50));
curveVertex(pointEx+map(sin(frameCount*0.01), -1, 1, -50, 50), pointEy+map(cos(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointFx+map(cos(frameCount*0.02), -1, 1, -50, 50), pointFy+map(cos(frameCount*0.02), -1, 1, -50, 50));
curveVertex(pointGx+map(sin(frameCount*0.01), -1, 1, -50, 50), pointGy+map(sin(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointHx+map(cos(frameCount*0.02), -1, 1, -50, 50), pointHy+map(cos(frameCount*0.02), -1, 1, -50, 50));
curveVertex(pointIx+map(sin(frameCount*0.01), -1, 1, -50, 50), pointIy+map(cos(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointJx+map(cos(frameCount*0.02), -1, 1, -50, 50), pointJy+map(cos(frameCount*0.02), -1, 1, -50, 50));
curveVertex(pointKx-map(sin(frameCount*0.01), -1, 1, -50, 50), pointKy+map(cos(frameCount*0.01), -1, 1, -50, 50));
curveVertex(pointAx+map(cos(frameCount*0.03), -1, 1, -50, 50), pointAy+map(cos(frameCount*0.03), -1, 1, -50, 50));
curveVertex(pointAx+map(cos(frameCount*0.03), -1, 1, -50, 50), pointAy*2+map(cos(frameCount*0.03), -1, 1, -50, 50));
endShape(CLOSE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment