Contour Editor Utility

Quick contents

Overview

Cupsy is a utility for editing spline contours in 2D space. A B-Spline is used to determine the curve. The curve may be either an open or closed one.

Cupsy

The program is invoked as:

cupsy (filename)

A window is displayed as in Figure 1, showing the contour, its control points. If the filename arguemnt specifies a a valid contour file, the file will be loaded. Otherwise, a default contour of four control points forming a closed circle about the origin.

A cupsy screen

Figure 1 - A cupsy screen

Manipulating the contour

Manipulating the View

The popup menu

The cuspy popup menu is controlled using the right mouse button. The menu contains the following items:

Configuration

The colours used in cupsy can be configured be editing the configuration file in VLAB. The configuration file is shared with that of the function editor, funcedit. 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.

Allowed configuration entries

An example entry would then be background: 0.0 0.0 0.0 which would give a black background.

Contour File Format

The contour file format consists of the contour's number of control points, number of dimensions, whether it is closed or open and the xy-coordinates of each point. By convention, the extension of the files is .func, but this is not strictly required. The number of dimensions specified always be two, but higher numbers are possible for reading the file to support backwards compatibility.

Example contour file:

      5 2 closed
      0.40 0.40
      0.54 0.02
      0.40 -0.40
      -0.40 -0.40
      -0.40 0.40
    

Credits

Colin Smith - cupsy - implementation and documentation



Last updated August 27, 2001 by Colin Smith