CircleEvent¶
-
class
foronoi.events.circle_event.
CircleEvent
(center: foronoi.graph.coordinate.Coordinate, radius: decimal.Decimal, arc_node: foronoi.nodes.leaf_node.LeafNode, point_triple=None, arc_triple=None)¶ A circle event.
- Parameters
center (Coordinate) – The center coordinate of the circle (where the new vertex will appear)
radius (Decimal) – The radius of the circle
arc_node (LeafNode) – Pointer to the node in the beach line tree that holds the arc that will disappear
point_triple ((Point, Point, Point)) – The triple of points that caused the event
arc_triple ((Arc, Arc, Arc)) – The triple of arcs related to the points
-
static
create_circle
(a, b, c)¶ Create a circle from three coordinates.
- Parameters
a (Coordinate) –
b (Coordinate) –
c (Coordinate) –
- Returns
x (Decimal) – The x-coordinate of the center of the circle
y (Decimal) – The y-coordinate of the center of the circle
radius (Decimal) – The radius of the circle
-
static
create_circle_event
(left_node: foronoi.nodes.leaf_node.LeafNode, middle_node: foronoi.nodes.leaf_node.LeafNode, right_node: foronoi.nodes.leaf_node.LeafNode, sweep_line) → foronoi.events.circle_event.CircleEvent¶ Checks if the breakpoints converge, and inserts circle event if required.
- Parameters
left_node (LeafNode) – The node that represents the arc on the left
middle_node (LeafNode) – The node that represents the arc in the middle
right_node (LeafNode) – The node that represents the arc on the right
sweep_line (Decimal) – The y-coordinate of the sweep line
- Returns
circleEvent – The circle event or None if no circle event needs to be inserted
- Return type
CircleEvent or None
-
remove
()¶ Mark this circle event as a false alarm.
- Returns
self
- Return type
-
property
xd
¶ The x-coordinate (in Decimal format) of the center of the circle, which functions as the secondary priority of this event.
- Returns
x
- Return type
Decimal
-
property
yd
¶ The y-coordinate (in Decimal format) of the bottom of the circle, which functions as the primary priority of this event.
- Returns
y
- Return type
Decimal