Function Editor Utility
Quick Contents
Overview
Funcedit is a utility for editing spline functions in 2D space. The spline functions are constrained to a range of zero to one and consist of four control points by default.
Funcedit Execution
The Funcedit program is invoked as:
> funcedit [filename]
Menu, Display and Manipulation
A window is displayed as in Figure 1, showing
the function, its control points. If the filename arguemnt specifies a
a valid function file, the file will be loaded. Otherwise, a default function of
four control points, along the x-axis in the range of zero to one, will be created.
Figure 1 - A funcedit screen
Manipulating the Function
- Moving control points - The shape of the function is manipulated by moving
control points about by dragging them with the left mouse button. The first and last
control points are contrained to the limits of the range
- Adding control points - Control points can be added by clicking the middle
mouse button at the desired placement location. Clicking the left and right buttons
together can also be used.
- Deleting control points - A control point can be deleted by clicking on it
with the middle mouse button. Clicking the left and right buttons together can also
be used. Neither the first nor last control point of the function can be deleted.
Also, the function si constrained to have a minimum of four control points at any given
time.
Manipulating the View
- Zooming - Zooming the view is done by dragging the view with the left mouse
button while holding either the Alt or Ctrl button.
- Panning - Panning the view is done by dragging the view with the left mouse
button while holding the Shift button.
The Popup Menu
The Funcedit popup menu is controlled using the right mouse button. The menu contains the following items:
- Reload - This will reload the function from file. Any changes since the
last save will be lost when this is done.
- Save - Save the function to file specified when the program was invioked.
If there was no filename specified, the user will be prompt for one.
- Save As - Prompts the user for a filename and saves the funtion to that
file.
- View Points - Toggles whether the control points are visible. This is
on by default.
- View Segments - Toggles whether the line segments connecting control points
are visible. This is off by default.
- View Curve - Toggles whether the function curve visible. This is
on by default.
- View Limits - Toggles whether the range constraining the functions is visible.
This is on by default.
- Reload Colours - Reloads the colours from the configuration file.
- Exit - Exits the utility. If there was any changes since the last save, the
user will be prompted to save
- Help And About - Opens that Help And About Dialog. A short in program reference
can be found here.
Configuration
The colours used in funcedit can be configured be editing the configuration file in VLAB. In the VLAB conguration directory ($VLABCONFIGDIR), there is a file called 'funcedit' that may contain a line entry for each configurable colour. Each entry needs three values for red, green and blue colour components, scaled from 0.0 to 1.0.
List of Configurable Fields
- background
- points
- segments
- curve
- grid
- xaxis
- yaxis
- labels
An example entry would then be background: 0.0 0.0 0.0 which would give a black
background.
Function File Format
The function file format consists of the function's range, number of control points and
the xy-coordinates of each point. By convention, the extension of the files is
.func, but this is not strictly required.
Example function file:
range: 0.0 1.0
points: 4
0.0 0.0
0.3 0.1
0.6 0.9
1.0 0.3
Credits
Radek Karowski - Funcedit - original implementation (Motif version)
Colin Smith - Funcedit - implementation and documentation (vL1.0)
Last updated December, 2001 by Joanne Penner