Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Draw circles
#6
(06-16-2022, 07:03 AM)triggered Wrote: This is an incredibly odd way to draw circles:

Sub darc (xx, yy, r, klr, arc1, arc2)
    'draws an arc, will draw an unfilled circle if the arc goes from 0 to 360
    PSet (xx, yy), klr
    Draw "c" + Str$(klr)
    For d = arc1 To arc2 Step 1
        Draw "ta " + Str$(d) + " br" + Str$(r - 1) + "r  bl" + Str$(r)
    Next d
End Sub

It took me forever to figure out how to make circles and arcs thicker, for instance:

Draw "ta " + Str$(d) + " br" + Str$(r - 3) + "rrr  bl" + Str$(r)

produces thicker arcs. This didn't solve the leaking problem, however.



Drawing that arc with a thicker line: (I also cleared up that do at the center of the circle the arc is drawn from.)
Code: (Select All)
Sub dfarc (xx, yy, r, klr, arc1, arc2, t)
    'draws an arc with thickness defined as t, will draw an unfilled circle if the arc goes from 0 to 360
    tk = Point(xx, yy)
    PSet (xx, yy), tk
    Draw "c" + Str$(klr)
    For d = arc1 To arc2 Step 1
        Draw "ta " + Str$(d) + " br" + Str$(r - t) + "r" + Str$(t) + " bl" + Str$(r)
    Next d
End Sub

 
Code: (Select All)
Sub darc (xx, yy, r, klr, arc1, arc2)
    'draws an arc, will draw an unfilled circle if the arc goes from 0 to 360
    tk = Point(xx, yy)
    PSet (xx, yy), tk
    Draw "c" + Str$(klr)
    For d = arc1 To arc2 Step 1
        Draw "ta " + Str$(d) + " br" + Str$(r - 1) + "r  bl" + Str$(r)
    Next d
End Sub
Reply


Messages In This Thread
Draw circles - by James D Jarvis - 06-13-2022, 06:45 PM
RE: Draw circles - by DANILIN - 06-13-2022, 10:38 PM
RE: Draw circles - by James D Jarvis - 06-13-2022, 11:03 PM
RE: Draw circles - by triggered - 06-16-2022, 07:03 AM
RE: Draw circles - by James D Jarvis - 06-16-2022, 12:09 PM
RE: Draw circles - by James D Jarvis - 06-16-2022, 11:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Draw Worms Study bplus 15 884 01-01-2026, 08:23 PM
Last Post: bplus
  Another way to draw rounded rectangles James D Jarvis 4 1,342 10-09-2024, 07:11 PM
Last Post: James D Jarvis
  Ball Sub - draws several kind of filled, textured balls (circles) Dav 15 3,489 08-23-2023, 09:31 PM
Last Post: Dav
  Draw that Circle James D Jarvis 17 3,315 08-28-2022, 06:29 AM
Last Post: justsomeguy
  Overlapping Circles SierraKen 20 3,701 07-08-2022, 05:15 PM
Last Post: SierraKen

Forum Jump:


Users browsing this thread: