circular_sector
(
radius
,
angle
,
color
)
Creates a circular sector belonging to a circle of the given radius, filled with a color.
A circular sector is a portion of a circle enclosed between two radii and an arc. Considering a circle as a clock, the first radius is supposed to “point” towards 3 o’clock. The angle determines the position of the second radius, computed starting from the first one in counterclockwise direction. An angle of 360 degrees corresponds to a full circle.
The pinning position is at the center of the circle from which the circular sector is taken.
radius
radius of the circle from which the circular sector is taken
angle
central angle, in degrees
color
the color to be used to fill the circular sector
show_graphic(circular_sector(100, 30, blue))
show_graphic(circular_sector(100, 120, blue))
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version 2123d16 (Mon, 30 Jun 2025 09:03:43 GMT)