@@ -0,0 +1,1504 @@
+from math import atan2, cos, sin, pi%0A%0Aclass Node(object):%0A    %22%22%22A node.%0A%0A    Attributes:%0A        pos (tupel): The position of the node. (x, y)%0A    %22%22%22%0A    def __init__(self, pos):%0A        self.pos = pos%0A%0A    def make_new_node(self, distance, angle):%0A        %22%22%22Make a new node from an existing one.%0A%0A        This method creates a new node with a distance and angle given.%0A        The position of the new node is calculated with:%0A        x2 = cos(-angle)*distance+x1%0A        y2 = sin(-angle)*distance+y1%0A%0A        Args:%0A            distance (float): The distance of the original node to the new node.%0A            angle (rad): The angle between the old and new node, relative to the horizont.%0A%0A        Returns:%0A            object: The node with calculated poistion.%0A        %22%22%22%0A        return Node((cos(-angle)*distance+self.pos%5B0%5D,%0A                     sin(-angle)*distance+self.pos%5B1%5D))%0A%0A    def get_node_angle(self, node):%0A        %22%22%22Get the angle beetween 2 nodes relative to the horizont%0A%0A        Returns:%0A            rad: The angle%0A        %22%22%22%0A        return atan2(self.pos%5B0%5D-node.pos%5B0%5D, self.pos%5B1%5D-node.pos%5B1%5D) - pi / 2%0A%0A    def get_tuple(self):%0A        %22%22%22Get the position of the node as tuple.%0A%0A        Returns:%0A            tupel: (x, y)%0A        %22%22%22%0A        return self.pos%0A%0A    def move(self, delta):%0A        %22%22%22Move the node.%0A%0A        Args:%0A            delta (tupel): A tupel, holding the adjustment of the position.%0A        %22%22%22%0A        self.pos = (self.pos%5B0%5D+delta%5B0%5D, self.pos%5B1%5D+delta%5B1%5D)

move Node from core to utils