sketchkit.ordering.Fu package

Submodules

sketchkit.ordering.Fu.compute_cost module

sketchkit.ordering.Fu.compute_cost.compute_T_junctions(txy1, txy2)[source]
sketchkit.ordering.Fu.compute_cost.compute_thetas(txy1, txy2, is_begin1, is_begin2)[source]
sketchkit.ordering.Fu.compute_cost.cost_individual(txy)[source]
sketchkit.ordering.Fu.compute_cost.cost_transition(txy1, txy2)[source]
sketchkit.ordering.Fu.compute_cost.curvatures(txy)[source]
sketchkit.ordering.Fu.compute_cost.dist_closest_points(txy1, txy2)[source]
sketchkit.ordering.Fu.compute_cost.line_segments_intersect(p1, p2, q1, q2)[source]
sketchkit.ordering.Fu.compute_cost.on_segment(p1, p2, p3)[source]
sketchkit.ordering.Fu.compute_cost.orientation(p1, p2, p3)[source]
sketchkit.ordering.Fu.compute_cost.process_end_points(txy1, txy2)[source]
sketchkit.ordering.Fu.compute_cost.remove_same_xy(txy)[source]
sketchkit.ordering.Fu.compute_cost.stroke_length(txy)[source]

sketchkit.ordering.Fu.direction module

sketchkit.ordering.Fu.direction.determine_direction(prev: Vertex, start: Vertex, end: Vertex) bool[source]

Determine the direction of the line segment from prev to end. :param prev: The previous point. :type prev: Point :param start: The start point of the stroke. :type start: Point :param end: The end point of the stroke. :type end: Point

Returns:

True if the direction is start to end, False otherwise.

Return type:

bool

sketchkit.ordering.Fu.tsp_bnb module

class sketchkit.ordering.Fu.tsp_bnb.Node(trace, curr, weight_unary, weight_binary, n)[source]

Bases: object

lower_bound()[source]

Module contents

class sketchkit.ordering.Fu.AnimatedDrawer(max_k: int = 4, w: float = 0.1111111, canvas_size: int = 800, canvas_color=(1, 1, 1), width: int = 4)[source]

Bases: Orderer

_abc_impl = <_abc._abc_data object>
_animated_drawing(sketch: Sketch) List[int][source]

Create an animated drawing from a static sketch.

Parameters:

sketch (Sketch) – The static sketch to animate.

Returns:

A list of path indices for the animated sketch.

Return type:

List[int]

run(sketch: Sketch) Sketch[source]
sketchkit.ordering.Fu.get_cost_bi(cost_bi, i, j)[source]