Author Topic: 0.12.13 Released  (Read 955 times)

B+

  • Hero Member
  • *****
  • Posts: 764
    • View Profile
Re: 0.12.13 Released
« Reply #15 on: 27. October 2018, 21:58:04 »
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: 27. October 2018, 22:00:43 by B+ »

Tomaaz

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: 0.12.13 Released
« Reply #16 on: 29. October 2018, 19:27:25 »
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+

  • Hero Member
  • *****
  • Posts: 764
    • View Profile
Re: 0.12.13 Released
« Reply #17 on: 30. October 2018, 18:03:36 »
Sorry, just checking that SmalllBASIC hadn't started to screw up, whew! I would miss the excellent circle drawing it provides.

Tomaaz

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: 0.12.13 Released
« Reply #18 on: 30. October 2018, 19:06:16 »
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