Skip to main content

JointedLine - 1.0

A simple exmaple how draw and modify jointed lines.


John Eriksson
(wmjoers)
I needed an easy way to draw and modify jointed lines in one of my projects. I wrote this small proof of concept just to test the algorithm.

The goal was to make it easy to add, insert and move joints.

Hint: Most code is just basic stuff. The interesting part is when you left click on a line to insert a new joint. I use the logic from the LinePointDistance project.

Example usage
  • Left click on an empty space to append a new joint.
  • Left click on a line to insert a new joint on that line.
  • Hold down left mouse button to drag joints.
  • Right click on a joint to delete it.
  • Press SPACE to toggle visual joints.

Changes

Links

Home Page
http://arainyday.se/projects/python/JointedLine/
Source
http://arainyday.se/projects/python/JointedLine/JointedLine.py

Releases

JointedLine 1.0 — 4 Jan, 2007

Pygame.org account Comments