Vous êtes sur la page 1sur 41

# 1.

Introduction
The modeling of historical buildings requires a lot of ornamental details that are not or much less
found in modern buildings:
• Columns (including twisted columns)
• Balusters
• Cornices
• Arches
• Friezes
• Towers

This note is a primer for a novice user who needs to create such special components with
Archicad GDL and shows how they can be parameterized. The GDL reference guide is online at
http://www.graphisoft.com/ftp/gdl/manual/14/wwhelp/wwhimpl/js/html/wwhelp.htm

There exists add-ons that can make things much easier but they are not really indispensable.
(ex. archiforma, archiwall from Cygraph)
http://www.cigraph.it/cigraph/pagetrans.do?lang=en&action=prodotti_demo&prodotti_id=2
These add-ons are not explained here.

The increased level of detail also requires more calculations by Archicad. Therefore it is
important to keep performance in mind. We will investigate the impact of modeling on
performance.

Before start modeling, we explain the basic notion of “polyline” and the more advanced
parameter calculations and “parameter buffer”. The concept of a polyline is used in the many
object definitions. The calculation of parameters and the concept “parameter buffer” are used in
parametric objects and more advanced programming.

Remarks :
• Do not try to make any drawing “from your head”. Start by making a clear sketch of what is
important (ex. cross sections) in a coordinate system, indicate points and note coordinates.
This makes it possible to easily read the coordinates.
• ArchiCAD GDL is not user friendly. The error messages do not always give you a clue of
what could be wrond. Typical errors are too many or not enough parameters – decimal
numbers not correctly entered (the decimal sign must be zero). This can be frustrating – do
not give up.
• If you do not see the problem, try to create a more simplified model with less points – look
experimenting with changes on working examples so that you better understand
parameters.
• The text below focuses on 3D scripts. It is however important to understand that you always
need a 2D script as well so that you can position the object on a plan. The 2D script must be
kept as simple as possible and does not need to have much detail. It should just make it
possible to correctly position the object and to recognize what object it is.
• Adopt a consistent programming style :
Graphisoft has published some guidelines for professional ArchiCAD users. These are not
mandatory and if you want you can choose a style of your own. It is however important that
you consistenly work in the same way :
• If you prefer to indicate an amount with the prefix nr (ex. nrPoints for number of points),
then do it always that way.
• If you write ArchiCAD keywords in uppercase (as preferred in the cookbook), always
write them in uppercase.
• Use meaningfull self explaining variable names – no short acronymns.
• If a variable consists of 2 or more words, then it is common in programming to start the
first word in lowercase and the next words in uppercase. Ex. upperLeftCorner.
• Add sufficient comment so that you can later easily understand what parameters mean.

1
2
2. Concepts
b. Polyline
A polyline is nothing more than a line consisting of multiple line segments. It is defined by a
series of points that are interconnected, either by straight lines or arc segments. The additional
status codes allow to create arc segments.
GDL Reference Guide > Status Codes > Additional Status Codes

We will demonstrate the polyline in 2D using POLY2_. We neglect the fill and concentrate on the
contour line.

## Example 1 : basic polyline with straight segments

POLY2_ 6, ! The polyline is defined by 6 points
1, ! Only the contour is displayed - there is no fill inside
! Now the points are defined with coordinates x,y
! The third parameter 1 means segment starting from there is visible
! If you specify 0, the segment that starts there is invisible
0, 0, 1, ! Point 1 0,0
4, 0, 1, ! Point 2 4,0
7, 3, 1, ! Point 3 7,3
7, 7, 1, ! Point 4 7,7
0, 7, 1, ! Point 5 0,7
0, 0, 0 ! Point 6 0,0

## If we specify a zero as third parameter for point 7,3 :

7, 3, 0, ! Point 3 7,3

## Then the 3th segment starting at 7,3 is omitted and invisible

3
Example 2 : Polyline with an arc segment.
We will not only define points but also add information on the arc segment. As a result, we will
have 7 defining lines.
There are several possibilities to draw an arc segment. We will define the centerpoint of the arc
and the endpoint. The startpoint is the point before we started the arc definition.

## POLY2_ 7, ! The polyline is defined by 7 instructions

1, ! Only the contour is displayed - there is no fill inside
! Now the points are defined with coordinates x,y and special lines for the arc
! The third parameter 1 means segment starting from there is visible
! If you specify 0, the segment that starts there is invisible
0, 0, 1, ! Point 1 0,0
4, 0, 1, ! Point 2 4,0
! We define an arc segment :
4, 3, 900, ! Use code 900 to define the centerpoint of the arc at 4,3
7, 3, 3001, ! Use code 3000 to draw the arc from previous point 2 to endpoint 7,3
! The code to draw the arc is 3000 - we add the code 1 to make the next segment visible
7, 7, 1, ! Point 4 7,7
0, 7, 1, ! Point 5 0,7
0, 0, 0 ! Point 6 0,0

## Example 2 : Polyline with 2 arc segments.

We can define consecutive arc segments.

## POLY2_ 8, ! The polyline is defined by 8 instructions

1, ! Only the contour is displayed - there is no fill inside
0, 0, 1, ! Point 1 0,0
4, 0, 1, ! Point 2 4,0
! We define an arc segment :
4, 3, 900, ! Define the centerpoint of the arc at 4,3
7, 3, 3001, ! Draw the arc from previous point 2 to endpoint 7,3
! The code to draw the arc is 3000 - we add the code 1 to make the next segment visible
! We define an arc segment :
7, 5, 900, ! Define the centerpoint of the arc at 7,5
7, 7, 3001, ! Draw the arc from previous point 2 to endpoint 7,7
! The code to draw the arc is 3000 - we add the code 1 to make the next segment visible
0, 7, 1, ! Point 5 0,7
0, 0, 0 ! Point 6 0,0

4
Example 3 : Polyline with 2 arc segments and direction specified
In the previous example, the arc is bulging out. It is also possible to have it “bulging in” by
defining the direction of the arc segment in point 7,3. In that case we only have to specify the
endpoint – the centerpoint will be automatically be calculated by ArchiCAD.

POLY2_ 8,
1,
0, 0, 1,
4, 0, 1,
! We define an arc segment by centerpoint and end point
4, 3, 900, ! Define the centerpoint of the arc at 4,3
7, 3, 3001, ! Draw the arc from previous point 2 to endpoint 7,3
! The code to draw the arc is 3000 - we add the code 1 to make the next segment visible
! We define an arc segment by tangens in the startpoint and end point
-1, 0, 800, ! Define the tangens (direction) of the arc in the startpoing by dx=-1 dy=0
7, 7, 1001, ! Draw the arc from previous point 7,3 to endpoint 7,7
0, 7, 1,
0, 0, 0

## Example 4 : Polyline with 2 arc segments and direction specified

As a variation on example 3, we define another direction dx = -1, dy = 1
So, -1, 1, 800,

5
1.2 Parameter and parameter buffers
The creation of GDL objects exists in calling “GDL-functions” with a series of parameters.
Take a simple example :
POLY2_ 5, 1,
0, 0, 1,
1, 0, 1,
1, 1, 1,
0,1, 1,
0,0, 1

