|
to draw a circle you can use the sin and cos functions
here is a sample code. this may not be correct TI basic, but it is understandable, an d can be ported to basic.
for t=start_angle to end_angle step precision
plot center_x+radius_1*cos(t), center_y+radius_2*sin(t)
next
0 for start_angle and end_angle is on left and the it turns anticlockwise (a whole turn is 360 degres or 2*3.141592756 radians)
percision decides the step between each points. you must find a little value, so there are no blank spaces between points. if value is too small, it will work, but several plots will be drawn on the same pixel, which means a loss of time.
center_x and center_y are the center's coordinates
radius_1 and radius_2 are horizontal and vertical radius (if equals, draw a circle, if not, an elipse)
plot function draws a point it may also be named point or pixelon or draw or something like this.
well, that's all i guess. mail me if you want to know something else
bye
|