curvedraw

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