KnotPlot Parameters
Parameters may be set by typing parameter = value. Like commands, parameters may be
abbreviated to any length. However it is safer to never abbreviate a parameter to less than
four characters. Parameters are guaranteed to be unambiguous if this general rule is followed.
Click on one of the following subsection names to go to that subsection. To
return to the top of the page, click on one of the arrows pointing upwards.
[Setting parameters]
[Changing the display]
[Surface geometry]
[Creating new knots and links]
[Relaxation of knots]
[Four dimensional knots]
[Postscript pictures]
[Miscellaneous parameters]
Setting parameters
Parameters come in several varieties, real numbers, integers, and boolean numbers. Real numbers
will be rounded off if an integer parameter is being set. Boolean parameters may be set to one of
true, on, yes, or 1 to indicate true, or false, off,
no, or 0 to indicate false. Some integer parameters are naturally expressed as
hexadecimal values. An example is
background
. These parameters are also displayed in hexadecimal when using the
parameters
command. To set a parameter (or command argument) to a hexidecimal integer, preface the value with
the characters 0x (for example back = 0xff7648 will set the background to a nice
royal blue).
Random values
Parameters and all numerical arguments to commands may be set to values which are chosen randomly
in several different ways. A random value is indicated by \r as in the following:
- \rr[a/b] A real number chosen uniformly in the range
a to b (inclusive).
- \rra A real number chosen uniformly in the range 0 to a (inclusive).
For example, \rr1 will choose a number from 0 to 1.
- \rr+-a A real number chosen uniformly in the range a to a
(inclusive).
- \ri[a/b] An integer chosen uniformly in the range
a to b (inclusive).
(example)
- \ria An integer chosen uniformly in the range 0 to a (inclusive).
- \ri+-a An integer chosen uniformly in the range a to a
(inclusive).
An
example
using all of the above is in the demos directory.
Changing the display
All the parameters in this section affect only the display as seen on the screen. They have
absolutely no effect on the actual surface geometry.
- auto-colour
-
If auto-colour is true, the parameter hincr is automatically set when loading
a knot or creating a new one, the value of hincr depending on the number of components. Set
auto-colour to false to turn off this action (default is true).
- background
-
The background colour of the view window. Normally set by specifying a hex value (see the note
above, default is 0x444444).
- Drawing
-
Turns on or off drawing (default is on).
- drecaps
-
Controls whether or not end-caps are drawn for open components. End-caps are not properly drawn in
KnotPlot currently, set this parameter to false to turn off the drawing. This problem
should be fixed in upcoming versions of the software, eliminating the need for this parameter
(default is true).
- grmode
-
Grid mode, 1 is a rectangular grid, 2 is a pie grid. Use the
3doptions
command to change the colours used to draw the grid.
- grsize
-
Size of the grid (default is 10).
- grspace
-
Minor spacing between lines on the grid (default is 1). Set to 0 to turn off minor spacing.
- grSpace
-
Major spacing between lines on the grid (default is 5). Set to 0 to turn off major spacing.
- hstart
-
'Hue start', the hue of component 0 in smooth tubes mode. Valid range is from 0 to 360 (default is
250).
- hincr
-
'Hue increment', the difference in hue between consecutive components in smooth tubes mode (default
depends on number of components).
- saturation
-
The colour saturation of the surface while in smooth tubes mode. Valid range is from 0 to 1
(default is 1).
- scale
-
The drawing scale (default is 0.35). Not to be confused with the
scale
command.
- trx try trz
-
The offset in the three directions of the displayed knot. Using the right mouse button in the view
window is the same as changing trx and try.
- value
-
The 'value' or brightness of the surface while in smooth tubes mode. Valid range is from 0 to 1
(default is 1).
Surface geometry
All of the parameters in this section affect both the display seen on the screen and any surface
description output to another program (DXF, SDL, etc.).
- cyl-rad
-
The radius of the cylinders or smooth tubes when drawn (0.35). This parameter may also be set
using the 'cyl-rad' slider on the main
control panel.
- nsegments
-
The number of sides of the drawn cylinders. Increase this for better rendering, decrease for
faster rendering (default is 12). This parameter is changed by the
luxo
and
cheapo
commands. This parameter may also be set using the 'nseg' slider on the main
control panel.
- ncurve
-
The number of interpolations (segments) drawn between each bead using mode s (default is 3).
This parameter is changed by the
luxo
and
cheapo
commands. This parameter may also be set using the 'ncur' slider on the main
control panel.
- broff
-
The size of the 'broken offset' when in drawing modes 'brok' or 'sbro' (default is 0.1).
Creating new knots and links
These parameters control various settings related to the creation of new knots and links.
- D-chain
-
The radius of the entire link created with the
chain
command (default is 10).
- d-chain
-
The radius of individual components in a link created with the
chain
command (default is 0.75).
- d-torus
-
The smaller radius used in constructing a knot with the
torus
command (default is 2.75).
- new
-
If true, everything is deleted when new knots or links are created with commands such as
chain or others (see the section on
creating
new knots and links to see which commands are affected by this parameter). Set to false if
you want to keep the old knot or link while adding a new one (default is true).
- N-torus
-
Number of beads in knots constructed with the
lissajous
,
torus
or
unknot
commands.
- R-torus
-
The larger radius used in constructing a knot with the
torus
or
unknot
commands (default is 8.25).
Relaxation of knots
These parameters affect the dynamical system run on the knot or link during the relaxation
simulation.
- bencon
-
Parameter controlling the magnitude of bending forces (default is 1.0).
- bendforce
-
Sets bending forces on or off (default is off).
- close
-
The closest distance that the cylinders are allowed to approach in the dynamical simulation
(default is 0.12).
- dstep
-
Normally when KnotPlot is relaxing a knot, the knot is displayed at each iteration step. On some
machines, especially those with slow graphics but fast CPUs, it is often preferable to draw after
several iterations. Setting this parameter to a value greater than one will cause KnotPlot to draw
every dstep iterations during knot relaxation.
- elecforce
-
Sets the 'electrical' force on or off (default is on).
- iteration
-
Current iteration count (the number of relaxation steps).
- max-dr
-
The maximum distance beads are allowed to move each relaxation step. In order for the relaxation
to preserve knot type, this parameter should be less than close above (default is 0.1).
- mechforce
-
Sets the 'mechanical force' on or off (default is on).
Four dimensional knots
These are the relevant parameters for four dimensional knot construction and display.
Constructing the knot
These parameters are used to define the surface constructed in the spinning or suspension process.
- 4dss
-
the number of spin sections created (the number of vertices along a line of latitude) (default is
30).
- 4dspangle
-
the angle of the spin plane (can also be set with the
splane
command).
- 4dw
-
suspended knots are constructed ``hanging'' from the points (0, 0, 0, w) and (0, 0, 0, -w) where w
is the value of this parameter.
Displaying the knot
These parameters control the display of the knot (or related objects).
- 4deye
-
this sets the distance of the 4D eye point. Only relevant to the perspective projection.
- 4dw
-
this controls the length of the coordinate axes and the size of the bounding hyper-cube.
- 4dda
-
(true or false) display the four coordinate axes (false).
- 4ddc
-
(true or false) display a bounding hyper-cube (false).
- 4ddk
-
(true or false) display the knot itself (true).
- 4dsm
-
the way the knot surface is displayed. The possible values are
- 0
- --- draw as a shaded surface.
- 1
- --- draw as a wire frame
coloured according to latitude on the sphere.
- 2
- --- same as 1 except draw latitude
lines only.
- 3
- --- same as 1 except draw longitude lines only.
- 11
-
--- draw as a wire frame but colour according to the value of the dimension lost in the projection
from 4D to 3D.
Portions of the knot's surface can be selectively enabled or disabled using the
spactivate
command (for example, to view the northern hemisphere only).
Postscript pictures
There are several parameters controlling how Postscript pictures are generated. Also, provision is
made in the Postscript file for easy editing if something unusual is required. The KnotPlot Site
has a
page
of examples
(clicking on 'example' in the list below will download a GZIPPED example for that mode).
- psbackface
-
If true, backfacing polygons are removed when outputting a Postscript file. In certain
situations, such as when using a 'broken' drawing function, you might want to see backfacing
polygons. If so, set this parameter to false (default is true).
- psmode
-
Will affect the type of Postscript output generated. Defaults to 1. Modes 1 and 2 generally
produce smaller files and print faster than mode 0. Modes in the ``forties'' produce the smallest
files of all, and print much faster too. Possible values for psmode are:
- 0
- --- smoothly shaded surface
(example)
- 1
- --- white polygons with black outline
- 2
- --- black polygons with
white outline
(example)
- 3
- --- same as mode 1 except the polygons are slightly rounded
(example)
- 4
- --- flat shaded
(example)
- 5
- --- similar to mode 0 except a pattern can be specified.
- 10
- ---
output colour Postscript with colours similar to those seen with the drawing mode set to draw
norm.
(example)
- 11
- --- same as mode 10 except use colours as in drawing mode draw spec.
(example)
- 30
- --- Allows a texture map in the form of a
PGM
( Portable Grey Map) file to be specified.
- 40
- --- Simple rendering with a black
curve
(example)
- 41
- --- Same as mode 40 except black and white are swapped. This gives a similar
rendering to the knots and links found in Appendix C of Knots and Links
(example)
- 42
- --- Intended to be an improvement over mode 40 but I'm not quite sure. All
these modes need some minor improvements. Note that you'll have to make
cyl-rad
smaller with this mode to get similar results to using mode 40.
- 43
- --- The mode
corresponding to mode 42 with black and white swapped.
- 104
- --- Maps a random
Truchet
pattern
on the surface.
(example)
- psN
-
- psM
-
- pssort
-
Hidden surfaces are handled in the Postscript rendering by using the 'Painter's algorithm', that is
by drawing the polygons back to front. In order to do this, the set of polygons is normally
sorted. Set this parameter to false to override this default behaviour.
Miscellaneous parameters
That twisting stuff
A
demo script
is available in the demos directory that illustrates the use of the following.
- aftwist
-
Usually off, set to on if you want knots to be automatically
twfix
ed when they are loaded. Note that twfixing is done when using the buttons on the
control panel
are used to load something at random.
- atw
-
A flag normally set to off, but some commands such as
dxf
and
sdl
will set it to on because they require that the coordinate frame of the smooth tube match up
exactly.
- twdefault
-
The twisting value used upon loading if aftwist is on.
- twist
-
The amount of twist in milli-radians per segment (best see me for an explanation). Default is 0.
Basically, this is a way to eliminate the deficit angle seen at the tie-point in the knot. To
eliminate the deficit angle, first set twist and then enter the command
twfix
(or just give the value as an argument to twfix). Interesting effects can be produced by
setting nseg = 3 and using a twist of around 100.
Other parameters
- silent
-
KnotPlot will not print anything if this parameter is true (default is false).
- sformat
-
Format used to save knots or links with the
save
command. See the
documentation
on file formats.
- 0
- --- KnotPlot LOCF float format.
- 1
- --- KnotPlot LOCS
short format. Files saved with this format are about half the size of those saved with the
LOCF format. However, a small amount of noise is introduced to to the limited precision of short
integers. Users should beware of accumulated errors if files are repeatedly loaded and saved with
this save format in effect.
- 2
- --- KnotPlot LOCC char format. Files saved
with the LOCC are only half the size the equivalent LOCS file and a quarter the size of an
equivalent LOCF file. However, the same warning applies to the use of this file format as was
given for the LOCS format, only more so. This format is very useful, however, for large animation
databases.
- 3
- --- Raw ascii (same format as used by the
coords
command).
- 4
- --- Ascii format suitable for input into
Kenny Hunt's
KED program. Cannot be used for multi-component links.
- 5
- --- Similar to KED
format except suitable for input into Ming. Cannot be used for multi-component links.
This HTML file was produced at 5:03 p.m. on February 7, 1997
directly from the LaTeX source.
[
KnotPlot Manual
], [
View Window
], [
Control Panel
], [
Command Window
], [
Overview
]
[
Rob Scharein's
main WWW site ], [
KnotPlot Site
]