In the simple example above, we only used a small number of fixed parameters.
The parameters need not be fixed but can be calculated. If we want to make the object scalable
we can introduce a parameter scale and write
POLY2_ 5, 1,
0, 0, 1,
1*scale, 0*scale, 1,
1*scale, 1*scale, 1,
0*scale,1*scale, 1,
0, 0, 1

For really complex objects, a large number of points need to be calculated. We could just
calculate the points beforehand and then introduce the results one by one them as parameters
to the GDL-function. Fortunately GDL offers a more easy way. We can calculate the points
before, let GDL remember each point in a memory buffer and then let GDL pass all results as
parameters.

## This item is presented in the GDL reference in paragraph

GDL Reference Guide > Control Statements > Flow Control Statements

## As an example of this, we use POLY2_ to draw an ellipse defined by

x = 3. cos θ
y = 2. sin θ

We can easily program the calculation of 36 values - one each 10° - and store them in a memory
buffer using the command PUT.

for i = 1 to 36
PUT 3*cos(10*i) ! calculate x coordinate and PUT it in a memory buffer
PUT 2*sin(10*i) ! calculate y coordinate and PUT it in a memory buffer
PUT 1 ! PUT also the 3th parameter on each line in the POLY_2
next i

After this operation, the memory buffer contains the 36*3=108 parameter values for the POLY2_
command. We can now pass them all 108 to POLY_2 by retrieving them from the memory buffer
using the command GET (108). The call to POLY_2 then becomes :

## POLY2_ 108, 1, GET (108)

Using this technique we do not have to note down 108 points one by one.
After the call of GET, the 108 values are no longer available in the memory buffer. It is also
possible to read values from the buffer while keeping them in the buffer.

6
3. Columns
c. Colums with fixed diameter
Columns with a fixed diameter of any form can be created by
• using basic shapes like CYLIND, BRICK, PRISM (several variants)
• by defining the cross section with EXTRUDE, TUBE.
• by defining the outline of the column with REVOLVE.

## Ex. CYLIND and BRICK

CYLIND 5, ! Height
BRICK 1, ! width
2, ! depth
5 ! height

Ex. PRISM
With PRISM and its more complex variants, we can define arbitrary cross sections. The contours
of the cross section are defined with a polyline. PRISM is limited to polylines with straight line
segments.

## In example below the polyline is defined by 7 points.

PRISM 7, ! 7 points for the polyline of the cross section
5, ! Height 5
0, 0,
1, 0,
2, 1,
1, 2,
0, 2,
-1, 1,
0, 0

7
Ex. PRISM_

## PRISM_ is an extension of PRISM where additional status codes allow to

• Create arc segments
• Control the visibility of edges and surfaces
• Define holes

## PRISM_ 6, ! The cross section is a polyine described by 6 instructions

5, ! The height of the column is 5
0, 0, 15, ! First point of the polyline cross section
1, 0, 15, ! Second point of the polyline cross section
1, 0.5, 900, ! We define an arch with centerpoint at 1, 1.5
1, 1, 3015, ! The arch is drawn with endpoint 1,1
0, 1, 15, ! Next point
0, 0, 0 ! Next point

## Next to each x, y coordinate we now specify status code 15 in order to :

• Display the contour line at top and bottom for the segment starting at that point
• Display the side faces for the segment starting at that point
• Display the vertical edges for the segment starting at that point
The different possible values for status codes are described in the reference guide.

## The resulting cross section and column :

Imagine that we do not want to see the first face starting at 0,0.
We define a status code 0 for point 0,0. The result is :

As can be seen in the picture, the rounded face approximated by a number of straight surfaces.
The smoothness of the rounding can be enhanced by increasing the resolution using the
command RESOL.

## RESOL 128 results in a much smoother surface.

8
There are still a large number of variants to PRISM. CPRISM_ for example allows to define the
materials of top, side, bottom. The other variants allow to specify top and bottom surfaces and
are not interesting for columns.

Ex. EXTRUDE

We can use EXTRUDE in a similar way as PRISM in order to define the cross section.
The usage of flags and status to control visibility is different. We can define a displacement of
bottom and top surface

## EXTRUDE 6, ! The cross section is a polyine described by 6 instructions

0, 0, 5, ! The x,y,z coordinates of displacement - height of the column is 5
1+2+4+16+32, ! Flags that dermine visibiity
! 1: base surface is present.
! 2: top surface is present.
! 4: side (closing) surface is present.
! 16: base edges are visible.
! 32: top edges are visible
0, 0, 1, ! First point of the polyline cross section
! The additional parameter 1 means that edge is not drawn
! but only used to display the contour
1, 0, 1, ! Second point of the polyline cross section
1, 0.5, 901, ! We define an arch with centerpoint at 1, 1.5
1, 1, 3001, ! The arch is drawn with endpoint 1,1
0, 1, 1, ! Next point
0, 0, 1 ! Next point

## The resulting column :

If we want to explicitly display the lateral edges, we specify 0 as third parameter for each point ;

9
By specifying non zero values for the x and y displacement, we can add an incliniation to the
column although that is not required for most columns.
If we specify 1,1,5

## As a more interesting example of fixed diameter column, we investigate a typical Roman

column.

-270°
-240° -300°

-210° 30°

Point 1

Centerpoint 1
-180°

Point 4 Point 2

-150°
Point 3 Centerpoint2 -30°

-120° -60°
-90°

We start at point 1 in the picture. That point is located at 30° on a radius of 4. So, the
coordinates are 4 cos30° , 4 sin 30°.
> 4*cos(30), 4*sin(30), 1, ! Define startpoint 1 on circle at radius 4 and angle 30°

In order to define an arc segment to point 2, we first define a centerpoint for the arc. The
centerpoint 1 is located at 0° on a radius of 5. So the coordinates are 5cos 0°, 5 sin 0°.
> 5*cos(0), 5*sin(0), 900, ! Define centerpoint of an arch at radius 5 and at angle 0°

We then draw an arch till point 2, located at -30° on a radius of 4. The coordinates of this point
are 4.cos(-30°), 4.sin(-30°).
> 4*cos(-30), 4*sin(-30), 3001, ! Draw the arch from point 1 to point 2 located at radius 4 and angle -30°

## We continue by defining centerpoints and endpoints for the arches.

10
Centerpoints and endpoints follow each other by 30°. When we are back to the start, we have
defined 7 points (with startpoint = endpoint) and 6 centerpoints.

! Example of extruded polyline using arches defined by startpoint - endpoint and centerpoint
! To define a centerpoint - use code 900
! To draw an arch from previous point to a new point x,y - use code 3000

## EXTRUDE 13, 0, 0, 40, 1+2+4+16+32,

