Hello! It is necessary to build a circle from the points (filled), each point will have its own value and because of this its shade of color, as a result there should be a certain drawing in the circle. Now I am primitive, from the center around the corner of the tilt, and the drawing with JFreeChar, it turns out there are few points (acc. Malaya drawing accuracy) and degrees need to score into the code. The question arose, maybe someone knows how easier and more efficiently do? Something like matrix points fill

## Answer 1, Authority 100%

For drawing lines and circles use Bonezenham algorithm .

When working the algorithm you will get all the circumference points in the first quadrant. Reflecting them with respect to the vertical axis, you can fill out the upper semi-friendly, such as solid color. If not solid color, but the pattern, you need to take the coordinate of each point and convert it into color.

Example.

Breasenham algorithm builds a circle around the coordinate center *(0, 0) *. Having received the following coordinate in the next step *(x _{i }, y _{i }) *, we can spend lines from

*(- X*to

_{I }, y_{i })*(x*and from

_{i }, y_{i })*(- x*to

_{i },y_{i })*(x*it will give a filled circle.

_{i },y_{i })for pattern when drawing a line from *(- x _{i }, y _{i }) *to

*(x*We must take each separate point for

_{i }, Y_{I })*x*from

_{j }*-x*to

_{i }*x*and calculate its color according to your formula.

_{i }*c = f (x _{j }, y _{i }) *