Ask Your Question

Revision history [back]

In the following loop, you are drawing lines from circle center to arbitrary points and not to the edge of circle.

for(int o = 2; o < 800; o+=45){
for(int n = 2; n < 800; n +=45){
    cvLine(shape, cvPoint(z,a), cvPoint(o,n), CV_RGB(0,255,0),1,8);     
    }

The distance between points (z,a) and (o,n) is not q or b. Once you fix that, you should be good.