Skip to content

kedean/Bezier-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-----------
Kevin Dean  
Copyright 2013  
-----------  
  
Python version of my Bezier demo. Keyboard and mouse controls:  
  
left mouse click - add a control point, select an existing point, drag to move a point.
shift + left click - select more control points, drag to move them.
ctrl + left click - start a new curve with a control point at the click location.
right mouse click - remove the closest point within n pixels, hardcoded to 5 currently.
a - animate the calculations over 1 second for the selected (most recent) curve. Button exists.
ctrl + a - animate all curves simulaneously.
p - pause or resume animation  
s - perform an animation step, can be done without starting animation  
shift+s - reverse an animation step  
c - clear the control points. Button exists.
r - remove the selected point
shift+r - remove the last added point  
d - toggle debug mode    
] - zoom in
[ - zoom out
  
----------  
Requirements  
----------  
  
Runs and tested on Python 2.7, requires PyGTK to run.

----------
Building Releases
----------

Currently there is no reliable release method. Pyinstaller fails to include the correct glib libraries, currently looking into other options.

----------
Implementation Details
----------

The usage of static_calc_line_layer is now somewhat of a relic, it's only used for the animation structure. Actual regeneration has been switched over to using a more standard interpolate() function that uses binomial coefficient multiplication to calculate the curve. In tests comparing the two, I found that the interpolate method is 3 to 4 times as fast, even with 1000 points of calculation.

----------
Todo
----------

- detail slider instead of buttons
- add interfaces for multiple curve capabilities (already exist through ctrl modifier)
- add switching between curves

----------
Future
----------

- turn it into a module, maybe multiple options for drawing API
- possible 3d mode with rotation
- ability to save designs and extract the coordinates of points
- ability to have multiple curves
- antialiased lines
- curve guessing
- progessive curve drawing, using async map-reduce

About

A program for creating and animating Bezier curves.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages