Author Topic: 0.12.13 Released  (Read 8403 times)

B+

  • Guest
Re: 0.12.13 Released
« Reply #15 on: October 27, 2018, 07:58:04 PM »
The problem is in the nuklear code library for circle drawing with lines:

Code: [Select]
REM SmallBASIC 2018-10-27 B+

drawCircleWithLines 300, 200, 150
drawCrappyCircleWithLines 700, 200, 150
input "Try fill press enter...";enter
cls 
for r = 1 to 150 step .1
  drawCircleWithLines 300, 200, r
  drawCrappyCircleWithLines 700, 200, r
next
pause

sub drawCircleWithLines(x, y, r)
  'circumference = 2 * pi * r, now divide that into 1 pixel units n = 2 * pi * r
  n = 2 * pi * r
  for i = 1 to n step .5  ' step 1 or less
    if i = 1 then
      lx = x + r * cos(2 * pi * i / r)
      ly = y + r * sin(2 * pi * i / r)
    else
      cx = x + r * cos(2 * pi * i / r)
      cy = y + r * sin(2 * pi * i / r)
      line lx, ly, cx, cy
      lx = cx : ly = cy
    fi
  next
end

sub drawCrappyCircleWithLines(x, y, r)
  'circumference = 2 * pi * r, now divide that into 1 pixel units n = 2 * pi * r
  n = 2 * pi * r
  for i = 1 to n step 10 '<<<<  to draw crappy circle step by more than 1
    if i = 1 then
      lx = x + r * cos(2 * pi * i / r)
      ly = y + r * sin(2 * pi * i / r)
    else
      cx = x + r * cos(2 * pi * i / r)
      cy = y + r * sin(2 * pi * i / r)
      line lx, ly, cx, cy
      lx = cx : ly = cy
    fi
  next
end

« Last Edit: October 27, 2018, 08:00:43 PM by B+ »

Tomaaz

  • Guest
Re: 0.12.13 Released
« Reply #16 on: October 29, 2018, 06:27:25 PM »
The problem is in the nuklear code library for circle drawing with lines:

What else could it be, my dear Watson? Linux kernel? My monitor? My glasses? ;D

B+

  • Guest
Re: 0.12.13 Released
« Reply #17 on: October 30, 2018, 05:03:36 PM »
Sorry, just checking that SmalllBASIC hadn't started to screw up, whew! I would miss the excellent circle drawing it provides.

Tomaaz

  • Guest
Re: 0.12.13 Released
« Reply #18 on: October 30, 2018, 06:06:16 PM »
Come on. That was funny.   ;)

- There is something wrong with circle in Nuklear.
- I know what the problem is! Something is wrong with circle in Nuklear.

 ;D ;D ;D