curvedraw

view README.rst @ 16:7f795f7fecd6

readme and COPYING
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 20 Dec 2015 10:55:57 +0200
parents
children
line source
1 Curve Draw
2 ==========
4 Overview
5 --------
6 Curvedraw is a simple 2D curve drawing program. I've often found it useful to
7 draw curves for use in my graphics programs. They can be useful for procedural
8 modelling (extrusion or surfaces of revolution), for animation paths, etc.
10 License
11 -------
12 Copyright (C) 2015 John Tsiombikas <nuclear@member.fsf.org>
13 This program is free software. Feel free to use it, modify it and/or
14 redistribute it under the terms of the GNU General Public License version 3 or
15 (at your option) any later version published by the Free Software Foundation.
16 See COPYING for details.
18 Usage
19 -----
20 Mouse:
21 - Click to start adding points to a new curve, then finish it by right clicking.
22 - Click on a curve to select it.
23 - Right-click on a control point to remove it.
24 - Click with a curve selcted to continue adding points to it.
25 - Right-click in empty space to clear the selection.
27 Keys:
28 - Holding 's' while adding points snaps to grid.
29 - Holding SHIFT-'s' while adding points snaps to nearest existing point.
30 - Press ESC to cancel the currently created curve.
31 - Press 'q' to exit.
32 - Press '1' - '3' to change selected curve type (polyline, hermite, bspline).
33 - Press 'b' to show the selected curve's bounding box.
34 - Press 'n' to normalize the selcted curve to the unit square.
35 - Press 'e' to export the curves to a file called "test.curves" (TODO file dialog)
36 - Press 'l' to load curves from the "test.curves" file (TODO file dialog)
38 Viewport:
39 - Drag with the left or middle mouse button to pan.
40 - Drag up or down with the right mouse button to zoom.
42 Curves file format
43 ------------------
44 The files read and written by this program are simple text files. They start
45 with the word "GCURVES" in caps in the first line, followed by a series of curve
46 blocks of the form::
48 curve {
49 type <curve type, can be "hermite", "polyline", or "bspline">
50 cpcount <number of control points>
51 cp <x> <y> <z> <w>
52 ...
53 }
55 The control points are 4-vectors to allow for representing 3D rational
56 b-splines. Lower-dimensional curves should set 'w' to 1, and all other unused
57 coordinates to 0. Rational 2D b-splines are represented as 3D splines on the z=0
58 plane, so again 'w' acts as the weight.