Trim 420

Trimm is the German word for trim. I am afraid you have to learn a little bit of German in order to use the program but not more. You could of course help improve the English language manual or the English look of the App. Not much can be done in regard to the names of variables in the data file though.

See the original text in German


The hull tetrahedron and the spreader tetrahedron are connected by three wires (forestay and shrouds) and one rod - the lower part of the mast. It is assumed that both tetrahedrons are rigid bodies, and that symmetry in regard to the mid ship plane is maintained.

The kinematic model of the structure is a six-bar linkage. You should imagine the mechanism under tension - internal tension only - with no external forces applied. With the elastic properties known, you could cut through the forestay and draw the relaxed position of the structure, with no tension in the shrouds and the mast a straight line. This part of the computation is not in the program, but you should know that the mechanism as drawn is thought of as under tension - the tension you can measure at the real boat.


The input parameters of the model you can change are: length of forestay, length of shroud, the spreader triangle, and the position of the foot of the mast.

On the output side of the computation you have: declination of the mast (Mastfall) and bending/displacement of the mast (Biegung).

All input parameters are independent of each other. When you change the length of the forestay, the length of the shrouds and the shape of the spreader triangle will remain unchanged.

However, when you select Mastfall (F0C) or Biegung (Bie) as the current parameter, length of forestay and shrouds are changed to fit.

Screenshot of Trimm 420 app with page 1 selected.


The graph can be implemented in different ways, depending on how easy it is made by the development tool used to compile for the target platform.

Perspective or orthographic projection, it is not clear which is better. You can expect that graphics will change, perhaps even improve. But the computation behind the scene will mostly stay the same.


Here is a short list of the operations with the mouse:

scroll wheel = current parameter +/- 10
shift scroll wheel = current parameter +/- 1
control scroll wheel = zoom
control left button drag = panning
left button drag
(in x or y direction) = rotation X / Y
right button drag
(in x direction) = rotation Z

(You should start dragging the mouse over the background of the graph.)


With the touch screen everything is similar. Rotation Z is done using the upper touch bar. Zoom is accomplished with help of the lower touch bar. Touch bars left and right do the same job as the mouse wheel.

Screenshot of Trimm 420 app with touchbars marked.

How do you want your touch bars - Mediumpurple !


The desktop version of the program should support keyboard shortcuts as follows:

v = Button VO (Vorstag / Forestay)
w = Button WA (Wante / Shroud)
o = Button WO (Wante oben / Shroud, upper part)
h = Button SH (Saling Höhe, Spreader Height)
a = Button SA (Saling Abstand, Spreader Distance)
//Memory slots
0 = T0   (Trim 0) Base-Trim
1 = T1   (Trim 1)
2 = T2   (Trim 2)
3 = T3   (Trim 3)
4 = T4   (Trim 4)
5 = T5   (Trim 5)
6 = T6   (Trim 6)
7 = 420  (Trim 7)
8 = Logo (Trim 8)
M = M    (Update Trim) Copy and Paste
Z = MT0  (Update Trim 0)
//Fix points
d = Point D
D = Point D0
e = Point E
E = Point E0
f = Point F
F = Point F0
u = data (display of trim Data on / off)
U = diff (display of trim Diff on / off)
//Background color
c = c+ (color scheme plus)
C = c+ (color scheme minus)
H = hull (on / off)
//Hull texture
# = be (bitmap escape)
b = b+ (bitmap plus)
B = b- (bitmap minus)
n =    (random bitmap black)
N =    (random bitmap white)
t = t1 (texture param t1 Offset)
T = t2 (texture param t2 Width)
* =    (page minus)
+ =    (page plus)
! =    (page 1)
= = PE (page 5 / Page Escape)
? = LP (page 7 / Last Page)
//Export / Import
R      = rtf (Read trim file)
Ctrl c = ^c  (copy)
Ctrl v = ^v  (paste)

Actions for Buttons

Every button on the rim of the window may have an action assigned to it. The mapping of actions to buttons can change with every release.

Each action has a short caption which fits on a button, and a more verbose description, which can be used on a menu item.

