Title: Z. Zhu, S. Ordonez, C. Kasten, May 20003
1Z. Zhu, S. Ordonez, C. Kasten, May 20003
2Language Overview
- jGTL is a high-level interpreter language.
- Basic Language functions are implemented in jGTL
like in C. - jGTL is focus on 3D graphic transformations, such
as object scaling, translation, rotation, and
projection.
3Major Features
- Simple
- Simple syntax (similar to Java and C) and
transformation functions. - Intuitive
- An intuitive approach to 3D graphic
definition and manipulation. - Friendly Programming
- Graphical IDE makes coding in jGTL easy and
convenient for error checking. - Object-Oriented
- Each defined point, matrix, and group of
points is represented by an object.
4Why jGTL?
OpenGL Utility Library (GLU) provides about 150
distinct commands to specify the objects and
operations
The graphics libraries of most popular
languages, such as Borland C and Java, are very
large and complex.
Graphic definitions using Java 3D is complicated
and verbose.
5Why jGTL?
The jGTL language provides a powerful and simple
approach to 3D graphics programming.
With this object-oriented language and its
graphic development environment, users can
control the geometrical transformation of 3D
objects easily and quickly.
- It is good for the user without much
computer programming experience and graphical
knowledge to learn and create complex 3D
graphical objects.
6(No Transcript)
7jGTL Grammar----What this language can do?
BASIC Graphics
8Data Flow Control if-else
Java-like
If n1lt0 then n2n2n1 n3n22
else n30
9Iterationfor-loop
Java-like
for(n11 n1lt10 n1n11)
n_fn_fn1
10System Commands
Graphic output JdrawPoint( ) JdrawLine(
) JdrawConfig( )
Text output JprintLine( ) JprintList ( )
11Language Components and Interfaces
12Code StructureIDE
13Design Features
14Design Features
- Graphic output and Text output
15Design Features
- Simultaneous help document checking
16Design Features
- Object-oriented Language
- Compile error report and handle
17Applications--Sphere Ring
/Draw Double Courves/ for(ni-n_
max_x nilt(n_max_x0.05) nini0.05)
n_parasin(ni3.1416/n_max_x) n_z
n_max_zn_para n_y n_max_yn_para n_cr
0.50.5n_para n_cg0.50.5sin(
(ni/n_max_x1/3)3.1416) n_cb0.50.5sin(
(ni/n_max_x2/3)3.1416) Â p1ni, n_y,
-n_z p2-ni, n_y, n_z JdrawPoint(p1,
0.0, n_cg, n_cb, n_r) JdrawPoint(p2, n_cr,
0.0, n_cb, n_r)
18(No Transcript)
19Applications--Colorful Circle
for(ni5 nilt360 nini5)
p21JRotate(ni, 1.0, 0.0, 0.0)-gtpt1 n_cr
0.50.5sin(3.1416(ni/1802/3)) n_cg
0.50.5sin(3.1416ni/180)
n_cb0.50.5sin(3.1416(ni/1801/3))
JdrawPoint(pt1, n_cr, n_cg, n_cb, 0.06)
JdrawLine(p0, pt1, n_cr, n_cg, n_cb, 0.04)
20(No Transcript)
21(No Transcript)
22Applications--Body Center Structure NaCl
//Initial B type Points g2 lt gt
n0-n_bondn_bond/2 for(nin0 niltn_bond
ninin_bond) for(njn0 njltn_bond
njnjn_bond) for(nkn0
nkltn_bondnknkn_bond) p_b1ni,
nk, nj g2JAppend(p_b1)-gtg2
//End of for
23(No Transcript)
24Applications--Face Center Structure CsCl
25Applications--S3 Space Group Structure Silicon
/Draw Lines in a lattice Double for
loop/ g_totalJgetSize( )-gtn_total JprintLine
(n_total) for(ni0 niltn_total nini5)
g_totalJgetPoint(ni)-gtp_center for(njni1
njlt(ni4) njnj1)
g_totalJgetPoint(nj)-gtptemp
JdrawLine(p_center, ptemp, 1.0, 0.0, 0.0,
n_r2) //End
26(No Transcript)
27(No Transcript)
28(No Transcript)
29(No Transcript)
30Application--Amino Acids Aspartic acid
31Application--Amino Acids Aspartic
acid-Conformations
32Application--Amino Acids Aspartic
acid---Backbone Rotomer
33Software Process and Testing
Phase I Lexer, Parser test 1
Phase II Tree Walker test 2
Phase III Point, Group, Matrix Tree Walker
test 3
Phase IV Graphic Interface
test 4
Phase V Overall Maintenance
test 5- Regression Test
34Lessons from jGTL Project
- Compiler Implementation
- Difficulties Symbol Table, List Tree walker,
Language standardization - Error Handle
- Team Work
35Thank you!