4*cos(30), 4*sin(30), 1, ! Define startpoint 1 on circle at radius 4 and angle 30°
5*cos(0), 5*sin(0), 900, ! Define centerpoint of an arch at radius 5 and at angle 0°
4*cos(-30), 4*sin(-30), 3001, ! Draw the arch from point 1 to point 2 located at radius 4 and angle -30°
5*cos(-60), 5*sin(-60), 900, ! Define centerpoint of an arch at radius 5 and at angle -60°
4*cos(-90), 4*sin(-90), 3001, ! Draw the arch from point 2 to point 3 located at radius 4 and angle -90°
5*cos(-120), 5*sin(-120), 900, ! Define centerpoint of an arch at radius 5 and at angle -120°
4*cos(-150), 4*sin(-150), 3001, ! Draw the arch from point 3 to point 4 located at radius 4 and angle -150°
5*cos(-180), 5*sin(-180), 900, ! Define centerpoint of an arch at radius 5 and at angle -180°
4*cos(-210), 4*sin(-210), 3001, ! Draw the arch from point 4 to point 5 located at radius 4 and angle -210°
5*cos(-240), 5*sin(-240), 900, ! Define centerpoint of an arch at radius 5 and at angle -240°
4*cos(-270), 4*sin(-270),3001, ! Draw the arch from point 5 to point 6 located at radius 4 and angle -270°
5*cos(-300), 5*sin(-300), 900, ! Define centerpoint of an arch at radius 5 and at angle -300°
4*cos(-330), 4*sin(-330), 3001 ! Draw the arch from point 6 to point 7 located at radius 4 and angle -330°

## The resulting cross section and column :

We can easily generalize this by programming the calculations and use put/get commands to
store/retrieve elements from a memory stack. We first need to define a starting point and then
use a loop to create 6 centerpoints and arc endpoints. Each point is shifted by 30°.
height =40
nrSides =6

! we will shift each time with 360/(NrSides*2) - in case nrSides=6, we will shift each 30°
angleStep = 360/(NrSides*2)

## ! we start the first point at angleStep

angle = angleStep
! PUT the parameters for the startpoint on the memory buffer
PUT 4*cos(angle), 4*sin(angle), 1

## FOR nr=1 TO nrSides

! Go angleStep degrees further and PUT 3 parameters for the Centerpoint on the memory buffer
angle = angle - angleStep
PUT 5*cos(angle), 5*sin(angle), 900

! Go angleStep degrees further and PUT 3 parameters for the arc end point on the memory buffer
angle = angle - angleStep
PUT 4*cos(angle), 4*sin(angle), 3001
NEXT nr

! We have 1 defining line for the startpoint + 2 defining lines per side (centerpoint and arc andpoint)
! Each defining line has 3 values
nrDefiningLines = 1+2*nrSides
nrDefiningValues = 3*nrDefiningLines

## ! Call EXTRUDE and retrieve parameters from memory buffer

EXTRUDE nrDefiningLines, 0, 0, height, 1+2+4+16+32, GET (nrDefiningValues)

This script has exactly the same result. The advantage is that we can choose another value for
the number of Sides. Ex. 16 sides gives us a more realistic Roman column.

11
The only thing that we still have to parameterize is the radiuses of the defining points and
this as radius R for the defining points and radius R*1,25 for the centerpoints.
The factor 1.25 is arbitrary choosen and somehow determines the depth of the notches.

## The final script then becomes :

! Parameters that can be changed
height=40
nrSides=20

## !Start object creation

! we will shift each time with 360/(NrSides*2) - in case nrSides=6, we will shift each 30°
angleStep = 360/(NrSides*2)

## ! we start the first point at angleStep

angle = angleStep
!Startpoint

## FOR nr=1 TO nrSides

! Go angleStep degrees further and PUT 3 parameters for the Centerpoint on the memory buffer
angle = angle - angleStep

! Go angleStep degrees further and PUT 3 parameters for the arc endpoint on the memory buffer
angle = angle - angleStep
next nr

! We have 1 defining line for the startpoint + 2 defining lines per side (centerpoint and arc andpoint)
! Each defining line has 3 values
nrDefiningLines = 1+2*nrSides
nrDefiningValues = 3*nrDefiningLines
EXTRUDE nrDefiningLines, 0, 0, height, 1+2+4+16+32,GET(nrDefiningValues)

We can easily derive an interesting variant of this type of columns by putting the center points on
a radius smaller than the defining points.
Ex.
nrSides=6

## Delivers the following cross section.

12
Ex. REVOLVE

With revolve we can turn a line around an axis so that it generates a surface.
The simpliest example is where the line only exists of 2 points with x,y coordinates.
This line is revolved around the x-axis and generates a flat lying column
! Simpliest column with revolve
REVOLVE 2, ! Polyline of 2 points
360, ! Revolve 360°
1+2, ! Flag 1= base present Flag 2 = bnd present.
0, 1, 0, ! Point 1
10, 1, 0 ! Point 2

If we rotate this by -90° around the y-axis (roty -90°), then the columns is standing up.

## ! Simpliest column with revolve

Roty -90
REVOLVE 2, ! Polyline of 2 points
360, ! Revolve 360°
1+2, ! Flag 1= base present Flag 2 = bnd present.
0, 1, 0, ! Point 1
10, 1, 0 ! Point 2

13
3.2 Columns with variable diameter
Columns with a variable diameter are created with the commands CONE, FPRISM and
REVOLVE.

Using CONE and FRISM we can create simple columns were the diameter of the cross section
varies linearly from bottom to top. REVOLVE offers much more possibilities and allows to create
any round column with varying diameter of cross sections.

height=10
! parameters 90 are inclination of top and bottom surface compared to z-axis.

Ex. FPRISM

FRISM makes it possible to define a PRISM where the top cross section is smaller than the
bottom cross section.

## DEFINE MATERIAL "Concrete" 1,

0.8, 0.8, 0.8,
! surface RGB [0.0..1.0]
1.0, 1.0, 0.0, 0.0,
! ambient, diffuse, specular,transparent
! coefficients [0.0..1.0]
0,
! shining [0..100]
0
! transparency attenuation [0..4]

## nrPoints=7 ! Number of points defining the polyline of the cross section

height = 5 ! The total height of the column
inclination_height=4 ! The surfaces at the top are inclined over a height of inclination_height
inclination=85 ! The inclination angle of the top is 85°

## FPRISM_ "Concrete", "Concrete", "Concrete", "Concrete",

nrPoints, height , inclination, inclination_height,
1.0, 0.0, 15, ! Here follow the 7 points of the polyline of the cross section
0.5, 0.5, 15, ! The cross section is a hexagon.
-0.5, 0.5, 15, ! The extra parameter 15 determines visibility of edges and surfaces
-1.0, 0.0, 15,
-0.5, -0.5, 15,
0.5, -0.5, 15,
1.0, 0.0, 15

14
The column seen from side and top :

Ex. REVOLVE

With REVOLVE we define the outline (shape) of column as a polyline – the top and bottom must
not be specified. The outline is drawn in the x,y plane and then rotated around the x-axis

## REVOLVE 4, ! Polyline of 4 points

