12.08.2013 Views

Master's Thesis - Computer Graphics and Visualization - TU Delft

Master's Thesis - Computer Graphics and Visualization - TU Delft

Master's Thesis - Computer Graphics and Visualization - TU Delft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.1.2 Interface analysis<br />

This section explains the external requirements of the Culgi GPE, like the hardware interface, software<br />

interface <strong>and</strong> the system platform. Table 2-1 shows this information in general.<br />

Table 2-1 Overall situation of the Culgi GPE<br />

Item Culgi’s situation<br />

Platform - Cross platform<br />

Hardware interface - The Culgi GPE will run in personal computer.<br />

Software interface - The Culgi Library<br />

- The Tcl interpreter.<br />

As shown in Table 2-1 , the Culgi GPE will run on various platforms, at least on Windows <strong>and</strong> on<br />

Linux. And it is designed to run on a personal computer, so there are no special requirements in<br />

hardware.<br />

The Culgi GPE should have interfaces with the Culgi Library <strong>and</strong> Tcl interpreter. It should be able to<br />

load Tcl interpreter into the system, <strong>and</strong> then load the Cuigi library into the Tcl interpreter.<br />

Because the Culgi GPE is a bridge of the Culgi Library <strong>and</strong> Tcl scripts, it is very important to study the<br />

Culgi Library. The features of the comm<strong>and</strong>s in the Culgi library are listed below.<br />

1. The data types of almost all arguments of the Culgi comm<strong>and</strong>s are some primitive types, like string,<br />

integer or double. Culgi stores most of the data in some special structure which is hidden from the<br />

users. For example, the comm<strong>and</strong> BrownianDynamics, whose functionality is to calculate the next<br />

positions of the molecules, takes the time of calculation as the only arguments. Those data are<br />

stored in some global variables, <strong>and</strong> BrownianDynamics operates on these variables.<br />

2. The operations in the Culgi comm<strong>and</strong>s do not change the arguments. For example, in<br />

CreateDPDMolecules, an argument that needs to be set is the name of a molecule, whose data type<br />

should be string. But after this comm<strong>and</strong> has been executed, this string is still a string with no<br />

change in its contents. Only the Culgi system knows that there are some molecules in the system<br />

now having this name.<br />

3. The return values of the Culgi comm<strong>and</strong>s are void or string. The real data structure that stores the<br />

data is not returned.<br />

4. Some comm<strong>and</strong>s take the same arguments. The argument in a comm<strong>and</strong> some times will be<br />

referred to in another comm<strong>and</strong>. For example, the comm<strong>and</strong> CreateDPDMolecule takes the name<br />

of the module as a parameter. Then some other comm<strong>and</strong>s, like AddMoleculesViewable, may refer<br />

to this parameter in order to get the instance of the molecules.<br />

5. The general pipeline of a simulation program with Culgi consists of three steps.<br />

1) Create molecule models by giving the composition of each type of molecules.<br />

2) Create rendering windows <strong>and</strong> set the window if a user wants to make the simulation progress<br />

visible.<br />

3) Set the properties to the molecules <strong>and</strong> launch the simulation.<br />

6. The structures of the simulation programs of Culgi are always a sequence of comm<strong>and</strong>s. Almost no<br />

control structures are used, like “If-else” <strong>and</strong> “switch”. The only control structure used is a kind of<br />

- 6 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!