Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. double theta = 2 * 3.1415926 / 100;
  2. double c = Math.cos(theta);
  3. double s = Math.sin(theta);
  4. double t;
  5.  
  6. double x = ((ArcTo) element).getRadius();//we start at angle = 0
  7. double y = 0;
  8.  
  9. for(int ii = 0; ii < 100; ii++) {
  10. coordinates.add(new Coordinate(x + element.getCenterPoint().getX(), y + element.getCenterPoint().getY()));//output vertex
  11.  
  12. //apply the rotation matrix
  13. t = x;
  14. x = c * x - s * y;
  15. y = s * t + c * y;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement