Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var secPolygon = [[0,0], [0,0], [0,0], [0,0]];
- var x = 120, y = 120; //dc.getWidth() / 2;
- var bigRadius = x * 0.74;
- var smallRadius = x * 0.19;
- var handWidth = x * 0.006;
- var h = [coefX[clockTime.sec], coefY[clockTime.sec]];
- var normal = [h[1] * handWidth , -h[0] * handWidth];
- var s1 = [h[0] * bigRadius + x, h[1] * bigRadius + y];
- var s2 = [h[0] * smallRadius + x, h[1] * smallRadius + y];
- secPolygon[0] = [s1[0] + normal[0], s1[1] + normal[1]];
- secPolygon[1] = [s2[0] + normal[0], s2[1] + normal[1]];
- secPolygon[2] = [s2[0] - normal[0], s2[1] - normal[1]];
- secPolygon[3] = [s1[0] - normal[0], s1[1] - normal[1]];
- dc.fillPolygon(secPolygon);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement