i managed to make ur codes work in my applet :)
check the post above :)
what does 2 lines do ? i completely cannot follow
c=cta2-(i-1)*dc; // c = end of angle segment - (i-1)*a small segment ?
if(c<-pi)c+=2*pi; // if c less than - Math.PI then c add one until 2*PI ?