I found that - when you know the available actions - the short caption on the buttons are no longer a problem.

The following list contains actions currently mapped to buttons:

//Input parameter (model)
V0, WA, WO     = Forestay, Shroud, Shroud upper
SH, SA, SW, SL = spreader triangle (height, distance, angle, length).
F0X            = mast foot position.
//Output parameter (model)
F0C = Mastfall F0C
Bie = Displacement of mast at point D
//Other model parameters - try it out
MV  = MastfallVorlauf
WI  = Angle / Winkel
Co  = Controller
mod = toggle between Demo mode and Pro mode.
fs  = fixed spreaders / Feste Salinge (spreader triangle is rigid)
ds  = pivoting spreaders / Drehbare Salinge
os  = without spreaders / ohne Salinge
//Pivot points for rotation of graph
A0, A, and so on = important points of the model
//Memory slots for trims
T0-T6 = Memory Recall for trims held in main memory
420   = special slot for example 420
Logo  = special slot for Logo example
PE   = Page Escape, go to page 5, first page in outer loop
//Export / Import
^c  = Copy current trim
^v  = Paste current trim
ctf = Copy Trimm-File
rtf = Read Trimm-File  
stf = Save Trimm-File  
//Graph, Background and Text
esc  = reset rotation of graph (Escape key)
pan  = move graph on screen (this is a view parameter)
data = display of Data on / off
diff = display of Diff on / off
c+   = cycle through color scheme for background and text plus
c-   = cycle through color scheme minus
jc+  = cycle through all defined background colors (web colors) plus
jc-  = cycle through background colors (Joker-Color) minus
wtx  = white text
gtx  = gray text
btx  = black text
hull        = display of hull on / of
b+ und b-   = cycle through texture bitmaps
t1 und t2   = texture mapping parameters t1 (offset) and t2 (stretch)
br+ und br- = increase / decrease blind ring count (count of hidden rings)
ct          = contour toggle, hide or show contour pixels in texture bitmap for hull


The format of the data is still under development. Typically, data can be read from a Trimm-File.txt in the document directory. Perhaps a Trimm-File-Auto.txt can be saved. And maybe this Trimm-File-Auto.txt is automatically read at program startup.


Trim 420 could no problem deal with a 470 or Cadet. But at this time there is no data available for these classes, not yet. In particular, I am missing data for the mesh of the hull for these classes and other classes.

There is the intention to make example data available for different classes, similar to what is available now for the 420.

But I will unlikely implement internet access for downloading data unless there is enough tested data available, provided by the user of the app, including hull mesh data for the boat.

Tips and Tricks

Imagine you have a simple triangle and the current parameter is the length of one side of that triangle. Now, when you make this side longer than the sum of the two other sides, the triangle can no longer be drawn. This is about the same in Trim 420, only a little more complex.

In Demo mode the state of the model will be reset at every change of the current parameter. It has the advantage that the valid range for changes is well known, and can be rather big.

In Pro mode you can change the model as you like, and drive it out of range easily.

The actions for Export and Import are implemented differently or not at all, depending on the platform.

In the current version for iPad and Android I have implemented Copy and Paste, but not M, not yet. But Copy and Paste - executed in a sequence - have the same effect: the current memory slot will be overridden with the current state of the model (operation M). In future button M will be surfaced in all targets.

Buttons for page navigation located in top left and top right corners of the button frame do not have fixed captions. Instead these buttons both show the current page number. Page navigation is a cycle through the available button pages. But notice that there is an inner and an outer loop. Page Escape (PE) will take you to the first position in the outer loop. As a new user, you can stay safe within the inner loop.

For interactive manipulation of the color on the hull I was able to reuse features from the Federgraph App, which may be explained there.

Notice one exception to the rule: When parameter Pan is selected, operations on the left and right touch bar are remapped to offset X and offset Y.

What happens when you change the spreader type (fs, ds or os)? You can test that out and see. The spreader type (Salingtyp) is currently not stored. It is a feature added back in, to be used later with the Cadet class.