The following appendix was taken from Extentions to the graphical interpretation of L-Systems based on turtle geometry by R. Mech and P. Prusinkiewicz.

View file commands

The graphical extensions described in the text include not only new modules with a specific interpretation but also several view file commands setting initial parameters of the graphical interpretations:

The details of specification of contours and textures are given in the following sections.

Specifications of contours

Contours are specified in the view file by the command:

where id is a unique positive number identifying the contour and contour_file is the name of the text file containing a list of coordinates of control points.

The number of polygons around a contour can also be set in the view filw by command:

where n specifies the number of polygons. Currently, this number is constant during the interpretation.

The contour file has the following syntax: the first line contains a number of control points, the dimension of the contour (2 or 3), and a identifier of an open or closed contour (the word open or closed). Subsequent lines contain two or three coordinates of control points, one point per line.

A two-dimensional contour is specified by the file:

12 2 closed
0.166482 -1.123751
0.416204 -1.040511
0.582686 -0.332963
1.082131 -0.041620
1.082131 -0.499445
0.499445 0.541065
0.332963 0.915649
-0.374584 1.040511
-0.707547 0.624306
-1.123751 0.166482
-0.874029 -0.749168
-0.416204 -0.665927

A three-dimensional contour is specified by the file:

12 3 closed 
0.166482 -1.123751 1.0
0.416204 -1.040511 0.0
0.582686 -0.332963 0.0
1.082131 -0.041620 0.0
1.082131 -0.499445 0.0
0.499445 0.541065 0.0
0.332963 0.915649 0.0
-0.374584 1.040511 0.0
-0.707547 0.624306 0.0
-1.123751 0.166482 0.0 
-0.874029 -0.749168 0.0
-0.416204 -0.665927 0.0

An open contour is defined by the file:

15 2 open
-0.914286 -0.400000
-0.914286 -0.400000
-0.914286 -0.400000
-0.871429 -0.342857
-0.742857 -0.171429
-0.457143 -0.085714
-0.285714 0.142857
0.000000 0.271429
0.228571 0.114286
0.514286 0.142857
0.657143 -0.028571
0.892857 -0.114286
0.971429 -0.142857
0.971429 -0.142857
0.971429 -0.142857

Note that the first and the last control point is repeated three times to make sure the contour finishes in the given points.

It is possible to create a two-dimensional contour in a drawing program xfig and convert it to the contour text file using a conversion utility fig2con. It is necessary to use either open or closed Bezier spline for the contour coordinates. The created xfig file can be converted using the command:

Currently, no utility for designing three dimsional contours is provided. One possibility is to create a two-dimensional xfig and add the third coordinates by editing the contour specification file.

Definition of textures

Textures are specified in the view file using a command texture:

where

Definition of tropisms and twists

Tropisms and twists are specified in the view file using commands tropism or torque:

where


Preface
Parameters
Appendix I
Appendix II
References
Index Circles and Spheres Generalized Cylinders Surfaces Textures