Editors with galleries

The gallery interface

The surface, contour, function, and panel editors share a user interface paradigm: the gallery. At the top left of the editor window is the preview; to its right are all of the controls for altering it. Below the preview and controls is the gallery. This is a window which shows all of the surfaces, contours, functions, or panels (respectively) which are part of the object.

Working with the gallery

The gallery lets you see all of the components of a particular type which are part of the object. Clicking on one will bring it up in the preview window, where it can be altered with the editing controls. Right-clicking on the preview window brings up a popup menu which includes the commands:

Each component has a name; a new component's name is "unnamed".

Right-clicking in the gallery brings up the gallery popup menu, which includes the commands:

You can also move a gallery entry by selecting it, then dragging it to a new position.

Component sets

Each panel in the gallery is saved to a file name.pnl on the lab table, where name is the name given to the panel. Panels called "unnamed", however, are not saved. This is also the default behaviour for surfaces (which are saved as name.s) and contours (name.con). However, surfaces, contours, and functions can be bound into sets, which are saved as single files.

The gallery popup menu of the surface, contour, and function editors has an extra command. Bind toggles the state of the components: if on, they are bound to a set; if off, they will be saved as individual files. Note that if the components have been saved as individual files, then are bound, the individual files will not be deleted; similarly, if they are unbound, the set will not be deleted.

Surfaces

Surfaces in L-studio are implemented as Bezier patches. There are two surface editors available: the basic surface editor, and the advanced editor. With the basic editor, you can edit and manipulate surfaces with a single Bezier patch. Surfaces made from more than one Bezier patch must be edited using the advanced editor. To switch between the basic and advanced editors, press the Advanced or Basic button in the top right corner of the editor.

For more information about surfaces in cpfg, see the Cpfg User's Manual. More information can also be found at http://www.cpsc.ucalgary.ca/Research/bmv/vlab/ise.html.

The basic surface editor

Basic surface editor

The editor window

In the top left of the editor is the preview window, which shows the current state of the surface currently being edited. To the right of the preview window are the controls: the Advanced button switches to the advanced surface editor; below it is an array of buttons to select which Bezier patch control point is currently being edited; and below that is the name of the current surface. Under the preview window and controls are three sliders which display (and can be used to set) the X, Y, and Z position of the currently selected control point. At the bottom of the editor is the gallery of surfaces. If a gallery entry is in white, it was created with the advanced editor, and cannot be loaded into the basic editor; attempting to select such an entry will merely display a message in the preview window indicating this.

Manipulating the view

The preview window can be in one of two modes:

The default mode is Rotate. To enter Lock XY mode, right-click on the preview window and select Lock XY Design from the popup menu. To return to Rotate mode, select Lock XY Design again.

In Rotate mode, you can rotate the view of the surface by dragging on the preview window with the mouse. To reset the display to its default parallel projection, right-click on the preview window and select Reset rotation from the popup menu. In Lock XY mode, the surface cannot be rotated: it is presented in parallel projection on the X–Y plane.

You can pan and zoom the preview window. In both modes, pan by dragging the mouse while holding the Shift key on the keyboard. To zoom in or out, either drag with the middle mouse button, or drag with the left mouse button while holding the Ctrl key on the keyboard. Dragging the mouse up zooms in, while dragging down zooms out.

Display options

You can choose to display or not display the control mesh, the control points, or the control points' numbers. You can also show the surface in one of three densities of wireframe, or as a shaded surface. These options are chosen through the Display submenu of the preview window's popup menu.

Modifying the surface

The surface can be edited in both modes. In Rotate mode, select a control point using the buttons labeled 1–16. The three sliders located below the preview window can be used to change the X, Y and Z coordinates of the selected point. In Lock XY mode, a control point can be edited directly by clicking to selct it, then dragging it. (Note that in Lock XY mode, you can only drag a control point within the X–Y plane; to change its Z coordinate, select it and use the Z slider.)

You can also change the contact point associated with the surface. When cpfg/lpfg draws the surface, the turtle position corresponds to the contact point. See the Cpfg User's Manual for more information.

If you choose the command Keep symmetric from the popup menu, any change you make to a control point's position will be mirrored in point opposite it in the plane defined by the Heading and Up vectors. The result of applying Keep symmetric to a surface which is not symmetric to start with is undefined.

The advanced surface editor

Advanced surface editor

Again, the preview window is at the top left, the controls are to its right, and the gallery is at the bottom. The Basic button, at the top left, switches back to the basic surface editor. The button panel below it offers many controls for editing the surface:


Contours

Contour editor

Contours in L-studio are defined by B-spline curves. The contour editor lets you manipulate the curve's control points; you can add or delete control points, move them, or change their multiplicity (strength of attraction). You can also select between several types of B-spline curve.

Selecting the type of curve

L-studio lets you create contours which are closed or open; to switch between them, check or uncheck the Closed contour check box, in the top right corner of the editor. In addition, you can force the B-spline to pass through the first and last control points by selecting Endpoint interp. in the B-spline type group; the normal, non-interpolating behaviour is selected with the Regular button.

