geodesic.geometry.
Curve
(start_point, end_point, number_of_nodes)[source]¶The purpose of this object is to provide a Curve object with a custom iterator to perform the Birkhoff algorithm.
start_point
¶numpy.array
A NumPy array describing the first point in the curve.
end_point
¶numpy.array
A NumPy array describing the last point in the curve.
number_of_nodes
¶int
The total number of nodes that the curve is to consist of, including the start and end points.
tangent
¶numpy.array
The tangent of the straight line segment joining the start_point to the end_point.
points
¶numpy.array
An NumPy array containing all the points of the curve.
default_initial_state
¶numpy.array
A NumPy array consisting of flags that indicate which nodes are movable initially.
movement
¶float
A variable which records the average movement of the nodes.
nodes_moved
¶numpy.array
A binary NumPy array indicating whether a node has been moved. Used to determine when all the nodes in the curve have been moved.
node_movable
¶numpy.array
A binary NumPy array indicating whether a node is movable.
number_of_distinct_nodes_moved
¶int
A counter recording the total number of nodes that have moved.
__init__
(start_point, end_point, number_of_nodes)[source]¶The constructor for the Curve class.
Parameters: 


all_nodes_moved
()[source]¶This method determines whether every node in the global curve has been tested for length reduction.
Returns:  True if all of the nodes have been tested, False otherwise. 

Return type:  bool 
get_points
()[source]¶Accessor method for the points attribute.
Returns:  An array containing all of the points of the curve. 

Return type:  numpy.array 
next
()[source]¶Returns:  The node number of the next movable node. If no such node exists then it returns None. 

Return type:  int 
set_node_movable
()[source]¶Resets all of the flags in the curve to indicate that the current iteration of the Birkhoff algorithm is over.
set_node_position
(node_number, new_position)[source]¶Update the position of the node at node_number to new_position. This processes the logic for releasing neighbouring nodes for further computation.
Parameters: 

