Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SUB that draws boxes with rounded corners.
#11
Similar program is written with zero much shorter

Code: (Select All)
Screen 12: Randomize Timer: pi = 3.1416 ' boxes.bas

For j = 1 To 1978 ' Danilin
    xp = Int(Rnd * 600): yp = Int(Rnd * 400)
    xb = Int(Rnd * 300) + 20: yb = Int(Rnd * 200) + 20
    c = Int(Rnd * 16) + 1: r = Int(Rnd * 36) + 12

    For i = 0 To r Step .3
        Circle (xp, yp), i, 7 ', pi / 2, pi
        Circle (xp + xb, yp), i, 8 ', 0, pi / 2
        Circle (xp, yp + yb), i, 9 ', pi, 3 * pi / 2
        Circle (xp + xb, yp + yb), i, 10 ', 3 * pi / 2, 0
    _Delay .0022: Next

    Line (xp, yp)-(xp + xb, yp + yb), c, BF

    Line (xp, yp)-(xp - r, yp + yb), 1, BF
    Line (xp, yp)-(xp + xb, yp - r), 6, BF

    Line (xp + xb, yp)-(xp + xb + r, yp + yb), 7, BF
    Line (xp, yp + yb)-(xp + xb, yp + yb + r), 2, BF
    Print: _Delay .1
Next
[Image: boxes.png]

Plus all complete automation of labyrinth
https://qb64phoenix.com/forum/showthread...8#pid28378
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic

Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Reply


Messages In This Thread
RE: SUB that draws boxes with rounded corners. - by DANILIN - 09-14-2024, 08:46 PM



Users browsing this thread: 11 Guest(s)