To perform a simulation of an L-system model, select Go! from the Cpfg or Lpfg menu. (Only one of these menus will be present, depending on whether the current object is a cpfg or lpfg object.) L-studio will then update all of the lab table files that are needed by the simulation program:
and, if present,
L-studio then runs the cpfg or lpfg simulation program.
After cpfg/lpfg has been launched, you may edit any components of the object (e.g. the L-system, view file, color map, etc.). To apply the changes to the simulator, you have two options:
Run L-studio in Continuous modeling mode. To activate this mode, select Continuous modeling from the Cpfg/Lpfg menu. In Continuous modeling mode, any changes you make to colors, materials, contours, surfaces, or functions, or any changes you make with a panel, are immediately applied to the cpfg/lpfg simulation. Whether the entire model is regenerated, or merely redrawn, depends on what is changed:
|Element modified||Effect on simulator|
|L-system (via a panel)||Regenerates and redraws|
|View (via a panel)||Redraws only|
|Function||Regenerates and redraws|
|Other text file (via a panel)||Regenerates and redraws|
If you alter the L-system, view file, or other text file using the text editor, the changes will not automatically propagate to the simulator; you must use New....
cpfg/lpfg and the message log window will remain open until you either:
For detailed information on the use of cpfg see the Cpfg User's Manual. For detailed information on lpfg, see the Lpfg User's Manual.
Under vlab, the special file specifications is used to describe an object and all of the operations which can be performed on it. (See the vlab documentation.) L-studio performs the same function using file extensions; however, to maintain compatibility, L-studio is capable of running objects containing a specifications file. If the object contains such a file, L-studio tries to do the following:
Important: this mechanism, while useful, might also cause some problems if the command line in the specifications file contains some UNIX-specific commands, such as calling more than one program (e.g. cpfg plant.l plant.v &; tail -F cpfg.out) or stream redirection (cpfg plant.l plant.v > dump.txt). L-studio passes the entire command line to cpfg, which will not start with incorrect parameters.
The special file LSspecifications holds object-specific L-studio preferences. If there is an LSspecifications file present in the object, L-studio will look for a line which starts with the string "cpfg" or "lpfg". The text following this string is assumed to be the command line for the simulation program. The simulation program will be called with the parameters specified in this line. The menu label (Cpfg or Lpfg) shows which program was read from the LSspecifications when the object was loaded or the LSspecifications file was last saved.
If the object contains neither LSspecifications nor specifications files, or if one or both exist, but don't contain a line starting with "cpfg" or "lpfg", then the following algorithm is used to generate command line parameters for the simulation program:
The simulation program is assumed to be cpfg, with parameters
If there is a *.e file in the object directory then the parameters will be:
A full description of cpfg's command line parameters is given in the Cpfg User's Manual.
When the cpfg/lpfg window has appeared, a log window appears immediately below it to display any messages the simulator generates.