Manipulating control points

Points can be manipulated in one of four edit modes. The current edit mode is selected using the buttons at the top right. The available modes are move points, add points, delete points, and set coordinates.

Manipulating the view

You can toggle the display of the control points, the control polygon, the edited curve, the coordinate system axes, the grid and the labels on the grid using buttons grouped in the Display section.


Functions

Function editor

The function editor is very similar to the contour editor. The objects being edited are also cubic spline contours, but have some additional constraints:

These conditions assure that the curve can be interpreted as a function of X.

Manipulating control points

Points can be manipulated in one of four edit modes. The current edit mode is selected using the buttons at the top right. The available modes are move points, add points, delete points, and set coordinates.

Manipulating the view

You can toggle the display of the control points, the control polygon, the edited function, the coordinate system axes, the grid and the labels on the grid using buttons grouped in the Display section.

Flip view

The functions can be displayed in two ways. Traditionally, the domain (X) of the function y=f(x) is associated with the horizontal axis, while the range (Y) is associated with the vertical axis. In some cases, it is convenient to assume that X is the vertical axis and Y is the horizontal axis. To do this you can check the Flip view check box. Flip view is a property of a function, so it is possible to have only some of the functions flipped. This property is saved together with a function only if the gallery of functions is bound into a function set.

Samples

This is the number of samples to be precomputed by cpfg/lpfg for a function. For more information, refer to the section Function galleries in What's new in cpfg.


Panels

Panel editor

Panels are used to control parameters during experiments. An extensive description of panels can be found in the vlab panels documentation. The description provided here focuses on the user's perspective of the panels editor, as well as on the differences between vlab and L-studio implementations.

Working mode

The current working mode is determined by the buttons Execute and Design. In Execute mode, the user can interactively change the displayed values; these changes are immediately applied to the relevant files on the lab table. In Design mode, the panels themselves can be modified, and the commands along the right side of the editor are accessible.

Edit mode

Select button
Select mode is the default. In this mode you can select widgets by clicking on them. You can also click and drag a box to select one or more widgets. A selected widget or widgets can be moved by dragging it. If you double click on an widget in Select mode, the widget properties dialog box pops up. From this dialog box, you can change widget-specific attributes.
Delete button
Delete. When this button is pressed, all currently selected widgets are deleted. After deletion, the mode switches back to Select.
Create slider button
Create slider mode. While in this mode, clicking on the panel editor window will place a new slider.
Create button button
Create button mode. While in this mode, clicking on the panel editor window will place a new button.
Create group button
Create group mode. While in this mode, dragging a box around one or more buttons will associate them in a group. (In Execute mode, only one button in a group will be active at a time.) Widgets that are not buttons will not be associated in the group.
Create label button
Create label mode. While in this mode, clicking on the panel editor window will create a new label, whose text defaults to "Label".

Modify buttons

Align Horizontally button
Align Horizontally. Clicking this button presents you with three options: align to left, align to right, and center horizontally. Align to left moves all of the currently selected widgets to the left so that their left edges are at the same horizontal position. Align to right moves all of the currently selected widgets to the right so that their right edges are at the same horizontal position. Center horizontally moves all of the currently selected widgets horizontally so that they are centered on the same horizontal position.
Align Vertically button
Align Vertically. Clicking this button presents you with three options: align to top, align to bottom, and center vertically. Align to top moves all of the currently selected widgets up so that their top edges are at the same vertical position. Align to bottom moves all of the currently selected widgets down so that their bottom edges are at the same vertical position. Center Vertically moves all of the currently selected widgets up or down so that they are centered on the same vertical position.
Distribute Vertically button
Distribute Vertically. Pushing this button moves the selected widgets so that they are evenly spaced vertically. The topmost and bottommost widgets do not move.
Distribute Horizontally button
Distribute Horizontally. Pushing this button moves the selected widgets so that they are evenly spaced horizontally. The leftmost and rightmost widgets do not move.
Duplicate Down button
Duplicate Down. When this button is pressed, duplicates of all of the currently selected widgets will be created immediately below the current selection. The duplicated widgets are identical to the originals, except that their names will be changed to "Copy of" the original name. If a group is selected, its buttons will be duplicated, but the group will not.
Duplicate Right button
Duplicate Right. When this button is pressed, duplicates of all of the currently selected widgets will be created immediately to the right of the current selection. The duplicated widgets are identical to the originals, except that their names will be changed to "Copy of" the original name. If a group is selected, its buttons will be duplicated, but the group will not.

File association

The Associate with area lets you choose which file is modified by the current panel: the L-system file, the View file, or another file (whose filename is typed in the text box).

Widget properties

To modify the properties of an widget, double-click on the widget. This will open the widget's Properties dialog box. Each type of widget has its own dialog box:

Slider Properties dialog

The Slider Properties dialog lets the user change the properties of slider widgets:

Button Properties dialog

The Button Properties dialog lets the user change the properties of button widgets:

Label Properties dialog

The Label Properties dialog lets the user change the properties of text labels: