Improvement in fillCircle: by reducing the number of fill lines in half, the hatching showed visible gaps between lines. This new method ensures a fuller circle. Tested and renders more closely match plotted drawings.
This commit is contained in:
parent
c5f7d7b4e6
commit
f7b4d41715
|
@ -1145,9 +1145,9 @@ ArrayList<float[]> fillCircle (float x, float y, float d, float angle, float lin
|
||||||
float testY = 0;
|
float testY = 0;
|
||||||
float[] intersect;
|
float[] intersect;
|
||||||
|
|
||||||
for (int i = -floor(lines / 2); i < floor(lines / 2); i++) {
|
for (int i = -lines; i < lines; i++) {
|
||||||
perpX = x + ((line * (i + 0.5)) * cos(perpRadian));
|
perpX = x + ( ( (line / 2) * (i + 0.5) ) * cos(perpRadian));
|
||||||
perpY = y + ((line * (i + 0.5)) * sin(perpRadian));
|
perpY = y + ( ( (line / 2) * (i + 0.5) ) * sin(perpRadian));
|
||||||
testX = perpX + (d * cos(radian));
|
testX = perpX + (d * cos(radian));
|
||||||
testY = perpY + (d * sin(radian));
|
testY = perpY + (d * sin(radian));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue