Modeling of Buddist stupas in Sri Lanka using sketchup and ruby

International Journal of Conceptions on Computing and Information Technology
Vol.2, Issue 1, Jan’ 2014; ISSN: 2345 - 9808
Modeling of Buddist stupas in Sri Lanka using
sketchup and ruby
B M S Banduthilaka, Dr. C Kariyawasam and Dr. A M N Alagiyawanna
Faculty of Engineering,
University of Ruhuna,
Galle, Sri Lanka.
[email protected]
Abstract— In Sri Lanka, a Stupa which is also known as Chetiya
symbolizes a Buddhist temple. These are brick monuments of
varying sizes and shapes. The tallest is 91.4 meters in height and
90.8 meters in diameter at the base which is located at the ancient
city of Anuradhapura. Stupas were built as Buddhist monuments
or to enshrine relics. The Sri Lankan Stupas have a wide variety
of dome shapes. The four most common shapes are, Dhanyakara
(heap),
Bubbulakara (bubble), Gantakara (bell), Gatakara (
pot) . Even though Sri Lankan stupa architecture was inherited
from India, it has its own unique characteristics A stupa is built
according to a set of strict architectural guidelines. Majority of
the ancient stupas were constructed over 1000 years ago. As such
most of them have undergone natural aging process and need
restoration. Availability of a three dimensional model help the
engineers who are involved in restoration. In this research, four
major stupa shapes were studied in detail using archeological
records. Then three dimensional models of the same were built
using Google Skethup and Ruby. A ruby program was written to
automate the modeling process. A Ruby class was written for
each stupa shape. Basic parameters were passed into each class to
build the model according to predefined architectural
specifications. The finite element analysis plug in of the Sketchup
can then be used to carry out the stability analysis of the Stupa,
which helps the engineers who restore the Stupas.
Keywords- finite-element; modeling; Ruby; Sketchup; stupa
I.
INTRODUCTION
Stupa is a Sanskrit word that can be translated as “a knot
or tuft of hair”. However, subsequently it became an
architectural term, indicating a dome shaped monument. As
Buddhism continued to spread over the course of time, the
early structural model of the stupa gradually transformed [1].
As Buddhism penetrated Sri Lanka, Central Asia, South-East
Asia and East Asian countries, the cultural traditions and
concepts slowly changed the shape and construction of the
stupa according to the local requirements, beliefs and tastes.
Majority of the stupas in Sri Lanka are built in the
traditional method of sun-baked earth bricks. Eight different
shapes of Stupas are found in the world. However, in Sri Lanka
Stupas are confined to four different shapes.
II. HISTORY OF STUPAS IN SRI LANKA
Sri Lankan stupa architecture has different architectural
and engineering characteristics from the other stupas in the
world [2]. Their historical importance is mingled with the
religious significance.
Stupa is one of the prominent architectural features of
Buddhism in Sri Lanka, and is build for two reasons.


