pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
JointedLine

JointedLine - 1.0

John Eriksson (wmjoers)

Tags:

Description

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.

Links

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

Screenshot


click to view original size

Releases

JointedLine - 1.0 - Jan 4, 2007

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

No user comments have been submitted.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Feb 7, 2016

Feb 4, 2016

Jan 30, 2016

Jan 24, 2016

Jan 23, 2016

Jan 18, 2016

Jan 5, 2016

Dec 27, 2015

Dec 12, 2015

Dec 11, 2015

Dec 7, 2015

Nov 17, 2015

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)