360, ! Revolve 360°
1+2, ! Flag 1= base present Flag 2 = bnd present.
0.0, 1.4, 0, ! Point 1 – bottom point
1.0, 1.4, 0, ! Point 2
2.0, 1.0, 0, ! Point 3
10.0, 1.0, 0 ! Point 4 – top ponit

## The resulting column with varying diameter lies flat :

15
We can draw the polyline of the outline with a mixture of straight and arc segments. This makes
it possible to create a wide variety of columns.

## REVOLVE 6, ! Polyline of 6 defining lines

360, ! Revolve 360°
1+2, ! Flag 1= base present Flag 2 = bnd present.
0.0, 1.4, 0, ! Point 1
1.0, 1.4, 0, ! Point 2
2.0, 1.0, 0, ! Point 3
10.0, 1.0, 0, ! Point 4
10.2, 1.0, 900, ! Define arc - centerpoint
10.4, 1.0, 3000 ! Define arc - endpoint

16
3.3 Twisted columns
Twisted columns are created with the command SWEEP.
We define the polyline of the cross section in the x,y surface. This cross section can be swept on
a space path in x,y,z while at the same time it can be rotated. It is the rotation that results in a
twisted form. In the case of straight upstanding columns, we will SWEEP across a space path
parallel with the z-axis.

It is also possible to define a scaling factor that is applied to each consecutive point on the space
path the crossection.

The concept can best be demonstrated with an example that is not too complicated.
We will draw a simple rectangle in the x,y surface – sweep it along the z-axis while at the same
time rotate the rectangle with 20° each time we move upwards on the z-axis. We will move
upwards 6 times.

The cross section in x,y and the first step upwards the z-axis are shown below :

rotated by 20°

## Polyline of cross section in x,y

SWEEP 4, ! the polyline of the cross section is a rectangle and exists of 4 points
6, ! we will sweep the cross section along a sweep path consisting of 6 points
20, ! between each of these 6 points, the cross section will be rotated over 20 degrees
1, ! scale factor - it is possible to scale the cross section for each of the sweep path
1+2+4+16+32, ! Mask - show the existence of the bottom - top - edge surfaces
1.0, 0.5, 0, ! Here are the 4 points x,y of the polyline of the cross section
-1.0, 0.5, 0,
-1.0, -0.5, 0,
1.0, -0.5, 0,
0, 0, 2, ! Here are the 6 points x,y,z of the polyline sweep path
0, 0, 6, ! Only the z coordinate is different from 0, so we sweep upwards on the z-axis
0, 0, 8,
0, 0, 10,
0, 0, 12,
0, 0, 14

This example in itself is not very useful but the idea can be extended to much more interesting
forms.

17
An interesting form appears if we rotate the “Roman column”

-270°
-240° -300°

-210° 30°

Point 1

Centerpoint 1
-180°

Point 4 Point 2

-150°
Point 3 Centerpoint2 -30°

-120° -60°
-90°

## The first simple model was described as.

! Example of extruded polyline using arches defined by startpoint - endpoint and centerpoint
! To define a centerpoint - use code 900
! To draw an arch from previous point to a new point x,y - use code 3000

## EXTRUDE 13, 0, 0, 40, 1+2+4+16+32,

4*cos(30), 4*sin(30), 1, ! Define startpoint 1 on circle at radius 4 and angle 30°
5*cos(0), 5*sin(0), 900, ! Define centerpoint of an arch at radius 5 and at angle 0°
4*cos(-30), 4*sin(-30), 3001, ! Draw the arch from point 1 to point 2 located at radius 4 and angle -30°
5*cos(-60), 5*sin(-60), 900, ! Define centerpoint of an arch at radius 5 and at angle -60°
4*cos(-90), 4*sin(-90), 3001, ! Draw the arch from point 2 to point 3 located at radius 4 and angle -90°
5*cos(-120), 5*sin(-120), 900, ! Define centerpoint of an arch at radius 5 and at angle -120°
4*cos(-150), 4*sin(-150), 3001, ! Draw the arch from point 3 to point 4 located at radius 4 and angle -150°
5*cos(-180), 5*sin(-180), 900, ! Define centerpoint of an arch at radius 5 and at angle -180°
4*cos(-210), 4*sin(-210), 3001, ! Draw the arch from point 4 to point 5 located at radius 4 and angle -210°
5*cos(-240), 5*sin(-240), 900, ! Define centerpoint of an arch at radius 5 and at angle -240°
4*cos(-270), 4*sin(-270),3001, ! Draw the arch from point 5 to point 6 located at radius 4 and angle -270°
5*cos(-300), 5*sin(-300), 900, ! Define centerpoint of an arch at radius 5 and at angle -300°
4*cos(-330), 4*sin(-330), 3001 ! Draw the arch from point 6 to point 7 located at radius 4 and angle -330°

18
We can re-use the description of the cross section for the twisted column and add the
description of the sweep path along the z-axis. The form that we become is called solomonical
column named after king Solomon who constructed the temple in Jeruzalem.

## SWEEP 13, ! The polyline of the cross section is described by 13 lines

20, ! We will sweep the cross section upwards along the z-axis over 20 points
18, ! With each upwards step, we rotate over 18°
1, ! The scale factor between each step up is 1, so cross section does not change in size
1+2+4, ! Mask determing visibility : base - top - side surfaces visible, no edges
! Now follow the 13 lines of the polyline of the cross section
4*cos(30), 4*sin(30), 1 ! Define startpoint 1 on circle at radius 4 and angle 30°
5*cos(0), 5*sin(0), 900 ! Define centerpoint of an arch at radius 5 and at angle 0°
4*cos(-30), 4*sin(-30), 3001, ! Draw the arch from point 1 to point 2 located at radius 4 and angle -30°
5*cos(-60), 5*sin(-60), 900, ! Define centerpoint of an arch at radius 5 and at angle -60°
4*cos(-90), 4*sin(-90), 3001, ! Draw the arch from point 2 to point 3 located at radius 4 and angle -90°
5*cos(-120), 5*sin(-120), 900, ! Define centerpoint of an arch at radius 5 and at angle -120°
4*cos(-150), 4*sin(-150), 3001, ! Draw the arch from point 3 to point 4 located at radius 4 and angle -150°
5*cos(-180), 5*sin(-180), 900, ! Define centerpoint of an arch at radius 5 and at angle -180°
4*cos(-210), 4*sin(-210), 3001, ! Draw the arch from point 4 to point 5 located at radius 4 and angle -210°
5*cos(-240), 5*sin(-240), 900, ! Define centerpoint of an arch at radius 5 and at angle -240°
4*cos(-270), 4*sin(-270),3001, ! Draw the arch from point 5 to point 6 located at radius 4 and angle -270°
5*cos(-300), 5*sin(-300), 900, ! Define centerpoint of an arch at radius 5 and at angle -300°
4*cos(-330), 4*sin(-330), 3001, ! Draw the arch from point 6 to point 7 located at radius 4 and angle -330°
! Now follow the 20 points x,y,z of the sweep path along the z-axis
0,0,0,
0,0,2,
0,0,4,
0,0,6,
0,0,8,
0,0,10,
0,0,12,
0,0,14,
0,0,16,
0,0,18,
0,0,20,
0,0,22,
0,0,24,
0,0,26,
0,0,28,
0,0,30,
0,0,32,
0,0,34,
0,0,36,
0,0,38

