Skip to content
Martin Gergov edited this page Dec 8, 2018 · 4 revisions

circb

circb x y radius color

Parameters:

  • x : the x coordinate of the circumference center
  • y : the y coordinate of the circumference center
  • r : the radius in pixel of the circumference
  • color: the index of the desired color in the current palette

Description:

It draws a circumference with center x and y of the radius requested.
It uses the bresenham algorithm.

Example

Example

-- title:  circb demo
-- author: Filippo
-- desc:   circb wiki demo
-- script: lua
-- pal: arne16

a=0
space=10
function TIC()
 cls()
 for i=0,200,space do
  circb(120+80*math.sin(a),
        68+40*math.cos(a),
        i+time()/40%space,
        8)
  circb(120+80*math.sin(a/2),
        68+40*math.cos(a/2),
        i+time()/40%space,
        8) end
 a=a+math.pi/240
end
You can’t perform that action at this time.