Curve functions
Posted: Fri Aug 07, 2015 4:15 pm
Based on the Bezier3-function posted by Henko, I have made a 'library' of "curve functions" by which bezier-curves can be designed and plot.
In order to compact the code I have used complex numbers for the coordinates. It made the code a lot simpler and indeed more compact. An x,y coordinate is now handled as x+y*1i.
I added some gain to the handles so that the top of the curve can reach the length of the handles. Otherwise the 'handling'-area should be larger then the drawing area.
Touch-info is handled such that the point which is moved can be moved close to or on other points.
The file "curve functions" contains the functions with info on usage
The file "Curve functions demo" is a test and demo-program.
The file "- Read Me" gives some basic information.
The files are available on Dropbox at:
https://www.dropbox.com/sh/8gk14ixlg5x4 ... rBWAa?dl=0.
The following screenshot is a reduced version from iPad The following is a screenshot from ipad in which the display is tested on iPhone-size.
In order to compact the code I have used complex numbers for the coordinates. It made the code a lot simpler and indeed more compact. An x,y coordinate is now handled as x+y*1i.
I added some gain to the handles so that the top of the curve can reach the length of the handles. Otherwise the 'handling'-area should be larger then the drawing area.
Touch-info is handled such that the point which is moved can be moved close to or on other points.
The file "curve functions" contains the functions with info on usage
The file "Curve functions demo" is a test and demo-program.
The file "- Read Me" gives some basic information.
The files are available on Dropbox at:
https://www.dropbox.com/sh/8gk14ixlg5x4 ... rBWAa?dl=0.
The following screenshot is a reduced version from iPad The following is a screenshot from ipad in which the display is tested on iPhone-size.