Sometimes, you only want to draw circles, either in totality or
in parts; to do so, you need arc()
By experimenting with the above code, you might have figured out
that the arguments
of the arc
functions are as follows:
This method takes five parameters: x
and y
are the coordinates of the circle's center.
radius
is self explanatory.
The start_angle
and end_angle
parameters define the
start and end points of the arc in radians.
The starting and closing angle are measured from the x axis.
The anticlockwise
parameter is a Boolean value which
when true draws the arc counterclockwise, otherwise in a clockwise direction.
[The following table has been adapted from Wikipedia.]
|
|
|
Keep your personal notes here. These notes are stored by your browser on your own computer, and will be available from any page on this site. You can choose to use html syntax for formatting.