class Pentagram{ //constructor Pentagram(){ color mcolor; } void render(int _x, int _y, float _scale){ // points for a pentagram float c1 = (cos((2*PI)/5))*_scale; float c2 = (cos(PI/5))*_scale; float s1 = (sin((2*PI)/5))*_scale; float s2 = (sin((4*PI)/5))*_scale; push(); //push out of current grid system translate(_scale,_scale); beginShape(POLYGON); vertex(s1+_x, c1+_y); vertex(s2+_x, -c2+_y); vertex(-s2+_x, -c2+_y); vertex(-s1+_x, c1+_y); vertex(0+_x, _scale+_y); endShape(); pop(); // return } }