euglena/src/angleGather.java

13 lines
611 B
Java
Raw Normal View History

2016-07-10 00:36:44 -07:00
void angleGather(float x, float y, float angle, float armLength) {
arduino.digitalWrite(right, arduino.HIGH);
noFill();
strokeWeight(20); // Controls thickness of blue border
stroke(color(0, 0, 127));
beginShape(); // Draws shape
vertex(convertXCoord(x + armLength*cos(angle*PI/360)), convertYCoord(y + armLength*sin(angle*PI/360)));
vertex(convertXCoord(x), convertYCoord(y));
vertex(convertXCoord(x + armLength*cos(angle*PI/360)), convertYCoord(y - armLength*sin(angle*PI/360)));
endShape();
}