Skip to content
Property Value
Hex Value $A5
Categories
Localizations
  • FR: Cercle(

Circle(

Overview

Draws a circle with center (X,Y) and radius with specified Color#: 10 - 24 or color name pasted from [vars] COLOR. linestyle#: 1-2.

Availability: Token available everywhere.

Syntax

Circle(X,Y,radius[,color#,linestyle#])

Arguments

NameTypeOptional
X
Y
radius
color#colorNumYes
linestyle#integerYes

Location

2nd, draw, DRAW, 9:Circle(


Description

Circle(X,Y,r) will draw a circle at (X,Y) with radius r. X and Y will be affected by the window settings. The radius will also be affected by the window settings.

:Circle(5,5,5)

Advanced Uses

The radius of a circle is affected by the window settings. This means that if the x- and y-increment is two, the radius will be two pixels. However, there is another way to take advantage of this to draw ellipses. If the x- and y-increment are different, then the shape will not be a circle. For instance, with Xmin=0, Xmax=20, Ymin=0, and Ymax=31, Circle(10,10,2) will draw an ellipse, where the width is greater than the height.

Optimization

If a complex list such as {𝑖} is passed to Circle( as the fourth argument, the "fast circle" routine is used instead, which uses the symmetries of the circle to only do 1/8 of the trig calculations. For example:

:Circle(0,0,5
can be
:Circle(0,0,5,{i

Any list of complex numbers will work as the fourth argument in the same way, but there's no benefit to using any other list.

Note: The "fast circle" routine is not available on the TI-84+CSE or TI-84+CE calculators.

Command Timings

The ordinary Circle( is extremely slow. The fast circle trick discussed above cuts the time down to only about 30% of the "slow Circle(" time! While still not instant, this is faster than any replacement routine that can be written in TI-Basic.

For small radii, replace Circle( with Pt-On( instead.


Source: parts of this page were written by the following TI|BD contributors: 15274, burr, CloudVariable, DarkerLine, GoVegan, jonbush, Myles_Zadok, Xphoenix, Zaphod Beeblebrox.

History

Calculator OS Version Description
TI-82 1.0 Added

Last update: September 30, 2023 15:38:51
Created: February 23, 2023 23:15:01
Authors: Adrien Bertrand