Skip to content
Kyuchumimo edited this page Mar 18, 2022 · 8 revisions

circb

circb x y radius color

Parameters

  • x, y : the coordinates of the circle's center
  • radius : the radius of the circle in pixels
  • color: the index of the desired color in the current palette

Description

Draws the circumference of a circle with its center at x, y using the radius and color requested.

Example

#####################################

import math
TIC["PALETTE"] = ((0x14,0x0c,0x1c), (0x44,0x24,0x34), (0x30,0x34,0x6d), (0x4e,0x4a,0x4e), (0x85,0x4c,0x30), (0x34,0x65,0x24), (0xd0,0x46,0x48), (0x75,0x71,0x61), (0x59,0x7d,0xce), (0xd2,0x7d,0x2c), (0x85,0x95,0xa1), (0x6d,0xaa,0x2c), (0xd2,0xaa,0x99), (0x6d,0xc2,0xca), (0xda,0xd4,0x5e), (0xde,0xee,0xd6)) #DB16
# title:  circb demo
# author: Filippo, edited by Kyuchumimo
# desc:   circb wiki demo
# script: python
# pal: arne16

a=0
space=10
while True:
    cls()
    for i in range(0,201,space):
        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)
    a=a+math.pi/240

#####################################

Clone this wiki locally