Create a circle.
The operator circle generates one or more circles described by the center and Radius. If several circles shall be generated the coordinates must be passed in the form of tuples. The coordinate system runs from (0,0) (upper left corner) to (Width-1,Height-1). See in this connection get_system and init_horus. If an even-numbered value (1,2,3..) is given for the radius the result is an even-numbered diameter and thus an asymmetrical circle. In case of an odd-numbered diameter (radius = 1.5,2.5,3.5...) a symmetrical circle is obtained. If the circle extends beyond the image edge it is clipped to the current image format according to the falue of the system flag 'clip_region' (set_system).
Circle (output_object) |
region(-array) -> object |
Generated circle. |
Row (input_control) |
circle.center.y(-array) -> real / integer |
Line index of center. | |
Default value: 200.0 | |
Suggested values: 0.0, 10.0, 50.0, 100.0, 200.0, 300.0 | |
Range of values: 1.0 <= Row <= 1024.0 (lin) | |
Minimum increment: 1.0 | |
Recommended increment: 10.0 |
Column (input_control) |
circle.center.x(-array) -> real / integer |
Column index of center. | |
Default value: 200.0 | |
Suggested values: 0.0, 10.0, 50.0, 100.0, 200.0, 300.0 | |
Range of values: 1.0 <= Column <= 1024.0 (lin) | |
Minimum increment: 1.0 | |
Recommended increment: 10.0 |
Radius (input_control) |
circle.radius(-array) -> real / integer |
Radius of circle. | |
Default value: 100.5 | |
Suggested values: 1.0, 1.5, 2.0, 2.5, 3, 3.5, 4, 4.5, 5.5, 6.5, 7.5, 9.5, 11.5, 15.5, 20.5, 25.5, 31.5, 50.5 | |
Range of values: 1.0 <= Radius <= 1024.0 (lin) | |
Minimum increment: 1.0 | |
Recommended increment: 10.0 | |
Restriction: Radius > 0.0 |
open_window(::0,0,-1,-1,'root','visible','':) > read_image(:Image:'meer':) > circle(:Circle:300.0,200.0,150.5:) > reduce_domain(Image,Circle:Mask::) > disp_color(Mask:::).
Runtime complexity: O(Radius * 2) Storage complexity (byte): O(Radius * 8)
If the parameter values are correct, the operator circle returns the value TRUE. Otherwise an exception is raised. The clipping of the current image format is set via the operator set_system(::'clip_region',<true/false>:). If an empty region is created by clipping (the circle is completely outside of the image format) the operator set_system(::'store_empty_region',<true/false>:) determines whether the empty region is put out.
ellipse, store_filled_polygon, store_coord, store_chord, draw_circle
disp_circle, set_shape, smallest_circle, reduce_domain