To commemorate great deeds achieved by Lord Buddha
during his life
To enshrine relics of Lord Buddha after his passing
away[3]
Even though the concept of stupa is tightly connected with
Buddhism, there is enough evidence to prove that stupas
existed prior to the introduction of Buddhism [1]. Ancient
kings in Sri Lanka believed that promoting Buddhism was their
responsibility. To partially achieve this, they constructed stupas
in many parts of the country. Buddhists consider that the
construction of a stupa accumulate a great merit [4][5].
III.
CURRENT STATUS OF THE ANCIENT STUPAS
IN SRI LANKA
In the past most of the stupas were destroyed by foreign
invaders. Some were deteriorated due to exposure to weather
and poor or no maintenance. As a result majority of the
ancient stupas are in a poor condition and need restoration.
Over the past few decades governmental and nongovernmental organizations have made attempts to restore
ancient stupas.
A major problem faced by the organizations involved in
restoring the stupas is the absence of design guidelines. These
monuments have to be constructed in such a way to meet
structural as well as religious requirements.
For the purpose of this study the Stupas in Sri Lanka were
grouped into two types based on their size, as small or large.
Small stupas are those whose height is less than 10 meters.
There are hundreds of these stupas scattered all over Sri
Lanka. Practically every village has a stupa affiliated with the
17 | 1 2 4
International Journal of Conceptions on Computing and Information Technology
Vol.2, Issue 1, Jan’ 2014; ISSN: 2345 - 9808
temple. These stupas are constructed using indigenous
technology. At village level there are ‘stupa technicians’ who
are experienced in designing and constructing stupas to meet
the religious standards. Because of their size, small stupas are
structurally stable and do not require complex structural
analysis.
Designing, constructing or restoring large stupas is
complicated process. Those who are involved in any of these
processes face several problems. Primary problem is that there
are no design standards. There is an unwritten requirement
that when a stupa is restored the new height cannot be less
than the previous height. Another problem is that it is rather
difficult to make physical models to perform load tests. As
such there is a necessity to build a virtual, 3D (three
dimensional) model to carry out structural analysis.
Purpose of this research is to build a 3D model of a Stupa
using Sketchup and Ruby programming language. Once this is
done the finite element plugin in Sketchup can be used to
carry out the structural analysis and finally the structural
design.
Historically, there are no records of earth quakes in Sri
Lanka. As such buildings are not designed to withstand earth
quakes. Hence the only load considered in the design is the self
weight of the structure.
IV. MAJOR COMPONENTS OF A STUPA
Unlike the pyramid which is hollow inside, stupa is a solid
structure packed with bricks. Archeological records indicate
that, in the past precise engineering design specifications were
used in stupa construction. Each component of a stupa adds a
unique appearance to it while conveying a special meaning
[3]. Various components of a stupa are shown in Fig. 1, and
their significance is listed below.
the Stupa from direct sunlight and rain. When stupas became
larger in size, building umbrellas became impractical and
conical spire replaced the umbrellas.
F. Kotha (6)
Kotha is a metal top placed in the peak of the stupa,
decorated with a precious crystal or gemstone. This pointed
metal cap at the top of the stupa was believed to have
protected the stupa from lightning. This is mentioned in
Mahavamsa, the continuous historical record of Sri Lanka.
G. Frontispiece
Initially when the stupas were smaller in size, devotees
kept flowers and other offerings on the berms. As the stupas
got bigger, the berms or the basal rings also got lager in size.
Therefore large stupas were constructed with projections
called frontispieces with tables to offer flowers and other
offerings [6]. These are placed at four cardinal points of the
Stupa. Entrances to stupas were aligned so that the centre lines
pointed to the relic compartment of the stupa [6].
H. Circular Relic Chamber
Circular Relic Chamber is a circular wall and a ring shaped
roof was built enclosing the stupa to provide protection to the
Stupa from rain and sunlight [6].
V.
TYPES OF STUPA
The type of a stupa is identified by it’s shape of the dome. In
Sri Lanka, the stupas belong to six major categories. Table 1
shows different types of Sri Lankan stupas. These stupa
architecture carries unique characteristics which are different
from the Hindu architecture [3]. Sri Lanka retained the
uniqueness of its stupa architecture even though it originally
inherited from India.
A. Berms or terraces (1)
Cylindrical terraces at the bottom of the stupa structure.
Typically there are one, two or three berms.
B. Hemispherical Dome (2)
Dome is the hemispherical component of the stupa, built
on top of the berms. There are different dome shapes.
Buddhist literature refers to eight types of stupas according to
the shape of the dome. A relic chamber is built inside the
dome.
C. Tee cube (3)
This part is used to enshrine relics.
D. Cylindrical neck (4)
Cylindrical neck is built on the Tee cube. Figures of Gods
are sculptured on its surface.
E. Conical spire (5)
Conical spire is built on top of the cylindrical neck. This
symbolizes a number of umbrellas put together to protect the
stupa. In ancient times where stupas were smaller in size
people constructed comparatively large umbrellas to protect
18 | 1 2 4
Figure 1: Components of a Sri Lankan stupa[6]
TABLE I.
SRI LANKAN STUPA TYPES
International Journal of Conceptions on Computing and Information Technology
Vol.2, Issue 1, Jan’ 2014; ISSN: 2345 - 9808
Type
Shape
Example
Dhanyakara
Paddy Heap
Kelaniya
Ghantakara
Bell
Thuparamaya
Bubbulakara
Bubble
Ruwanveli seya
Ghatakara
Pot
Situlpavwa
Padmakara
Lotus
Wijayarama
Amlakara
Nelli fruit
Palandawakara
Onion
VI.
For example suppose someone wants to change length of doors
in a model’ If working manually, one has to change it in every
individual door. On the other hand, if the model is developed
using a Ruby extension, that person has only need to change
the door length parameter in the Ruby class. Combining Ruby
and Sketchup simply had brought the facilities of the world of
programming language to the 3D modeling utilities.
VIII. RUBY E XTENSION TO DEVELOP A 3D MODEL OF A
STUPA
In this research, a Ruby extension was written to build a
3D model of Sri Lankan stupas.
Nadigampala
SKETCH UP AS A 3D MODELIN PROGRAM
Sketchup is a three dimensional modeling program
developed by Google Inc [7]. It is easy to use compared to
other 3D modeling software available in the market. The basic
version which has lot of functionality available in the
professional version is free for non commercial use. As a result
of the above reasons several applications have been developed
using Sketchup in different disciplines including architectural,
civil and mechanical engineering [8]. Sketchup 8 pro version
was used in this project. This program includes a layout
functionality which allows users to draw their models in a pre
defined layout. Various styles and effects can be added to the
model using the tool box. One of the most innovative features
in Sketchup is the pushpull technology which can be used to
add a third dimension to a two dimensional object [8].
VII. RUBY PROGRAMMING LANGUAGE AND DEVELOPMENT
OF RUBY E XTENSIONS FOR THE SKETCH UP MODEL
Ruby is a dynamic, reflective, general-purpose object oriented
programming language similar to Java. It has several
innovative features compared to Java. Ruby was first designed
and developed by “Yukihiro Matsumoto” in Japan [9]. Unlike
Java, Ruby code is not complied before executing. The ruby
code is loaded at the run time. If there is an error, the code will
be simply interrupted. A remarkable feature of Ruby is its
Garbage Collector Algorithm which makes optimal use of the
memory, which makes it very efficient. Garbage collector is a
mark and sweep algorithm. It starts from the Object instance
and then walks through every reachable object marking them
along the way. Then walk the Object Space for every object
reference and delete those that are not marked [10].
The Ruby extension consists of two components. The main
Ruby program and the Ruby stupa classes. The main Ruby
program creates a stupa object and invokes its methods. In this
research, four stupa classes were written. Each of these classes
rpresent one of the four stupa shapes bubble, pot, heap and
bell. Every class is parameterized by the radius of the foot
print of the stupa and the height of the stupa. These parameters
can be adjusted through the main program while invoking the
create stupa method. The stupa class includes the necessary
algorithm to develop the 3D model.
Only four shapes of stupas were modeled in this research.
The shape of the stupa, radius of the foot print and the height
are the basic input parameters to the Ruby class. Based on the
input data, a Ruby object will be created from the relevant
Ruby class. Then the createstupa method will be invoked from
the created ruby object, which has the necessary algorithm to
develop the 3D model of the stupa.
The step by step algorithm used by Createstupa method is
given below(Fig 2).