19
We can derive a parametrical script as described in the paragraph of the Roman column. There
is one extra aspect that we need to parameterize : the rotation.

What really is important is the “speed of rotation” : does it spiral up slowly or fast?
We will therefore define the parameter heightOneRotation : the height needed to get one full
rotation. For the rest, we will make the number of points along the sweep path variable :
nrSweepPoints. This allows to control the resolution.

Over the total height of the column, we will have (height/heightOneRotation) rotations. This is
spread over “nrSweepPoints” points, so per sweep point, we have
(height/heightOneRotation)/ nrSweepPoints
rotations. Because one rotation is 360°, this means an angle per sweep point of
(height/heightOneRotation)/ nrSweepPoints * 360°.

## ! Parameters that can be changed

height=40
nrSides=6
heightOneRotation=40
nrSweepPoints=20

## !Start object creation

! we will shift each time with 360/(NrSides*2) - in case nrSides=6, we will shift each 30°
angleStep = 360/(NrSides*2)

## ! we start the first point at angleStep

angle = angleStep
!Startpoint

## FOR nr=1 TO nrSides

! Go angleStep degrees further and PUT 3 parameters for the Centerpoint on the memory buffer
angle = angle - angleStep

! Go angleStep degrees further and PUT 3 parameters for the arc endpoint on the memory buffer
angle = angle - angleStep
NEXT nr

! We have 1 defining line for the startpoint + 2 defining lines per side (centerpoint and arc andpoint)
! Each defining line has 3 values
nrDefiningLines = 1+2*nrSides
nrDefiningValues = 3*nrDefiningLines

## ! We now calculate the sweep path

totalNrRotations =height/ heightOneRotation
anglePerSweepPoint = (totalNrRotations/ nrSweepPoints)*360

heightPerPoint = height/nrSweepPoints
FOR nr=1 to nrSweepPoints
PUT 0, 0, (nr-1)*heightPerPoint
NEXT nr

SWEEP nrDefiningLines, ! The polyline of the cross section is described by nrDefiningLines lines
nrSweepPoints, ! We will sweep upwards along the z-axis over nrSweepPoints points
anglePerSweepPoint, ! With each upwards step, we rotate over 18°
1, ! The cross section does not change in size
1+2+4, ! Mask determing visibility : base - top - side surfaces visible, no edges
! Now follow the nrDefiningLines lines of the polyline of the cross section
! and the nrSweepPoints x,y,z of the sweep path along the z-axis
GET(nrDefiningValues+ 3* nrSweepPoints)

20
We can now easily change height, cross-section diameter, cross-section number of sides, height
for one rotation. If we lower the height for one rotation too much, we will need to increase the
number of SweepPoints to increase the resolution.

## If we lower the height for one rotation to 10 meter, we get :

To get a better resolution, we can increase the number of sweep points from 20 to 100 :

## The same with only 4 sides for the cross section :

21
Another example :

We can become all sorts of good looking twisted columns by choosing different cross sections,
particularly if the diameter of the cross section is not constant.

22
3.4 Special columns

GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
GOSUB "PUTSEGMENT"
END

"PUTSEGMENT":
CYLIND 4.8, 2.0
TUBE 4, 27, 1+2+16+23,
1.0 ,0.0, 1,
2.0, 0.4, 1,
1.0, 0.8, 1,
1.0 ,0.0, 1,
SIN(-15), COS(-15), -0.2, 0,
SIN(0), COS(0), 0.0, 0,
SIN(15), COS(15), 0.2, 0,
SIN(30), COS(30), 0.4, 0,
SIN(45), COS(45), 0.6, 0,
SIN(60), COS(60), 0.8, 0,
SIN(75), COS(75), 1.0, 0,
SIN(90), COS(90), 1.2, 0,
SIN(105), COS(105), 1.4, 0,
SIN(120), COS(120), 1.6, 0,
SIN(135), COS(135), 1.8, 0,
SIN(150), COS(150), 2.0, 0,
SIN(165), COS(165), 2.2, 0,
SIN(180), COS(180), 2.4, 0,
SIN(195), COS(195), 2.6, 0,
SIN(210), COS(210), 2.8, 0,
SIN(225), COS(225), 3.0, 0,
SIN(240), COS(240), 3.2, 0,
SIN(255), COS(255), 3.4, 0,
SIN(270), COS(270), 3.6, 0,
SIN(285), COS(285), 3.8, 0,
SIN(300), COS(300), 4.0, 0,
SIN(315), COS(315), 4.2, 0,
SIN(330), COS(330), 4.4, 0,
SIN(345), COS(345), 4.6, 0,
SIN(360), COS(360), 4.8, 0,
SIN(375), COS(375), 5.0, 0
RETURN

23
24
4. Balusters
Balusters are similar to complex columns. They can be modeled with REVOLVE or SWEEP.

25
5. Cornices

## 5.1 The command TUBE

Cornices are most easily modeled with TUBE.

With TUBE we can easily create a tube with a constant cross section, existing of one or more
segments. Below an example with 3 segments – each segment has the same cross section.

## Same cross section of

each segment.
First
surface Last
surface

Bisector Bisector
plane plane

It is easy to understand how 2 segments meet and in mathematical language, this is described
as “the cross section where two segments meet lays in the bisector plane” : The cross section
of the first segment makes an angle of 45° with the horizontal, the cross section of the second
segment makes an angle of 90° with the horizontal, therefore, teh cross section makes an angle
of (90+45)/2=67,5°.

The tube is defined by its cross section (a two-dimensional polyline contour) and the path that
the tube follows (a 3 dimensional polyline in x,y.z.). Therefore TUBE is basically is similar to
SWEEP : a two-dimensional polyline swept across a 3D path. SWEEP however offers the
additional possibility to have a not constant cross section. With TUBE it is possible to define the
angle of the first and last surface.

To that purpose, we define two extra imaginary segments : one before the first and after the last.
The intersection with the first and last segment, define the angle of top and bottom surface.

## Imaginary segment before Imaginary segment after

first segment. last segment.

## The definition of these extra 2 imaginary segments is made by 2 extra points.

The TUBE command is can best be demonstrated by some simple example where the 3D
polyline remains in 2 D: z=0.

## A simple straight tube :

26
TUBE 5, ! The cross section is described by 5 points
4, ! The path is described by 4 points
1+2+16+32, ! Mask that determines the surfaces that are visible
! The definiton of the 2D polyline of the cross section
! The 3th parameter 1 indicates that edges are not visible
0, 0, 1,
2, 0, 1,
2, 1, 1,
0, 1, 1,
0, 0, 1,
! The definition of the 3D polyline of the cross section
! The 4th parameter 0 indicates the angle that the surface makes.
-1, 0, 0, 0, ! The first point only is there to define the imaginary section
! that determines the rotation of the first surface
0, 0, 0, 0, ! The first real point of the tube segment
5, 0, 0, 0, ! The last real point of the tube segment
7, 0, 0, 0 ! The last point only is there to define the imaginary section
! that determines the rotation of the last surface

