Given three ordered points (red, green, blue) of a triangle, the orientation of the triangle is clockwise if a right turn happens from the first line (red to green) to the second line (green to blue). Similarly the orientation of the triangle is counterclockwise if a left turn happens from the first line (red to green) to the second line (green to blue).
Draw many random triangles and color triangle in yellow if the triangle is clockwise, color triangle in cyan if the triangle is counterclockwise.
What’s next?
Random Intersecting Lines with Python Turtle
Two Randomly Moving Intersecting Lines