Create three berms in descending order of radius from the
bottom to top.

Create the dome on the top of the smallest berms. The
dome is created by calling the Followme tool in Sketchup.
Curvature of the dome is decided according to type and
radius of the stupa. Then a three sided face is created
where the dome curvature is one side and vertical and
horizontal lines passing through the centre of the topmost
berm as other two sides, Fig. 2.
Sketchup has a Ruby API (Application Program Interface)
which supports software extensions written in Ruby language.
These Ruby extensions enable the Sketchup capabilities
through Ruby API.
Every 3D modeling tool which Skethcup holds can be
easily invoked and operated through a Ruby extension.
Developing large scale 3D model or duplicating models can be
easily done using Ruby extensions rather than doing it all
manually. Also 3D models can be parameterized using the
language capabilities [11]. This has many hidden advantages.
19 | 1 2 4
Figure 2: Creating the Stupa model
International Journal of Conceptions on Computing and Information Technology
Vol.2, Issue 1, Jan’ 2014; ISSN: 2345 - 9808

The face created in the previous step is rotated about
the vertical axis using the Followme tool to build the
dome.

Finally, Tee cube, cylindrical neck and the conical
spire are created.
IX. REQUIREMENT OF A 3D MODEL
Many ancient Sri Lankan stupas were constructed over
1000 years ago and have undergone natural decay due to
exposure to extreme weather conditions. Some of these Stupas
were restored and majority is awaiting restoration [12].
Over the past few decades several governmental and non
governmental agencies embarked on various projects to
restore these ancient stupas. One major problem faced by
those who restore these stupas is that there are no design
standards for stupas. Another problem is that not only
engineering, but also religious requirements need to be
considered in the restoration process [12].
In order to carry out a structural analysis and then a
structural design a 3D model is required. One option is to
create a physical model. This is not economically viable. The
next available option is to create a computer model. Computer
model is easy to create and can be used to analyze a wide range
of loading patterns and materials. Further, it can be used to
simulate the behavior of the structure when exposed to extreme
weather conditions.
used very efficiently to develop 3D models. Sketchup user
base has expanded widely over the past few years. As a result
of this expansion a wide variety of Ruby plug ins have been
developed by the users. Majority of the plug ins are available
free, where as some plug ins require a modest fee.
In this research a Ruby extension was developed to create
3D models of ancient Sri Lankan stupas. The Ruby extension
consists of a main program and a Ruby class. The Ruby class
contains all necessary algorithms to create the 3D model of the
stupa. The main program creates a stupa object and invokes its
methods. The methods were parameterized by the radius of the
footprint, the height and shape of the stupa.
A finite element analysis plug in is available for Sketchup.
This plug in can be very useful for the stupa designers. The
stress distribution of the stupa under different loadings and
construction materials can be evaluated using this plug in.
Then a structural design can be carried out using the output of
the finite element analysis. The information collected from the
finite element analysis is helpful not only in the restoration but
also in the construction of new stupas.
3D models and 2D photographs of three different types of
stupas are shown in Figs 3, 4 and 5.
X. FINITE ELEMENT ANALYSIS TOOLS AND SKETCH UP
In recent years Finite Element Analysis has gained
popularity in various disciplines of engineering. Numerical
solutions to very complex problems can be obtained using this
technique. In spite of the advantages the inherent
disadvantages of computer solutions must be kept in mind in
using this and similar methods.
As a result of the ever expanding user base of Skethcup
software, some of the developers had created tools (Ruby
extensions) to carry out finite element analysis of Sketchup 3D
models. These tools require the loading pattern of a structure
to perform finite element analysis. Using these tools, a user
can observe the variation of stresses on a structure for a wide
range of loading patterns.
Figure 3: 3D model and a 2D photograph of a bubble shaped stupa
This model can also be used to evaluate the optimum
shape of the dome. However, it should be noted that the shape
of the dome is governed by religious requirements and not
structural requirements.
The goal of this research was to develop a 3D model of a
Sri Lankan stupa. The stability and finite element analysis are
outside the scope of this research.
XI. CONCLUSION
Sketchup is a 3D modeling program developed by Google
Inc. Ruby is an OOP programming language similar to JAVA.
Sketchup has a Ruby API, which makes is possible to
automate the Sketchup commands. Sketchup and Ruby can be
20 | 1 2 4
Figure 4: 3D model and a 2D photograph of a heap shaped stupa
International Journal of Conceptions on Computing and Information Technology
Vol.2, Issue 1, Jan’ 2014; ISSN: 2345 - 9808
[2]
Figure 5: 3D model and a 2D photograph of a bell shaped stupa
REFERENCES
[1]
Wikipedia
“History
of
stupa”
http://www.stupas.org/history_of_stupas.html (Date accessed October
2012)
Wikipedia
“Ancient
Constructions
of
Sri
lanka”
http://en.wikipedia.org/wiki/Ancient_Constructions_of_Sri_Lanka,
(Date accessed October 2012)
[3] Paranavithana S., “The Stupa in Ceylon”, Memories of the
Archeological Survey of Ceylon, Vol. 5, Colombo Museum, Sri Lanka,
1946
[4] Wilhelm Geiger(Translator) “Mahawamsa or the Great Chronicle of
Ceylon”, Information Department , Ceylon, 1950
[5] Sylvia Somerville, ‘Stupa- Symbols of Enlightned Mind”
http://www.stupas.org/history_of_stupas.html (date accessed August
2012).
[6] P. M. Ranaweera “ Ancient stupas in Sri Lanka-Largest brick structures
in the world” CHS Newsletter 70, Construction History Society,
London, 2004
[7] Bonnie R, P.E, “Google Sketchup Cookbook” O’Reilly, 2010
[8] Bonnie R, P.E, “Google Sketchup 8, Hands on Exercises” 3DVINCI ebook, 2010.
[9] Wikipedia
“Ruby
(Programming
Language)”
http://en.wikipedia.org/wiki/Ruby_%28programming_language%29
(Date accessed October 2012)
[10] Dave Thomas, “Programming Ruby: The Pragmatic Programmers
Guide” Pragmatic Bookshelf, 2004
[11] Chopra A. “Google Sketchup for Dummies”, Wiley, 2008.
[12] Silva W.N.G. “Conservation of ancient dagobas in Sri Lanka”,
Constructor Vol 7 – No2, Colombo, 2002
21 | 1 2 4