As you can see from the picture, the first real point of the tube path is 0,0,0. The last real point is
5,0,0. The imaginary first and last extra segments defined by points -1,0,0 and 7,0,0 lay in the
same direction as the tube. Therefore, the first and last surfaces are orthogonal with the tube
path.

In the next example, the imaginary first and last extra segments, defined by extra points 0,3 and
5,3 make a 90° turn with respect to the tube.

5,3
0,3

0,0 5,0
x

## As a result the first and last surfaces lay at 45° angles.

0, 5,
3 3

0, 5,
0 0 x

27
TUBE 5, ! The 2D polyline has 5 points
4, ! The 3D polyline has 4 points
1+2+16+32, ! Mask defining visibility of surface
! Points defining the 2D contour – the contour must be closed.
! The 3th parameter defines if lateral edges are visible or just used for displaying the contour
! If 0, the edges are displayed.
0, 0, 0,
2, 0, 0,
2, 1, 0,
0, 1, 0,
0, 0, 0,
! Points (x,y,z) defining the 3D sweep path
! The fourth parameter defines an angle.
0, 3, 0, 0,
0, 0, 0, 0,
5, 0, 0, 0,
5, 3, 0, 0

Result :

## A simple tube with a 90° elbow

TUBE 5, ! The 2D polyline has 5 points
5, ! The 3D polyline has 5 points
1+2+16+32, ! Mask defining visibility of surface
! Points defining the 2D contour – the contour must be closed.
! The 3th parameter defines if lateral edges are visible or just used for displaying the contour
! If 0, the edges are displayed.
0, 0, 0,
2, 0, 0,
2, 1, 0,
0, 1, 0,
0, 0, 0,
! Points (x,y,z) defining the 3D sweep path
! The fourth parameter defines an angle.
0, 7, 0, 0,
0, 5, 0, 0,
0, 0, 0, 0,
5, 0, 0, 0,
7, 0, 0, 0

28
5.2 Corniches and frames with TUBE
We can also use special status codes as 3th parameter of the 2D polyline points to create arc’s
in the 2 D polyline of the contour.

## The most simple example :

TUBE 7, ! The 2 D polyline of the cross section is described by 7 lines
4, ! The path is described by 4 points
1+2+16+32, ! Mask that determines the surfaces that are visible
! The definiton of the 2D polyline of the cross section
! The 3th parameter 0 indicates that edges are visible
0.0, 0.0, 0,
0.5, 0.0, 0,
1.0, 0.0, 900, ! Define the centerpoint of the arc
1.0, 0.5, 3000, ! Define the end point of the arc
1.0, 1.0, 0,
0.0, 1.0, 0,
0.0, 0.0, 0,
! The definition of the 3D polyline of the path
-1, 0, 0, 0, ! The first point only is there to define the imaginary section
! that determines the rotation of the first surface
0, 0, 0, 0, ! The first real point of the tube segment
5, 0, 0, 0, ! The last real point of the tube segment
7, 0, 0, 0 ! The flast point only is there to define the imaginary section
! that determines the rotation of the last surface

It is clear that we can draw cross sections with multiple arcs and straight lines and therefore can
create cornices of any complexity.

## We can extend this example to 5 segments.

TUBE 7, ! The 2 D polyline of the cross section is described by 7 lines
4, ! The path is described by 4 points
1+2+16+32, ! Mask that determines the surfaces that are visible
! The definiton of the 2D polyline of the cross section
! The 3th parameter 0 indicates that edges are visible
0.0, 0.0, 0,
0.5, 0.0, 0,
1.0, 0.0, 900, ! Define the centerpoint of the arc
1.0, 0.5, 3000, ! Define the end point of the arc
1.0, 1.0, 0,
0.0, 1.0, 0,
0.0, 0.0, 0,
! The definition of the 3D polyline of the path
-1, 0, 0, 0, ! The first point only is there to define the imaginary section
! that determines the rotation of the first surface
0, 0, 0, 0, ! The first real point of the tube segment
5, 0, 0, 0, !
5, 2, 0, 0,
10, 2, 0, 0,
10, 0, 0, 0,
15, 0, 0, 0, ! The last real point of the tube segment
20, 0, 0, 0 ! The last point only is there to define the imaginary section
! that determines the rotation of the last surface

29
TUBE can also be used to draw frames.

## TUBE 7, ! The cross section is described by 7 lines

7, ! The path is described by 7 points
1+2+16+32, ! Mask that determines the surfaces that are visible
! The definiton of the 2D polyline of the cross section
! The 3th parameter 0 indicates that edges are visible
0.0, 0.0, 0,
1.0, 0.0, 0,
1.0, 0.5, 0,
1.0, 1.0, 900, ! Define the centerpoint of the arc
0.5, 1.0, 3000, ! Define the end point of the arc
0.0, 1.0, 0,
0.0, 0.0, 0,
! The definition of the 3D polyline of the path
-1, 0, 0, 0, ! The first point only is there to define the imaginary section
! that determines the rotation of the first surface
0, 0, 0, 0, ! The first real point of the tube segment
10, 0, 0, 0, !
10, 10, 0, 0,
0, 10, 0, 0,
0, 0, 0, 0, ! The last real point of the tube segment
0, -1, 0, 0 ! The last point only is there to define the imaginary section
. ! that determines the rotation of the last surface

30
6. Arches
Arches can easily be made with TUBE.

Example.
TUBE 12, ! The polyline of the cross section is defined by 12 lines
17, ! The path of the tube is defined by 17 points
16+32, ! Mask that determines visibility of surfaces
! The polyline of the cross section is defined by 12 lines
2.0, 0.0, 0,
1.5, 0.0, 0,
1.5, 0.1, 0,
1.0, 0.1, 0,
1.0, 0.0, 0,
0.0, 0.0, 0,
0.0, 0.4, 0,
1.0, 0.4, 0,
1.0, 0.3, 0,
1.5, 0.3, 0,
1.5, 0.4, 0,
2.0, 0.4, 0,
! The path of the tube is defined by 17 points
-1, 0, 0, 0,
0, 0, 0, 0,
6, 0, 0, 0,
6+4*SIN(15), 4 - 4*COS(15), 0, 0,
6+4*SIN(30), 4 - 4*COS(30), 0, 0,
6+4*SIN(45), 4 - 4*COS(45), 0, 0,
6+4*SIN(60), 4 - 4*COS(60), 0, 0,
6+4*SIN(75), 4 - 4*COS(75), 0, 0,
10, 4, 0, 0,
6+4*SIN(105), 4 - 4*COS(105), 0, 0,
6+4*SIN(120), 4 - 4*COS(120), 0, 0,
6+4*SIN(135), 4 - 4*COS(135), 0, 0,
6+4*SIN(150), 4 - 4*COS(150), 0, 0,
6+4*SIN(165), 4 - 4*cos(165), 0, 0,
6, 8, 0, 0,
0, 8, 0, 0,
-1, 8, 0, 0

