Tikz Library For Structural Analysis: Stanli User Guide, Version 3.0 J Urgen Hackl
Tikz Library For Structural Analysis: Stanli User Guide, Version 3.0 J Urgen Hackl
Tikz Library For Structural Analysis: Stanli User Guide, Version 3.0 J Urgen Hackl
Jürgen Hackl
hackl.j@gmx.at
3
2, 0
4 5
1
1, 0
2
6 8
S
2, 0
7
3, 0 8, 0 8, 0 3, 0
This work was done in cooperation with the Institute of Structural Analysis of Graz University of
Technology.
Permission is granted to copy, distribute and/or modify the documentation under the terms of the
gnu Free Documentation License, Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of
the license is included in the section entitled gnu Free Documentation License.
Permission is granted to copy, distribute and/or modify the code of the package under the terms
of the gnu General Public License, Version 2 or any later version published by the Free Software
Foundation. A copy of the license is included in the section entitled gnu General Public License.
Permission is also granted to distribute and/or modify both the documentation and the code under
the conditions of the LATEX Project Public License, either version 1.3c of this license or (at your
option) any later version. A copy of the license is included in the section entitled LATEX Project
Public License.
1 Commands 1
1.1 2D Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 3D Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Introduction 7
2.1 How to read this manual? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 A few explanations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.2 Additional help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Additional necessary packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
I 2D Library 9
3 Elements 11
3.1 General information about the elements . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1 Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.2 Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 The elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.1 Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.2 Beams and bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.3 Supports and Bearings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.4 Joints and Hinges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.5 Single load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.6 Line loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.7 Temperatur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.8 Internal forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.9 Dimensioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.10 Range of the influence line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.11 Labeling and notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.12 Additional symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Useful Tik Z commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Orientation of text elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.2 Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.3 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.4 Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4 Tutorial 25
4.1 Roof construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.1 Start of the consturction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.2 First steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.3 Roof structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.4 Bearings and joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
III
Contents
II 3D Library 31
5 Elements 33
5.1 General information about the elements . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.1.1 Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.1.2 Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.1.3 Planes and spatial elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.1.4 TikZ Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 The 3d elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.1 Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.2 Beams and bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.3 Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2.4 Supports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.5 Joints and Hinges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2.6 Single load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.7 Line loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2.8 Internal forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2.9 Dimensioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.10 Labeling and notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.11 Additional symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3 Useful Tik Z commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3.1 Orientation of text elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3.2 Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3.3 setcoords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3.4 setaxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3.5 showpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3.6 dscaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6 Tutorial 49
6.1 Structural design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.1.1 Start of the consturction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.1.2 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.1.3 Placing points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.1.4 The construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.5 Axes for the overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.6 Supports and joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.1.7 Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.1.8 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.1.9 The finished construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.1.10 Structural design with source code . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.1 2D Commands
\ macroname { obligatory }{ obligatory }{ obligatory }[ optional ][ optional ];
{2} trussed
\ beam {2}{ initial point }{ end point }[ rounded initial point ][ rounded end point ];
{4} support
\ support {4}{ insertion point }[ rotation ];
{5} spring
\ support {5}{ insertion point }[ rotation ];
1
1 Commands
{1} label
\ notation {1}{ insertion point }{ labelling }[ orientation ];
1.2 3D Commands
\ macroname { obligatory }{ obligatory }{ obligatory }[ optional ][ optional ];
{2} trussed
\ dbeam {2}{ initial point }{ end point }[ rounded initial point ][ rounded end point ];
{5} line load perpendicular to the beam axis with rotation in space
\ dlineload {5}{ rotation A }[ rotation B ]{ initial point }{ end point }[ initial force
value ]
[ end force value ][ force interval ];
{6} line load parallel the beam axis with rotation in space
\ dlineload {6}{ rotation A }[ rotation B ]{ initial point }{ end point }[ force interval ]
[ force length ];
Internal forces (see 5.2.8)
\ d inte rnal for ces { plane }[ plane distance ]{ initial point }{ end point }{ initial value }{ end
value }
[ parabola height ][ color ][ bend position ];
Dimensioning (see 5.2.9)
\ ddimensioning { plane }[ plane distance ]{ initial point }{ end point }{ distance from point of
origin }
[ measure ][ help line length ];
Labeling and notation (see 5.2.10)
\ dnotation { type }{ insertion point }{ obligatory }[ optional ][ optional ][ optional ][ optional ];
{1} label
\ dnotation {1}{ insertion point }{ labelling }[ orientation ];
The following work is a manual for a library of symbols for structural analysis. This library is based
on the PGF/Tik Z environment. Accordingly, commands from these packages are used. Nevertheless,
comprehensive knowledge of Tik Z is not necessary in order to use this library. If the referenced
commands in this manual are not enough for the interested reader, the Tik Z manual from Till
Tantau is suggested.
This manual describes the use of the library for symbols for structural analysis. To ensure an easy
use of the elements and to keep the clarity, this manual follows the structure of the “Tik Z and
PGF Manual” and starts with the essential components (command list, elements) and subsequently
deals with the “whole schmear”. Finally, everything is repeated and summarized in form of a brief
tutorial.
If the required packages have not yet been installed, you should read before starting, the installation
chapter.
All images in this manual were created with Tik Z or the element library. The code used for this, is
specified for each image.
\ begin { tikzpicture }
\ filldraw ( -.2 ,.2) circle (2 pt )
(.2 ,.2) circle (2 pt ) ;
\ draw (0 ,0) circle (5 mm )
( -.3 , -.1) .. controls (0 , -.3) .. (.3 , -.1) ;
\ end { tikzpicture }
Special additions which are needed for a better understanding are shown in orange, but are not in
the sample code available.
\ begin { tikzpicture }
\ draw (0 ,0) .. controls (1 ,1) and (2 ,1) .. (2 ,0) ;
\ end { tikzpicture }
Is the manual not enough, occur some ambiguities or some Tik Z commands are unclear, please have
a look in the “Tik Z and PGF Manual” von Till Tantau.
Should you have any further questions, please do not hesitate to contact me.
7
2 Introduction
2.2 Installation
Actually, we can hardly speak of an installation since only the necessary package \usepackage{structuralanalysis
}must be installed.
Is the package installed or the style file i stored in the main file folder, so the library can be imported
by \usepackage{structuralanalysis}, as a following example shows:
%------------
% header
%
\ documentclass [
a4paper , % defines the paper size : a4paper ( default ) , a5paper
BCOR20mm , % correction
twoside , % changes to a two - page - layout ( alternatively : oneside )
halfparskip , % insert an empty line between two paragraphs ( alternatively : parskip ,
...)
openright , % chapter starts on the right page
]{ scrreprt }
%------------
% packages
%
\ usepackage { s t r u c t u r a l a n a l y s i s }
To use all commands and options of Tik Z , possibly some packages need to be reloaded. These missing
files (or their names) appear in the error log, when you convert the file. However, for the package
described in this manual, it is sufficient to use the library and the Tik Z standard commands.
2D Library
9
3 Elements
3.1.1 Order
The library provides a number of standard elements available to the user. For example, bearings,
joints, forces, etc. Since Tik Z displayes those elements at the bottom which are entered first, it must
be ensured that the element insert in the correct order. The following order is recommended:
1. Points \point
4. Joints \hinge
7. Dimensioning \dimensioning
9. Labeling \notation
3.1.2 Input
In addition to the correct order also the correct input for the elements matters.
Basically, one can distinguish between the mandatory input { } and the optional input [ ]. The first
values must be entered compulsory. By contrast, nothing has to be entered for the optional input.
Additional features (eg. rotation) can be activated when entering optional parameters.
For illustration a small example of a single force
\ load { type }{ insertion point }[ rotation ][ length or included angle ][ loaddistance ];
When entering size values the base unit is always predefined in [cm]. Percentage values % are always
specified as decimal values; for example, 100% = 1.0 and 10% corresponds to 0.1.
Another important note is, that every Tik Z command has to be completed with an semicolon “;”. If
this semicolon is not set, the command can not be performed, this leads finally to an error message
by the compilation.
11
3 Elements
3.2.1 Points
\point{name}{x-coordiante}{y-coordiante};
In order to be able, to place elements, points must be defined previously. For the labeling a
short and precise name should be chosen. Because other elements will reference back to these
points, in the later stages of the construction. Since Tik Z uses Cartesian coordinates, this must
be entered in accordance with the coordinate system. This means that is first entry corresponds
to the x-coordinate and the second to the y-coordinate.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{.5};
\ end { tikzpicture }
The library includes several types of beams and bars. These are determined by the type. To
construct such a beam or bar, two points must first be defined, the starting point and the end
point. Furthermore, is an optional available to round the ends of the bars. [0] or no entry
means the corresponding end of the beam is not rounded, [1] the end is rounded. This option is
especially needed when multiple bars meet with different angles.
Type 1 is a bending beam with characteristic fiber1 . Thereby, the characteristic fiber is
always below the bar, when you follow the input convention mentioned above (start point -
end point).
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ end { tikzpicture }
Type 2 describes a truss rod. Accordingly there is no characteristic fiber. This means, that
order of the input points (starting point - end point) does not matter.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{.5};
\ beam {2}{ a }{ b }[0][1];
\ beam {2}{ b }{ c }[1];
\ end { tikzpicture }
1
The characteristic fiber acts as a local coordinate system of the beam.
Here (type 3) is an invisible bar or beam. Since this is plotted as a dashed lines, there is no
option to round the ends.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{.5};
\ beam {3}{ a }{ b };
\ beam {3}{ b }{ c };
\ end { tikzpicture }
Type 4 has the same look and the same properties as type 1, but no characteristic fiber.
This corresponds to a bending beam without characteristics fiber.
\ begin { tikzpicture }
no rounded end points \ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{.5};
\ beam {4}{ a }{ b };
\ beam {4}{ b }{ c };
\ end { tikzpicture }
\support{type}{insertion point}[rotation];
In the library the most common types of bearings and springs are available. Similar to all
remaining elements the type can be changed by the type variable. Similarly, an insertion point
is required to initialize a bearing or a spring. As an optional parameter the rotation is available.
Here the angle is counted from the x-axis.
\support{1}{insertion point}[rotation];
Type 1 is a fixed bearing, which can absorb both horizontal and vertical forces, but no
moments.
\support{2}{insertion point}[rotation];
Type 2 is a floating bearing, which can absorb forces only in one direction and no moments.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ support {2}{ a };
\ end { tikzpicture }
\support{3}{insertion point}[rotation];
Type 3 is a fixed support which can absorb all forces and moments.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ support {3}{ a };
\ end { tikzpicture }
\support{4}{insertion point}[rotation];
Type 4 is also a fixed support. However, these can only absorb forces in one direction and
moments.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ support {4}{ a }[90];
\ end { tikzpicture }
\support{5}{insertion point}[rotation];
\ begin { tikzpicture }
\ point { a }{0}{0};
\ support {5}{ a };
\ end { tikzpicture }
\support{6}{insertion point}[rotation];
\ begin { tikzpicture }
\ point { a }{0}{0};
\ support {6}{ a }[ -45];
\ end { tikzpicture }
\hinge{type}{insertion point}[optional][optional][optional];
The above described bearings might be combined with the following joints. The library contains
different types of joints. Beside the insertion point, several other parameters are available.
However, the optional parameter are mainly dependent on the type of joint.
\hinge{1}{insertion point};
The basic version of a joint is the type 1. This is a full joint, which requires only an insertion
point.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ hinge {1}{ b };
\ end { tikzpicture }
In addition to the insertion point, for type 2 - the half-hinge - the start and end point have
to be specify, for the purpose of orientation. This information is marked as optional by
[ ], but must be completed in order to generate such a half-hinge. The joint is inserted at
the insertion point and stretches between the start and the end point. The input [0] or no
input in the orientation means that the half-hinge on the lower side, ie on the side of the
characteristic fiber. A [1] in contrast means the exact opposite.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ hinge {2}{ b }[ a ][ c ][1];
\ end { tikzpicture }
\hinge{3}{insertion point}[rotation];
Type 3 describes a shear hinge. There is an additional option for rotating the hinge. The
rotation works similar to the rotation of the supports.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{0}; \ point { c }{4}{0};
\ beam {1}{ a }{ b }; \ beam {1}{ b }{ c };
\ hinge {3}{ b };
\ end { tikzpicture }
\hinge{4}{insertion point}[rotation];
For Type 4, the normal force hinge, applies the same as for the shear hinge.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{0}; \ point { c }{4}{0};
\ beam {1}{ a }{ b }; \ beam {1}{ b }{ c };
\ hinge {4}{ b };
\ end { tikzpicture }
To achieve a stiffening of a corner, the Type 5 is applied. In addition to the insertion point,
type 5 requires the input of the start and the end point, similar to the half hinge. This
information is marked as optional, by [ ], but must be completed in order to generate such
a stiff corner.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ hinge {5}{ b }[ a ][ c ];
\ end { tikzpicture }
The single load command includes both individual forces and moments. To place such an element
it is necessary to define an insertion point. The moments can be plotted in a clockwise or counter
clockwise directional. As an optional parameter the rotation is available. Here the angle is
counted from the x-axis.
\load{1}{insertion point}[rotation][length][loaddistance];
The first type describes a single force. In addition to the optional parameter of rotation,
there is a parameter to change the length of the force, as well as an optional parameter which
regulates the distance to the beam axis. Per default the distance to the beam axis is the
radius of a joint.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ hinge {1}{ b };
\ load {1}{ b }[29.5][.5];
\ load {1}{ a };
\ end { tikzpicture }
Type 2, describes a moment that is oriented clockwise. In addition to the optional param-
eter rotation there is further parameter to specify the included angle and the radius of the
moment.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ load {2}{ b }[0][180];
\ load {2}{ a }[75];
\ end { tikzpicture }
Type 3 describes a moment that is oriented counterclockwise. Otherwise, the same conditions
apply as for type 2.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ load {3}{ b }[0][180];
\ load {3}{ a }[75];
\ end { tikzpicture }
In the library four types of line loads are available. These are determined by their type. Two
points (start and end point) must be defined in advance, similar as with the beam and bar
elements. The optional properties are mainly dependent on the type of the line load.
Type 1 is a linear load that is normal to the beam axis. Optionally, the sizes of the initial
force and the final force can be adjusted. Is one of the parameters set to [0], the result is a
triangular load. The last parameter controls the distance between the individual forces.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ lineload {1}{ a }{ b }[0];
\ lineload {1}{ b }{ c };
\ end { tikzpicture }
For type 2, the forces are parallel to the y-axis. The optional parameters are the same as for
type 1.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ lineload {2}{ a }{ b }[0];
\ lineload {2}{ b }{ c };
\ end { tikzpicture }
Type 3 is a projection of the forces on the beam. In addition to the start and end force size,
the vertical distance to the starting point can also be specified optionally.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ lineload {3}{ a }{ b }[0][1][1];
\ lineload {3}{ b }{ c };
\ end { tikzpicture }
A line load along the bar axis is described by type 4. In addition to the start and end points,
the number of forces and its length can be changed optionally. This line load is always
located above the bar. To change the direction, start and end points must be exchanged.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ lineload {4}{ a }{ b };
\ lineload {4}{ c }{ b }[.3][.25];
\ end { tikzpicture }
3.2.7 Temperatur
\ temperature { initial point }{ end point }{ t e m p e r a t u r e _ b e l o w }{ t e m p e r a t u r e _ a b o v e }
[ t e m p e r a t u r e _ p o s i t i o n ][ t e m p e r a t u r e _ v a l u e _ b e l o w ][ t e m p e r a t u r e _ v a l u e _ a b o v e ]
[ t e x t _ o r i e n t a t i o n _ b e l o w ][ t e x t _ o r i e n t a t i o n _ a b o v e ];
The load temperature is described in its own command, because several optional settings can be
made (see above). Same as with the line loads, the starting point and the end point of the bar has
to be entered, where the temperature load act on. This is followed by the obligatory declaration
of the temperature input variables, starting with the temperature at the bottom side of the bar.
Optionally, the position of the temperature can be changed. By default, the temperature will be
positioned at the center of the beam. Furthermore, there is also the possibility of labeling the
temperature. The entries of the text are equal to a LATEXinput. As a further optional input, the
alignment of the text can be modified. Here, Tik Z commands must be used, these are in section
3.3.1 described.
\ begin { tikzpicture }
Ta 30◦ C \ point { a }{0}{0};
\ point { b }{4}{0};
\ beam {1}{ a }{ b };
\ temperature { a }{ b }{ -.5}{.5}[.3][ $T_i$ ][ $T_a$ ];
Ti 10◦ C \ temperature { a }{ b }{.2}{.7}[.6][ $10 ◦ C$ ][ $30 ◦ C$ ];
\ end { tikzpicture }
Same as with the temperature, there are no different types of internal forces. With this function,
linear and quadratic curves internal forces can be displayed. The entries are made as repeatedly
shown above. First, the start and end points must be determined. Thereafter, the start and end
values must be entered. Optional the parabola down can be enter. If there is no entry or the entry
is equal to [0], than it is a linear function. Also optionally, the color can be determined. Here
the most common colors are available and addressed with the color name. The last optional
parameter is used to edit the parabola down and if necessary to adapt the plot to another
function.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ internalforces { a }{ b }{.5}{ -1}[ -.4][ blue ];
\ internalforces { b }{ c }{ -1}{0};
\ end { tikzpicture }
3.2.9 Dimensioning
Basically, three kinds of dimensions can be distinguished in the program, the horizontal and
vertical dimension and a dimension of a shift. As with the line loads, also here the the start
and end point is required. However, the distance between the the dimension line and the the
corresponding points is not entered directly, but the dimension line refers to the coordinate origin.
Optional a label can be inserted at any dimension line.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{.5};
\ beam {1}{ a }{ b }[0][1]; \ beam {1}{ b }{ c }[1];
\ dimensioning {1}{ a }{ b }{ -.5}[ $2 ~ m$ ];
2m 2m \ dimensioning {1}{ b }{ c }{ -.5}[ $2 ~ m$ ];
\ end { tikzpicture }
\ begin { tikzpicture }
\ point { a }{0}{0};
1m
\ point { b }{2}{1};
\ beam {1}{ a }{ b };
\ dimensioning {2}{ a }{ b }{ -.5}[ $1 ~ m$ ];
\ end { tikzpicture }
With type 3, a shift is marked. Unlike type 1 and 2 the distance is not determined from the
origin, but from the initial point.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1};
∆s \ begin { scope }[ dashed ]
\ support {1}{ a };
\ hinge {1}{ a };
\ end { scope }
\ support {1}{ b }; \ hinge {1}{ b };
\ dimensioning {3}{ a }{ b }{.5}[ $ \ Delta s$ ];
\ end { tikzpicture }
A special case of dimension is the range of the influence line. In addition to the start or end
point of the vertical distance from the starting point must be specified. Optionally the position
of the arrow symbol can be moved.
\ begin { tikzpicture }
\ point { a }{0}{0};
\ point { b }{2}{1};
\ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
\ beam {1}{ b }{ c }[1];
\ influenceline { a }{ c }{1.5}[.4];
\ end { tikzpicture }
\notation{type}{insertion point}{}[][][];
With the element \notation various kinds of labels can be insert. Because different input parameters
are require, these are explained in detail for the individual types. Furthermore, in all types the
optional parameters orientation is used. Here, the Tik Z commands must be used, these are described
in Section 3.3.1.
\notation{1}{insertion point}{labelling}[orientation];
Type 1 is a normal labeling. Only the insertion point and the corresponding text must
be specified. The optional parameter orientation can be changed. The default setting is
above right, which means top right.
\ begin { tikzpicture }
type 1 \ point { a }{0}{0};
\ notation {1}{ a }{ type 1};
\ end { tikzpicture }
\notation{2}{insertion point}{labelling}[orientation];
Type 2 has besides the label additional a line to mark the appropriate place. This line is
always parallel to the y-axis.
\ begin { tikzpicture }
\ point { a }{0}{0};
type 2 \ notation {2}{ a }{ type 2}[ below right ];
\ end { tikzpicture }
Type 3 is an extension of type 2. As with the other line elements the start point and end
point must be specified. The mark is located in the middle of the two points. An optional
parameter is the position of the mark which can be changed.
\ begin { tikzpicture }
type 3 \ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{1};
\ beam {1}{ a }{ b }[0][1];
i \ beam {1}{ b }{ c }[1];
\ notation {3}{ a }{ b }[ $i$ ];
\ notation {3}{ b }{ c }[ type 3][.3][ above right ];
\ end { tikzpicture }
Type 4 is placed on a line, like type 3. Instead of a mark, the text is enclosed in a square.
The other parameters are the same as in type 3. In addition, with the last parameter, the
text alignment can be changed. Is the parameter equal to [1], the text is placed parallel to
the x-axis.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{1};
4 \ beam {1}{ a }{ b }[0][1];
3 \ beam {1}{ b }{ c }[1];
\ notation {4}{ a }{ b }[ $3$ ];
\ notation {4}{ b }{ c }[ $4$ ][.7];
\ end { tikzpicture }
Type 5 corresponds to the types 3 and 4, but here only the text is displayed and no additional
symbols. Thus, the same requirements as in the previous type can be applied.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1}; \ point { c }{4}{1};
4 \ beam {1}{ a }{ b }[0][1];
3 \ beam {1}{ b }{ c }[1];
\ notation {5}{ a }{ b }[ $3$ ][.5][ above ][1];
\ notation {5}{ b }{ c }[ $4$ ][.7];
\ end { tikzpicture }
\notation{6}{insertion point}{labelling};
The last type 6, is similar to the type 1. Only in this case, the text is framed by a circle.
Furthermore, no orientation of the text can be made.
\ begin { tikzpicture }
\ point { a }{0}{0};
+ \ notation {6}{ a }{+};
\ end { tikzpicture }
\addon{type}{insertion point}{}{}[];
Among these elements fall all symbols that you can not assign to the above introduced elements.
Since these types of items require different input parameters, these are explained in detail for
each individual types.
Type 1 is a symbol for parallel bars. First the start and end points of the bar must be
specified and then the positioning of the symbol must be set.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{4}{0};
\ point { c }{0}{1}; \ point { d }{4}{1};
\ beam {2}{ a }{ b }; \ beam {2}{ c }{ d };
\ addon {1}{ a }{ b }{.3};
\ addon {1}{ c }{ d }{.6};
\ end { tikzpicture }
Type 2 represents the symbol of two originally bars. Here, also the insertion point must
be specified in addition to the start and end points. The orientation of the symbol can be
changed, by setting an optional parameter to [−1]
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{0}; \ point { c }{4}{0};
\ point { d }{2}{1};
\ beam {2}{ a }{ c };
\ beam {2}{ b }{ d };
\ addon {2}{ b }{ a }{ d }[ -1];
\ end { tikzpicture }
Type 3 is the symbol for an arbitrary angle. The same approaches as for Type 2 can be
applied. With the optional parameter it can be distinguished between an acute angle or an
obtuse angle. Depending on the case the parameter has to chanced to [−1].
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{3}{0}; \ point { c
}{2.5}{1};
\ beam {2}{ a }{ b };
\ beam {2}{ b }{ c };
\ addon {3}{ b }{ a }{ c }[ -1];
\ end { tikzpicture }
Tik Z provides some useful commands for labels, especially in the context of “nodes”. These commands
can be used in the same way for some labeling elements in this library.
/tikz/above=<offset>
With above the text is placed above a corresponding point. The offset distance can be specified
optional. If no <offset> is specified, the system default values are used.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{0};
above \ notation {1}{ a }{ above }[ above ];
above
\ notation {1}{ b }{ above }[ above =2 mm ];
\ end { tikzpicture }
/tikz/below=<offset>
below positions the text below a selected point, otherwise the same properties as above can be
used.
/tikz/left=<offset>
leftpositions the text left to a selected point, otherwise the same properties as above can be
used.
/tikz/right=<offset>
right positions the text right to a selected point, otherwise the same properties as above can be
used.
/tikz/above left=<offset>
A combination of above and left places the text to the top left over a corresponding point. Simi-
larly, the offset distance can be specified as an option again. If no <offset> specified, the system
defaults are used.
\ begin { tikzpicture }
\ point { a }{0}{0};
above left \ notation {1}{ a }{ above left }[ above left ];
\ end { tikzpicture }
/tikz/above right=<offset>
\ begin { tikzpicture }
above right \ point { a }{0}{0};
\ notation {1}{ a }{ above right }[ above right ];
\ end { tikzpicture }
/tikz/below left=<offset>
/tikz/below right=<offset>
3.3.2 Grouping
All <options> are locally limited to those elements that are within the scope.
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{2}{1};
∆s \ begin { scope }[ dashed , color = red ]
\ support {1}{ a };
\ hinge {1}{ a };
\ end { scope }
\ support {1}{ b }; \ hinge {1}{ b };
\ dimensioning {3}{ a }{ b }{.5}[ $ \ Delta s$ ];
\ end { tikzpicture }
3.3.3 Scaling
This command is not provided in the Tik Z package, but it was written for the library to accordingly
scale the lengths.
/tikz/structuralanalysis/scaling{scalingParameter};
This command only scales the length of the system, i.e. scaling the distances between individual
points. This enables the user to create larger system, but still be printable on paper without
reducing to symbols size.
\ begin { tikzpicture }
\ scaling {.5};
\ point { a }{0}{0}; \ point { b }{4}{0};
\ beam {2}{ a }{ b };
\ support {3}{ a }[ -90]; \ support {3}{ b }[90];
\ end { tikzpicture }
\ begin { tikzpicture }
\ point { a }{0}{0}; \ point { b }{4}{0};
\ beam {2}{ a }{ b };
\ support {3}{ a }[ -90]; \ support {3}{ b }[90];
\ end { tikzpicture }
3.3.4 Guides
To simplify the construction, it is often useful to insert appropriate guides. The distances between
the grid lines can be changed with the command step=<offset>.
\ begin { tikzpicture }
\ draw [ help lines , step =.5] ( -1 , -1) grid (1 ,1) ;
\ point { a }{0}{0};
\ support {1}{ a };
\ hinge {1}{ a };
\ end { tikzpicture }
In the following tutorial, the program code is only shown for the currently treated aspects, because
of the limited space. However, at the end the full code is provided.
In this tutorial, the basic principles of designing with Tik Z and “structuralanalysis” are treated. Step
by Step, a roof structure should be created. The final result is shown below.
3
2, 0
4 5
1
1, 0
2
6 8
S
2, 0
7
3, 0 8, 0 8, 0 3, 0
In order to create the desired roof structure, a file has to be created first. In this example, it is a
LATEX file. However, the library can also be used with TEX and ConTEXfiles.
\ documentclass { scrreprt } % say
\ usepackage { s t r u c t u r a l a n a l y s i s }
\ begin { document }
\ begin { tikzpicture }
% here we construct our structure
\ end { tikzpicture }
\ end { document }
25
4 Tutorial
First, we have to specify corresponding points with the command \point. On this basis, the remaining
library elements are placed. Since the points are not shown in the graph, it is recommended to create
a helping grid, to predict the distances and sizes. The basic size of a grid element is 1 cm by 1 cm.
\ begin { tikzpicture }
\ draw [ help lines ]
(0 ,0) grid (9 ,1) ;
\ end { tikzpicture }
Here, it is obvious that the roof structure with a width of 22 cm does not fit on this page. In
order not to change all the dimensions recalculating all distances, the command scaling can be used.
Hereby, the distances are scaled depending on the desired scaling factor. However, the symbols and
the entries remain unchanged.
Note, since the help grid is a function of Tik Z , the scaling command can not be used for the guides.
If we recalculate the size of the grid we get following situation:
\ begin { tikzpicture }
\ scaling {.45};
\ draw [ help lines , step =.45]
(0 , -.9) grid (9.9 ,1.35) ;
Now the points of the structure can be easily entered. Since the points, as mentioned above, are not
visible, they are identified by illustration as orange dots.
\ point { a }{0}{1};
\ point { b }{3}{1};
\ point { c }{11}{3};
\ point { d }{19}{1};
\ point { e }{22}{1};
\ point { f }{3}{0};
\ point { g }{11}{ -2};
\ point { h }{19}{0};
After the foundation stone was laid by the points, we can start to connect the points with beams
and bars. In the library bars are with or without characteristics fiber available. With the command
\beam they can be brought to “ paper”.
If the edges are not rounded, as it has been happened above, there is no smooth transition of the
beams (see orange dots). However, at these points it does not matter, because in a later phase joints
are placed above.
In order to provide more flexibility, and to keep the number of macros as low as possible, their are own
commands available for the bearings and the joints. Bearings are built with the command \support.
However, the corresponding joint must independently created with the command \hinge. This allows
to combine different bearings with different joints. The important thing is always that the bearing
has to be created first and only then the joints should be implemented. This is necessary, because
Tik Z puts the recently drawn figures on the top.
\ support {1}{ f };
\ support {2}{ h };
After the bearings are created, we can start with drawing the joints. As with most elements the library
provides a set of different types of joints. For instance, the point c is described by a half-joint.
\ hinge {1}{ f };
\ hinge {1}{ h };
\ hinge {1}{ g };
\ hinge {2}{ c }[ b ][ d ];
With the insertion of the joints, the construction is completed and can now be loaded. Besides single
loads \load are line loads \lineload and temperature loads \temperature available.
2, 0 1, 0 2, 0
3, 0 8, 0 8, 0 3, 0
3
2, 0 1, 0 2, 0
4 5
1
6 2 8
S
3, 0 8, 0 8, 0 3, 0
Now the guides can be deleted and the scaling factor can be chosen so that the entire page is filled.
3
2, 0
4 5
1
1, 0
2
6 8
S
2, 0
7
3, 0 8, 0 8, 0 3, 0
3D Library
31
5 Elements
5.1.1 Order
The library provides a number of standard elements available to the user. For example, bearings,
joints, forces, etc. Since Tik Z displayes those elements at the bottom which are entered first, it must
be ensured that the element insert in the correct order. The following order is recommended:
1. Points \dpoint
3. Axis \daxis
5. Joints \dhinge
8. Dimensioning \ddimensioning
9. Labeling \dnotation
5.1.2 Input
In addition to the correct order also the correct input for the elements matters.
Basically, one can distinguish between the mandatory input { } and the optional input [ ]. The first
values must be entered compulsory. By contrast, nothing has to be entered for the optional input.
Additional features (eg. rotation) can be activated when entering optional parameters.
For illustration a small example of a single force
\ dload { type }{ insertion point }[ rotation A ][ rotation B ][ load length ][ load distance ];
When entering size values the base unit is always predefined in [cm]. Percentage values % are always
specified as decimal values; for example, 100% = 1.0 and 10% corresponds to 0.1.
Another important note is, that every Tik Z command has to be completed with an semicolon “;”. If
this semicolon is not set, the command can not be performed, this leads finally to an error message
by the compilation.
33
5 Elements
In the 3D case, a specification is made between elements on a plane and spatial elements. The first
kind of elements are parallel to a coordinate plan, i.e. parallel to xy-plane, xz-plane or yz-plane.
Beside those three coordinate planes, Tik Z also recognizes the planes yx, zx and zy. Hereby, the
difference is that the orientation of the object will change.
All elements are called spatial elements, if there are no parallels to the planes mentioned above. The
orientation of those elements is based on spherical coordinates or with corresponding rotations. Using
spherical coordinates, the first entry always describes the angle form the zenith to the equator, the
second one the angle around the equator.
To ensure a adequate view for the construction of the structure, a initial coordinate system has to
be loaded in the Tik Z environment. This can be done with the option [coords] an looks like this:
\ begin { tikzpicture }[ coords ]
\ end { tikzpicture
With the command \setcoords (see 5.3.3), the orientation of the coordinates can be modified.
5.2.1 Points
\dpoint{name}{x-coordiante}{y-coordiante}{z-coordinate};
In order to be able, to place elements, points must be defined previously. For the labeling a short
and precise name should be chosen. Because other elements will reference back to these points,
in the later stages of the construction. Since Tik Z uses Cartesian coordinates, this must be
entered in accordance with the coordinate system. This means that is first entry corresponds to
the x-coordinate and the second to the y-coordinate and the third to the z-coordinate. Because,
the points are not shown in the drawing, with the command \showpoint (see 5.3.5) there is the
possibility to show the labels of the points.
\ showpoint
z y b \ begin { tikzpicture }[ coords ]
c \ dpoint { a }{0}{0}{0};
a \ dpoint { b }{0}{3}{ -1};
\ dpoint { c }{1.5}{3}{ -1};
x \ end { tikzpicture }
The library includes several types of beams and bars. These are determined by the type. To
construct such a beam or bar, two points must first be defined, the starting point and the end
point. Furthermore, is an optional available to round the ends of the bars. [0] or no entry
means the corresponding end of the beam is not rounded, [1] the end is rounded. This option is
especially needed when multiple bars meet with different angles.
\dbeam{1}{initial point}{end point}[rounded initial point][rounded end point];
Type 1 is a bending beam. In the 3-dimensional space the characteristic fiber1 is renounced.
\ showpoint
\ begin { tikzpicture }[ coords ]
z y b \ dpoint { a }{0}{0}{0};
c \ dpoint { b }{0}{3}{ -1};
a \ dpoint { c }{1.5}{3}{ -1};
\ dbeam {1}{ a }{ b }[0][1];
x \ dbeam {1}{ b }{ c };
\ end { tikzpicture }
Type 2 describes a truss rod. Accordingly there is no characteristic fiber. This means, that
order of the input points (starting point - end point) does not matter.
Here (type 3) is an invisible bar or beam. Since this is plotted as a dashed lines, there is no
option to round the ends.
1
The characteristic fiber acts as a local coordinate system of the beam.
5.2.3 Axes
In principle, both global and local axes are available. In the case of local systems a distinction
is made between axes in a plane and spatial axes. In both, the global as well as at the local axis
systems, with optional parameters the positions and the labels of the axes can be changed. To
change the axis names themselves, the command \setaxis has to be used (see 5.3.4). Using the
command \dscaling{3}{scaling value} it is possible to scale the axes (see 5.3.6).
\daxis{1}{insertion point}[X-orientation][Y-orientation][Z-orientation];
Type 1 is a global coordinate system. Where the insertion point indicates the origin of the
system. With the optional parameters, the orientation of axes label can be changed.
\ daxis {2}{ plane }[ insertion point ][ end point ][ position ][ x - orientation ][ y - orientation ]
[z - orientation ][ change y with z ];
Type 2 this is a local coordinate system of axes in a plane (see 5.1.3). Contrary to the global
axes, a start and end point must be selected. Furthermore, the position of the axis can be
changed. Likewise, the orientation of the labeling is changeable. The last optional parameter
is used to interchange the y with the z axis.
\ daxis {3}{ rotation A }[ insertion point ][ end point ][ position ][ rotation 1][ rotation 2]
[ rotation 3][ rotation B ];
Type 3 describes a local axis in space. Contrary to type 2 not the plane but but the rotations is
specified. With rotation A and B, the position of the local axis system is defined. Both angles
describe the spherical coordinates originating the insert point. With the rotation angles 1, 2 and 3
the local coordinate system is rotated. With angle 1 the axis is rotated around the z-axis. With
angle 2 the rotation around the y-axis is defined. And with angle 3 the rotation of the not yet turned
z-axis is specified. Since the commands are limited to 9 variables, the position of the labels for the
coordinate system must be changed with the command \setaxis{4} (see 5.3.4).
5.2.4 Supports
\dsupport{type}{insertion point}[optional][optional][optional][optional];
In the library the most common types of supports and springs are available. Similar to all
remaining elements the type can be changed by the type variable. Similarly, an insertion point
is required to initialize a bearing or a spring. As an optional parameter the orientation of the
pendulum rod can be changed.
\dsupport{1}{insertion point}[x-direction][y-direction][z-direction];
Type 1 is a fixed support, which can absorb forces in all directions, but no moments. The
pendulum rod can be switched off with the parameter [0]. Respectively, with a negative
value [−1] the direction can be chanced.
\dsupport{2}{insertion point}[plane];
Type 2 is a fixed support which can absorb all forces and moments. This support has to be
placed parallel to an coordinate plane.
\dsupport{3}{insertion point}[x-direction][y-direction][z-direction];
Type 3 is similar to type 1. This fixed support is needed as a base for a forked support (see
5.2.5).
\dsupport{4}{insertion point}[x-direction][y-direction][z-direction];
\dsupport{5}{insertion point}[x-direction][y-direction][z-direction];
\dhinge{type}{insertion point}[optional][optional][optional];
The above described bearings might be combined with the following joints. The library contains
different types of joints. Beside the insertion point, several other parameters are available.
However, the optional parameter are mainly dependent on the type of joint.
\dhinge{1}{insertion point};
The basic version of a joint is the type 1. This is a full joint, which requires only an insertion
point.
In addition to the insertion point, for type 2 - the half-hinge - the start and end point have
to be specify, for the purpose of orientation. This information is marked as optional by [ ],
but must be completed in order to generate such a half-hinge. The joint is inserted at the
insertion point and stretches between the start and the end point. The input [0] or no input
in the orientation means that the half-hinge is placed inside. A [1] in contrast means the
exact opposite.
\dhinge{3}{insertion point}[rotation];
Type 3 describes a forked hinge and has to be used with the commands \dsupport{3} and/or
\dsupport{5}. As additional parameter the rotation of the fork can be chanced.
z y
\ begin { tikzpicture }[ coords ]
\ dpoint { a }{0}{0}{0};
\ dsupport {3}{ a };
x \ dhinge {3}{ a }[35];
\ end { tikzpicture }
To achieve a stiffening of a corner, the Type 4 is applied. In addition to the insertion point,
type 4 requires the input of the start and the end point, similar to the half hinge. This
information is marked as optional, by [ ], but must be completed in order to generate such
a stiff corner.
The single load command includes both individual forces and moments. To place such an element
it is necessary to define an insertion point. The orientation of the singe loads and the moments
are defined by spherical coordinates. As an optional parameter the length of the vector and the
distance to the insertion point can be changed. Per default the distance to the beam axis is the
radius of a joint.
The first type describes a single force. With the optional parameters the orientation can be
changed. Rotation A describes the angle form the zenith to the equator, and rotation B the
angle around the equator.
z
y \ begin { tikzpicture }[ coords ]
60◦ \ dpoint { a }{0}{0}{0};
\ dhinge {1}{ a };
\ dload {1}{ a }[60][30];
30◦ \ end { tikzpicture }
x
Type 3 is similar to type 1, and describes a moment pointing to the insertion point. The
properties are the same as above.
Type 4 is similar to type 2, and describes a moment pointing away from the insertion point.
The properties are the same as above.
In the library four types of line loads are available. These are determined by their type. Two
points (start and end point) must be defined in advance, similar as with the beam and bar
elements. The optional properties are mainly dependent on the type of the line load. The first
four types of line loads are elements on a plane and the last one is an element in space (see
5.1.3).
\ dlineload {1}{ plane }[ plane distance ]{ initial point }{ end point }[ initial force value ]
[ end force value ][ force interval ];
Type 1 is a linear load that is perpendicular to the beam axis. Besides the start and the end
point also the corresponding coordinate plane has to be specified. Optionally, the sizes of
the initial force and the final force can be adjusted. Is one of the parameters set to [0], the
result is a triangular load. The last parameter controls the distance between the individual
forces.
\ dlineload {2}{ plane }[ plane distance ]{ initial point }{ end point }[ initial force value ]
[ end force value ][ force interval ];
For type 2, the forces are parallel the corresponding global axis. The optional parameters
are the same as for type 1.
\ dlineload {3}{ plane }[ plane distance ]{ initial point }{ end point }[ initial force value ]
[ end force value ][ lineload distance from inital point ][ force interval ];
Type 3 is a projection of the forces on the beam. In addition to the start and end force size,
the vertical distance to the starting point can also be specified optionally.
A line load along the bar axis is described by type 4. In addition to the start and end points,
the number of forces and its length can be changed optionally. This orientation depends
on the chosen coordinate plane. To change the direction, start and end points must be
exchanged.
\ dlineload {5}{ rotation A }[ rotation B ]{ initial point }{ end point }[ initial force value ]
[ end force value ][ force interval ];
Type 5 is contrary to the line loads mentioned above, a spatial load and thus independent of
the different coordinate planes. Type 5 is similar to 1 and 2 a force, which is directed to the
beam axis. The optional specification of the rotation angle allow to changed the alignment
of the line load, similar to the single load. Otherwise, the same parameters as above apply.
Type 6 describes as Type 4, a line load along the rod axis. But instead of defining a plane,
for the alignment of the line load, the orientation can be specified with the corresponding
rotation angles (see above). Otherwise, the parameters are the same as by type 4.
With this function, linear and quadratic curves internal forces can be displayed. The entries are
made as repeatedly shown above. First, the start and end points must be determined. Thereafter,
the start and end values must be entered. Optional the parabola down can be enter. If there is
no entry or the entry is equal to [0], than it is a linear function. Also optionally, the color can
be determined. Here the most common colors are available and addressed with the color name.
The last optional parameter is used to edit the parabola down and if necessary to adapt the plot
to another function.
5.2.9 Dimensioning
\ ddimensioning { plane }[ plane distance ]{ initial point }{ end point }{ distance from point of origin
}
[ measure ][ help line length ];
Basically, due to the right choice of the coordinate plane, all dimensions can be distinguished in
the program. As with the line loads, also here the the start and end point is required. However,
the distance between the the dimension line and the the corresponding points is not entered
directly, but the dimension line refers to the coordinate origin. Therefore, it is necessary to
specify the coordinate plane. Optional a label can be inserted at any dimension line. Also some
help lines for the dimension can be plotted.
\dnotation{type}{insertion point}{obligatory}[optional][optional][optional][optional];
With the element \dnotation various kinds of labels can be insert. Because different input param-
eters are require, these are explained in detail for the individual types. Furthermore, in all types
the optional parameters orientation is used. Here, the Tik Z commands must be used, these are
described in Section 3.3.1.
\dnotation{1}{insertion point}{labelling}[orientation];
Type 1 is a normal labeling. Only the insertion point and the corresponding text must
be specified. The optional parameter orientation can be changed. The default setting is
above right, which means top right.
\dnotation{2}{insertion point}{labelling}[orientation];
Type 2 has besides the label additional a line to mark the appropriate place.
Type 3 is an extension of type 2. As with the other line elements the start point and end
point must be specified. The mark is located in the middle of the two points. An optional
parameter is the position of the mark which can be changed.
Type 4 is placed on a line, like type 3. Instead of a mark, the text is enclosed in a square.
The other parameters are the same as in type 3. In addition, with the last parameter, the
text alignment can be changed. Is the parameter equal to [1], the text is placed parallel to
the z-axis.
\ begin { tikzpicture }[ coords ]
z y \ dpoint { a }{0}{0}{0}; \ dpoint { b }{0}{3}{ -1};
4 \ dpoint { c }{1.5}{3}{ -1};
3 \ dbeam {1}{ a }{ b }[0][1]; \ dbeam {1}{ b }{ c };
\ dnotation {4}{ a }{ b }[ $3$ ];
x \ dnotation {4}{ b }{ c }[ $4$ ][.7];
\ end { tikzpicture }
Type 5 corresponds to the types 3 and 4, but here only the text is displayed and no additional
symbols. Thus, the same requirements as in the previous type can be applied.
\dnotation{6}{insertion point}{labelling};
The last type 6, is similar to the type 1. Only in this case, the text is framed by a circle.
Furthermore, no orientation of the text can be made.
\daddon{type}{plane}[plane distance]{obligatory}{obligatory}{obligatory}[optional];
Among these elements fall all symbols that you can not assign to the above introduced elements.
Since these types of items require different input parameters, these are explained in detail for each
individual types. However, all elements have in common that the corresponding coordination
plane must be specified (see 5.1.3).
\daddon{1}{plane}[plane distance]{insertion point}{end point}{position};
Type 1 is a symbol for parallel bars. First the start and end points of the bar must be
specified and then the positioning of the symbol must be set.
Type 2 represents the symbol of two originally bars. Here, also the insertion point must
be specified in addition to the start and end points. The orientation of the symbol can be
changed, by setting an optional parameter to [−1]
Type 3 is the symbol for an arbitrary angle. The same approaches as for Type 2 can be
applied. With the optional parameter it can be distinguished between an acute angle or an
obtuse angle. Depending on the case the parameter has to chanced to [−1].
Tik Z provides some useful commands for labels, especially in the context of “nodes”. These commands
can be used in the same way for some labeling elements in this library.
/tikz/above=<offset>
With above the text is placed above a corresponding point. The offset distance can be specified
optional. If no <offset> is specified, the system default values are used.
\ begin { tikzpicture }
\ dpoint { a }{0}{0}{0}; \ dpoint { b }{2}{0}{0};
above \ dnotation {1}{ a }{ above }[ above ];
above
\ dnotation {1}{ b }{ above }[ above =2 mm ];
\ end { tikzpicture }
/tikz/below=<offset>
below positions the text below a selected point, otherwise the same properties as above can be
used.
/tikz/left=<offset>
leftpositions the text left to a selected point, otherwise the same properties as above can be
used.
/tikz/right=<offset>
right positions the text right to a selected point, otherwise the same properties as above can be
used.
/tikz/above left=<offset>
A combination of above and left places the text to the top left over a corresponding point. Simi-
larly, the offset distance can be specified as an option again. If no <offset> specified, the system
defaults are used.
\ begin { tikzpicture }
\ dpoint { a }{0}{0}{0};
above left \ dnotation {1}{ a }{ above left }[ above left ];
\ end { tikzpicture }
/tikz/above right=<offset>
\ begin { tikzpicture }
above right \ dpoint { a }{0}{0};
\ dnotation {1}{ a }{ above right }[ above right ];
\ end { tikzpicture }
/tikz/below left=<offset>
/tikz/below right=<offset>
5.3.2 Grouping
All <options> are locally limited to those elements that are within the scope.
This following commands are not provided in the Tik Z package, but they were written for the library
to simplify the handling of elements.
5.3.3 setcoords
/tikz/setcoords{x-angle}{y-angle}[x-direction][y-direction][z-direction][z-angle]
In order to choose an appropriate view, the coordinate system can be rotated and scaled. How-
ever, this must be done before the tikzpicture environment is started. The angles are measured
from the horizon.
z
\ setcoords { -130}{ -10}[.5][.7][.5]
\ begin { tikzpicture }[ coords ]
y \ dpoint { a }{0}{0}{0};
\ daxis {1}{ a };
\ end { tikzpicture }
x
5.3.4 setaxis
/tikz/setaxis{type}[optional][optional][optional][optional][optional][optional]
This command can change the orientation of the axes labeling. This applies to both global and
local axes systems.
\setaxis{1}
Type 1 sets the labeling back to the default settings. Thereby, global axes are labeled with
x, y and z, and local axes with x0 y 0 und z 0 .
z \ setaxis {1}
y0 y \ begin { tikzpicture }[ framed , coords ]
x0 \ dpoint { a }{0}{0}{0};
\ dpoint { b }{0}{2}{0};
z0 \ daxis {1}{ a }[ right ][ above right ][ left ];
\ daxis {2}{ yz }[ a ][ b ][.2][ above ][ above ][ right ];
x \ end { tikzpicture }
\setaxis{2}
With type 2 global axes are labeled with X, Y and Z, and locale axes with x y and z.
Z \ setaxis {2}
y Y \ begin { tikzpicture }[ framed , coords ]
x \ dpoint { a }{0}{0}{0};
\ dpoint { b }{0}{2}{0};
z \ daxis {1}{ a }[ right ][ above right ][ left ];
\ daxis {2}{ yz }[ a ][ b ][.2][ above ][ above ][ right ];
X \ end { tikzpicture }
\setaxis{3}[X-labelling][Y-labelling][Z-labelling][x-labelling][y-labelling][z-labelling]
Using type 3 the labeling of the global and local axes can be chosen individually.
\setaxis{4}[x-orientation][y-orientation][z-orientation];
With type 4 the orientation of the labels for the local and the global axes can be changed.
5.3.5 showpoint
/tikz/showpoint
With the command /showpoint, the labels of the according points can be displayed. This allows
an easier overview, especially for complex systems.
\ showpoint
\ begin { tikzpicture }[ coords ]
b \ dpoint { a }{0}{0}{0};
c \ dpoint { b }{0}{3}{ -1};
\ dpoint { c }{1.5}{3}{ -1};
a \ dbeam {1}{ a }{ b }[0][1];
\ dbeam {1}{ b }{ c };
\ end { tikzpicture }
5.3.6 dscaling
/tikz/dscaling{type}{scalingParameter};
/dscaling{1}{scalingParameter};
The type 1 command only scales the length of the system, i.e. scaling the distances between
individual points. This enables the user to create larger system, but still be printable on
paper without reducing to symbols size.
\ begin { tikzpicture }
\ dpoint { a }{0}{0}{0}; \ dpoint { b }{2}{0}{0};
\ dbeam {1}{ a }{ b }; \ dhinge {1}{ a }; \ dhinge {1}{ b };
\ dscaling {1}{2};
\ dpoint { a }{0}{ -.5}{0}; \ dpoint { b }{2}{ -.5}{0};
\ dbeam {1}{ a }{ b }; \ dhinge {1}{ a }; \ dhinge {1}{ b };
\ end { tikzpicture }
/dscaling{2}{scalingParameter};
\ begin { tikzpicture }
\ dpoint { a }{0}{0}{0}; \ dsupport {1}{ a }; \ dhinge {1}{
a };
\ dscaling {2}{.7};
\ dpoint { b }{1.7}{0}{0}; \ dsupport {1}{ b }; \ dhinge {1}{
b };
\ dscaling {2}{.5};
\ dpoint { c }{3}{0}{0}; \ dsupport {1}{ c }; \ dhinge {1}{
c };
\ end { tikzpicture }
/dscaling{3}{scalingParameter};
In the following tutorial, the program code is only shown for the currently treated aspects, because
of the limited space. However, at the end the full code is provided.
In this tutorial, the basic principles of designing 3D structures with Tik Z and “stanli” are treated.
Step by Step, a structural design should be created. The final result is shown below.
Z
q = 10 kN/m
Y 3m
3m
X
A
C 3m
3m
3m
In order to create the desired structural design, a file has to be created first. In this example, it is a
LATEX file. However, the library can also be used with TEX and ConTEXfiles.
\ documentclass { scrreprt }
\ usepackage { stanli }
\ begin { document }
\ begin { tikzpicture }[ corrds ]
% here we construct our structure
\ end { tikzpicture }
\ end { document }
49
6 Tutorial
6.1.2 Preparation
Before starting the construction, relevant settings has to be made in advance. Among others, a new
coordinate system with \setcoords will be introduced. Likewise, the labeling of the global and local
axes can be changed.
\ setcoords { -25}{10}[1][1.2]
\ setaxis {2}
\ begin { tikzpicture }[ corrds ]
% here we construct our structure
\ end { tikzpicture }
First, we have to specify corresponding points with the command \dpoint. On this basis, the remaining
library elements are placed. Since the points are not shown in the graph, it is recommended to display
the point labels during the construction phase. This can be done with the command \showpoint.
f
a
g
b
h
c
i
d
j
e
\ setcoords { -25}{10}[1][1.2]
\ setaxis {2}
\ showpoint
\ begin { tikzpicture }[ coords ]
% Points
\ dpoint { a }{0}{0}{0}; \ dpoint { b }{3}{0}{0}; \ dpoint { c }{6}{0}{0}; \ dpoint { d }{9}{0}{0};
\ dpoint { e }{12}{0}{0}; \ dpoint { f }{0}{3}{0}; \ dpoint { g }{3}{3}{0}; \ dpoint { h }{6}{3}{0};
\ dpoint { i }{9}{3}{0}; \ dpoint { j }{12}{3}{0};
After the foundation stone was laid by the points, we can start to connect the points with beams
and bars. In the library different beams and bars are available. With the command \dbeam they can
be brought to “ paper”.
f
a
g
b
h
c
i
d
j
e
% Beams
\ dbeam {1}{ f }{ b }; \ dbeam {1}{ b }{ h }; \ dbeam {1}{ h }{ d }; \ dbeam {1}{ d }{ j };
\ dbeam {3}{ a }{ e }; \ dbeam {3}{ f }{ j }; \ dbeam {3}{ a }{ f }; \ dbeam {3}{ b }{ g };
\ dbeam {3}{ c }{ h }; \ dbeam {3}{ d }{ i }; \ dbeam {3}{ e }{ j };
In order not to lose the overview, it is advisable to display a global axis system already at the
beginning. The local axes can be added later.
f
Y
a
g
X b
h
c
i
d
j
e
f
Y
a
g
X b
h
c
i
d
j
e
% Supports
\ dsupport {1}{ b }; \ dsupport {1}{ h }[0][0]; \ dsupport {1}{ d }[0];
% Joints
\ dhinge {2}{ b }[ f ][ h ][1]; \ dhinge {2}{ h }[ b ][ d ][1]; \ dhinge {2}{ d }[ h ][ j ][1];
6.1.7 Loads
With the insertion of the joints, the construction is completed and can now be loaded. Besides single
loads \dload are line loads \dlineload available. Because the loads are not parallel to one of the main
coordinate plains, a line load in space (type 5) has to be used.
f
Y
a
g
X b
h
c
i
d
j
e
% Loads
\ dlineload {5}{0}{ f }{ b } [.5 ][.5 ][.1 1]; \ dlineload {5}{0}{ b }{ h }[ .5][ .5][ .11] ;
\ dlineload {5}{0}{ h }{ d } [.5 ][.5 ][.1 1]; \ dlineload {5}{0}{ d }{ j }[ .5][ .5][ .11] ;
6.1.8 Dimensions
Actually, the structural design is already finished and ready for use. However, for the purpose of an
overview, we can include the corresponding measures with the command \ddimensioning.
f 3m
Y
a
g
3m
X b
h 3m
c
i 3m
d
j
e 3m
% Dimensions
\ ddimensioning { xy }{ f }{ g }{4.5}[ $3 ~ m$ ]; \ ddimensioning { xy }{ g }{ h }{4.5}[ $3 ~ m$ ];
\ ddimensioning { xy }{ h }{ i }{4.5}[ $3 ~ m$ ]; \ ddimensioning { xy }{ i }{ j }{4.5}[ $3 ~ m$ ];
\ ddimensioning { yx }{ e }{ j }{13}[ $3 ~ m$ ];
Z
q = 10 kN/m
f 3m
Y
a
g
3m
X b
A h
C 3m
c
i 3m
d
B j
e 3m
% Labels
\ dnotation {1}{ f }{ $q =10~ kN / m$ }[ above left =3 mm ]; \ dnotation {1}{ b }{ $A$ }[ below left ];
\ dnotation {1}{ h }{ $C$ }[ right =2 mm ]; \ dnotation {1}{ d }{ $B$ }[ below left ];
Now the point labeling can be switched off and the construction is finished.
Z
q = 10 kN/m
Y 3m
3m
X
A
C 3m
3m
3m
% Points % Joints
\ dpoint { a }{0}{0}{0}; \ dhinge {2}{ b }[ f ][ h ][1];
\ dpoint { b }{3}{0}{0}; \ dhinge {2}{ h }[ b ][ d ][1];
\ dpoint { c }{6}{0}{0}; \ dhinge {2}{ d }[ h ][ j ][1];
\ dpoint { d }{9}{0}{0};
\ dpoint { e }{12}{0}{0};
\ dpoint { f }{0}{3}{0}; % Loads
\ dpoint { g }{3}{3}{0}; \ dlineload {5}{0}{ f }{ b } [.5 ][.5 ][.1 1];
\ dpoint { h }{6}{3}{0}; \ dlineload {5}{0}{ b }{ h } [.5 ][.5 ][.1 1];
\ dpoint { i }{9}{3}{0}; \ dlineload {5}{0}{ h }{ d } [.5 ][.5 ][.1 1];
\ dpoint { j }{12}{3}{0}; \ dlineload {5}{0}{ d }{ j } [.5 ][.5 ][.1 1];