31
I saw on Discord today someone wanted Thick Circles, I call them Rings soon you will want thick Arcs too. We'll do ArcRings you will have both and they will work with transparent colors too.
Well here's all that, for raStart and raEnd, ra stands for Radian Angle (not degrees) Radian Angles are expressed in fractions of Pi eg Pi = 180 degrees and whole circle is 2*Pi so 1/10 of circle is 2*pi / 10 equivalent to 36 degrees.
Now I use Basic trig Sin(RadianAngle) and Cos(RadianAngle) that go around circle Clockwise as Radian Angle increases unlike Basic's Circle which goes opposite. So between the trig mention and Radian Angle mention I have probably lost most my audience ;-))
Anyway, it will be handy if you want a transparent color arc or ring and you understand what I am calling raStart and raEnd, I hope the rest is self explanatory:
Well here's all that, for raStart and raEnd, ra stands for Radian Angle (not degrees) Radian Angles are expressed in fractions of Pi eg Pi = 180 degrees and whole circle is 2*Pi so 1/10 of circle is 2*pi / 10 equivalent to 36 degrees.
Now I use Basic trig Sin(RadianAngle) and Cos(RadianAngle) that go around circle Clockwise as Radian Angle increases unlike Basic's Circle which goes opposite. So between the trig mention and Radian Angle mention I have probably lost most my audience ;-))
Anyway, it will be handy if you want a transparent color arc or ring and you understand what I am calling raStart and raEnd, I hope the rest is self explanatory:
Code: QB64: [Select]
- ' 2021-12-23 reviewed remove confusing comments and test code then rewrote again for Option _Explicit
- i = i + 1
- _Limit 10
- P = _Pi
- raS = raStart ' checking raStart and raEnd to behave as expected
- While raS >= Pi2
- raS = raS - Pi2
- raS = raS + Pi2
- raE = raEnd
- raE = raE + Pi2
- While raE >= Pi2
- raE = raE - Pi2
- 'angle of x, y to x0, y0
- Else 'raEnd < raStart, raEnd is falls before raStart clockwise so fill through 2 * PI