31
One can complete different shapes of arches.
In example below, the arch is symmetrical around x-axis. It shows that the polyline of the cross
section has no relation to the path : the cross-section is defined in a “temporary u-v” coordinate
system that is dragged along the path.

!roty -90

## TUBE 5, ! The polyline of the cross

section is defined by 4 points
17, ! The path of the tube
is defined by 17 points
16+32, ! Mast that
determines visibility of surfaces
! The polyline of the cross section is defined by 12 lines
0.0, 0.0, 0,
1.0, 0.0, 0,
1.0, 0.4, 0,
0.0, 0.4, 0,
0.0, 0.0, 0,
! The path of the tube is defined by 17 points
! This path is now symmetrical with respect to x-axis
-1, -6, 0, 0,
0, -6, 0, 0,
6, -6, 0, 0,
6+4*SIN(15), -4*COS(15), 0, 0,
6+4*SIN(30), -4*COS(30), 0, 0,
6+4*SIN(45), -4*COS(45), 0, 0,
6+4*SIN(60), -4*COS(60), 0, 0,
6+4*SIN(75), -4*COS(75), 0, 0,
6+4*SIN(90), -4*COS(90), 0, 0,
6+4*SIN(105), -4*COS(105), 0, 0,
6+4*SIN(120), -4*COS(120), 0, 0,
6+4*SIN(135), -4*COS(135), 0, 0,
6+4*SIN(150), -4*COS(150), 0, 0,
6+4*SIN(165), -4*cos(165), 0, 0,
6, 6, 0, 0,
0, 6, 0, 0,
-1, 6, 0, 0

32
Another typical not round arch is constructed by adding 2 arch segments.

## First arch segment

x
In the endpoint, the y value
becomes 0 :
y=2-R cos α = 0
R cos α = 2
6 cos α = 2
α = 70.5°

x=R sin α
R=6
α
y x=0, y=2

y=2-R cos
α

!roty -90

## TUBE 5, ! The polyline of the cross

section is defined by 4 points
16, ! The path of the tube
is defined by 16 points
16+32, ! Mast that
determines visibility of surfaces
! The polyline of the cross section is defined by 12 lines
0.0, 0.0, 0,
1.0, 0.0, 0,
1.0, 0.4, 0,
0.0, 0.4, 0,
0.0, 0.0, 0,
! The path of the tube is defined by 16 points
! This path is now symetrical with respect to x-axis
-1, -4, 0, 0,
0, -4, 0, 0,
6, -4, 0, 0,
! First part of the arch
6+6*SIN(15), 2-6*COS(15), 0, 0,
6+6*SIN(30), 2-6*COS(30), 0, 0,
6+6*SIN(45), 2-6*COS(45), 0, 0,
6+6*SIN(60), 2-6*COS(60), 0, 0,
6+6*SIN(70), 2-6*COS(70), 0, 0,
! Second part of the arch – symmetrical of first part
6+6*SIN(110), -2-6*COS(110), 0, 0,
6+6*SIN(120), -2-6*COS(120), 0, 0,
6+6*SIN(135), -2-6*COS(135), 0, 0,
6+6*SIN(150), -2-6*COS(150), 0, 0,
6+6*SIN(165), -2-6*COS(165), 0, 0,
6, 4, 0, 0,
0, 4, 0, 0,
-1, 4, 0, 0

33
7. Friezes
For simple friezes, the pattern can be drawn as an extruded polyline or a rather flat tube moving
along a polyline.

For more complex friezes you need MESH or MASS. These functions allow to model any 3D
surface by specifying the x,y, z-coordinates.

Below an example by an extruded polyline. The form was first drawn on paper from which x,y
coordinates were estimated and noted. This shows that with some effort, a lot becomes
possible.

34
EXTRUDE 118, 0, 0, 3, 1+2+4+16+32,
2.5 , 13.5, 0,
3.0 , 11.8, 0,
4.0 , 10.2, 0,
5.0 , 9.0, 0,
6.0 , 8.0, 0,
7.0 , 7.2, 0,
8.0 , 6.5, 0,
10.0, 5.5, 0,
12.0, 4.7, 0,
13.0, 4.5, 0,
14.0, 4.4, 0,
15.0, 4.45, 0,
17.0, 4.6, 0,
20.0, 4.85, 0,
21.0, 5.0, 0,
22.0, 5.2, 0,
21.0, 5.5, 0,
20.0, 5.7, 0,
21.0, 5.7, 0,
22.0, 6.0, 0,
23.0, 6.4, 0,
24.0, 7.0, 0,
24.2, 7.2, 0, ! point 23
23.0, 7.2, 0,
24.0, 8.0, 0,
24.9, 9.0, 0,
25.6, 10.2, 0,
24.6, 9.8, 0,
25.15, 11.0, 0,
25.5, 12.0, 0,
26.0, 13.0, 0,
26.55, 14.0, 0, ! point 32
27.15, 15.0, 0,
27.7, 16.0, 0,
28.25, 17.0, 0, ! point 35
26.2, 14.7, 0,
26.55, 16.0, 0,
27.3, 18.0, 0,
28.0, 19.5, 0,
29.0, 21.2, 0,
28.5, 21.0, 0,
28.0, 20.8, 0, ! point 42
27.0, 20.0, 0,
26.3, 19.0, 0,
26.0, 20.0, 0,
26.1, 21.0, 0,
26.4, 23.0, 0,
27.0, 25.0, 0, ! point 48
26.2, 24.0, 0,
25.2, 22.2, 0,
25.0, 22.0, 0, ! point 51
24.2, 23.0, 0,
24.0, 24.0, 0,
23.8, 25.0, 0,
23.7, 27.3, 0, ! point 55
23.0, 26.0, 0,
22.4, 25.0, 0,
22.1, 24.0, 0,
22.0, 22.2, 0, ! point 59
21.0, 22.2, 0,
20.0, 22.0, 0,
19.0, 21.8, 0,
18.0, 21.2, 0,
17.0, 20.0, 0, ! point 64
18.0, 20.3, 0,
20.0, 20.95, 0,
21.0, 21.0, 0,
23.0, 20.6, 0,
24.0, 20.0, 0,
23.0, 20.15, 0, ! point 70
21.0, 20.0, 0, ! point 71

