function drawCirclePart(center, radius, thickness, color, percent) {
var step = (Math.PI * 2) / 360;
var steps = step * percent
var prev_pos = [0, 0];
var prev_pos2 = [0, 0]
for(var rot = 0; rot <= steps; rot += step) {
if (prev_pos[0] == 0 && prev_pos[1] == 0) {
var pos_down = [center[0] + (radius - thickness) * Math.cos(rot), center[1] + (radius - thickness) * Math.sin(rot)]; // Down next point
var pos = [center[0] + radius * Math.cos(rot), center[1] + radius * Math.sin(rot)]; // Top next point
prev_pos = pos; // Get backup
prev_pos2 = pos_down // Get backup
}
else {
var pos_down = [center[0] + (radius - thickness) * Math.cos(rot), center[1] + (radius - thickness) * Math.sin(rot)]; // Down next point
var pos = [center[0] + radius * Math.cos(rot), center[1] + radius * Math.sin(rot)]; // Top next point
Render.Polygon([pos_down, prev_pos, pos], color); // Render first
Render.Polygon([prev_pos, pos_down, prev_pos2], color); // Render second
prev_pos = pos; // Get backup
prev_pos2 = pos_down // Get backup
}
}
}