35
20.0, 19.8, 0,
22.0, 19.6, 0,
23.0, 19.2, 0,
24.0, 18.0, 0,
24.6, 17.0, 0,
25.0, 14.8, 0, ! point 77
24.2, 16.0, 0,
23.0, 17.0, 0,
23.8, 16.0, 0,
24.0, 15.0, 0,
24.5, 13.0, 0,
24.6, 12.0, 0,
24.5, 11.0, 0,
24.0, 10.0, 0, ! point 85
24.0, 11.0, 0,
23.5, 10.0, 0,
22.3, 9.0, 0,
21.7, 8.3, 0, ! point 89
22.0, 10.0, 0,
21.0, 8.4, 0,
19.7, 7.0, 0,
19.7, 8.0, 0,
19.0, 7.0, 0,
18.0, 6.5, 0,
17.0, 6.0, 0,
15.0, 5.8, 0,
13.5, 6.1, 0, ! point 98
15.0, 6.4, 0,
16.0, 7.0, 0,
13.0, 7.0, 0,
11.0, 7.2, 0,
10.0, 7.5, 0,
9.0, 8.0, 0, ! point 104
11.0, 8.0, 0,
13.0, 8.8, 0,
11.0, 8.9, 0,
9.0, 9.1, 0,
8.0, 9.4, 0,
7.0, 10.0, 0,
6.0, 10.3, 0, ! point 111
8.0, 10.2, 0,
9.0, 10.4, 0,
10.0, 10.7, 0,
7.0, 11.0, 0,
5.0, 11.2, 0,
4.0, 12.0, 0,
2.5 , 13.5, 0

## We can make it somewhat more beautiful by using FPRISM.

The top surface is not flat now and FPRISM allows to define immediately the material.

36
When using FPRISM, the frieze script becomes

## DEFINE MATERIAL "Concrete" 1,

0.8, 0.8, 0.8,
! surface RGB [0.0..1.0]
1.0, 1.0, 0.0, 0.0,
! ambient, diffuse, specular,transparent
! coefficients [0.0..1.0]
0,
! shining [0..100]
0
! transparency attenuation [0..4]

## FPRISM_ "Concrete", "Concrete", "Concrete", "Concrete",

118, 3, 45, 1.0,
2.5 , 13.5, 15,
3.0 , 11.8, 15,
4.0 , 10.2, 15,
……..
……..
And so on for all 118 points.

37
6. Towers
Typical towers can be made with REVOLVE – FPRISM – TUBE and SWEEP

REVOLVE

FPRISM

## For towers with a ground plan that is not round.

FRISM makes it possible to define a PRISM where the top cross section is smaller than the
bottom cross section.

## DEFINE MATERIAL "Concrete" 1,

0.8, 0.8, 0.8,
! surface RGB [0.0..1.0]
1.0, 1.0, 0.0, 0.0,
! ambient, diffuse, specular,transparent
! coefficients [0.0..1.0]
0,
! shining [0..100]
0
! transparency attenuation [0..4]

## nrPoints=7 ! Number of points defining the polyline of the cross section

height = 5 ! The total height of the tower
inclination_height=4 ! The surfaces at the top are inclined over a height of inclination_height
inclination=78 ! The inclination angle of the top is 78°

## FPRISM_ "Concrete", "Concrete", "Concrete", "Concrete",

nrPoints, height , inclination, inclination_height,
cos(0), sin(0), 15, ! Here follow the 7 points of the polyline of the cross section
cos(60), sin(60), 15, ! The cross section is a hexagon.
cos(120), sin(120), 15, ! The extra parameter 15 determines visibility of edges and surfaces
cos(180), sin(180), 15,
cos(240), sin(240), 15,
cos(300), sin(300), 15,
cos(360), sin(360), 15

TUBE

38
We can also rotate any polyline contour around the z-axis for a number of degrees, ex. 90°. The
form that we obtain in such way can then be repeated 4 times to complete the 360°.

## ! This is one 45° part

TUBE 5,
5,
1+2+16+32,
! The definition of the 2D polyline of the cross section
0,0,1,
3,0,1,
1,1,1,
0,7,1,
0,0,1,
! The definition of the 3D polyline of the path section
-1, 0, 0, 0,
0, 0, 0, 0,
0.01, 0.01, 0, 0,
0.01, -0.01, 0, 0,
0.01, -1, 0, 0

If we repeat this 4 times and before each time write rotz +90, then we become the full tower.

The polyline of the contour can naturally much more complicated and contain also arcs.

39
SWEEP

We can SWEEP a polycontour up along the z-axis while multiplying it with a scale factor < 1 at
each step. The result will be a tower.

SWEEP 13, ! the polyline of the cross section is a roman columlike and exists of 13 points
6, ! we will sweep the cross section along a sweep path consisting of 6 points
0, ! between each of these 6 points, the cross section will be rotated over 0 degree
0.6, ! scale factor – the cross section scales with 0.9 for each of the sweep path
1+2+4+16+32, ! Mask - show the existence of the bottom - top - edge
4*cos(30), 4*sin(30), 1, ! Define startpoint 1 on circle at radius 4 and angle 30°
5*cos(0), 5*sin(0), 900, ! Define centerpoint of an arch at radius 5 and at angle 0°
4*cos(-30), 4*sin(-30), 3001, ! Draw the arch from point 1 to point 2 located at radius 4 and angle -30°
5*cos(-60), 5*sin(-60), 900, ! Define centerpoint of an arch at radius 5 and at angle -60°
4*cos(-90), 4*sin(-90), 3001, ! Draw the arch from point 2 to point 3 located at radius 4 and angle -90°
5*cos(-120), 5*sin(-120), 900, ! Define centerpoint of an arch at radius 5 and at angle -120°
4*cos(-150), 4*sin(-150), 3001, ! Draw the arch from point 3 to point 4 located at radius 4 and angle -150°
5*cos(-180), 5*sin(-180), 900, ! Define centerpoint of an arch at radius 5 and at angle -180°
4*cos(-210), 4*sin(-210), 3001, ! Draw the arch from point 4 to point 5 located at radius 4 and angle -210°
5*cos(-240), 5*sin(-240), 900, ! Define centerpoint of an arch at radius 5 and at angle -240°
4*cos(-270), 4*sin(-270),3001, ! Draw the arch from point 5 to point 6 located at radius 4 and angle -270°
5*cos(-300), 5*sin(-300), 900, ! Define centerpoint of an arch at radius 5 and at angle -300°
4*cos(-330), 4*sin(-330), 3001, ! Draw the arch from point 6 to point 7 located at radius 4 and angle
-330°
0, 0, 2, ! Here are the 6 points x,y,z of the polyline sweep path
0, 0, 6, ! Only the z coordinate is different from 0, so we sweep upwards on the z-axis
0, 0, 8,
0, 0, 9,
0, 0, 9.6,
0, 0, 10

By changing the points of the polyline sweep path, we can get different shapes.
Ex.
0, 0, 2, ! Here are the 6 points x,y,z of the polyline sweep path
0, 0, 4.8, ! Only the z coordinate is different from 0, so we sweep
upwards on the z-axis
0, 0, 6.4,
0, 0, 7.0,
0, 0, 7.25,
0, 0, 7.3

40
7. Aspects of performance
1. Avoid displaying too much in 3D : use layers and layer combinations to show only where you
are working on.
2. Simplify – objects must only look like and not be exactly similar as. Real historical buildings
have a much too high complexity in ornamental details.
3. Simplify the 2D models. Do not ask ArchiCAD to calculate projections of the 3 D model.
4. Use polycount to check the number of polygons.