DISLIN Examples / GCL

Demonstration of CURVE / GCL

%GCL
// Demonstration of CURVE

N=101
PI    = 3.1415926

XRAY  = FALLOC (N)  // Allocates array and initializes with 0,1,..,n-1  
XRAY  = XRAY * 3.6
YRAY1 = SIN (XRAY * PI / 180.)
YRAY2 = COS (XRAY * PI / 180.)

METAFL ('CONS')
DISINI ()
COMPLX ()
PAGERA ()

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 
TITLIN ('Demostration of CURVE', 2)
TICKS  (9, 'X')
TICKS  (10, 'Y')
LABDIG (-1, 'X')

IC=INTRGB(0.95,0.95,0.95)
AXSBGD (IC)
   
GRAF   (0.,360.,0.,90.,-1.,1.,-1.,0.5)
SETRGB (0.7,0.7,0.7)
GRID   (1,1)

COLOR  ('FORE')
HEIGHT (50) 
TITLE  ()

COLOR  ('RED')
CURVE  (xray, yray1, n)
COLOR  ('GREEN')
CURVE  (xray, yray2, n)
DISFIN ()

Polar Plots / GCL

%GCL
// Polar Plots

N=300
M=10
STEP = 360./(N-1)
F    = STEP * 3.1415926 / 180.
Y1  = FALLOC (N) * F 
X1  = SIN (5 * Y1)
X2  = FALLOC (M) + 1
Y2  = FALLOC (M) + 1

SETPAG ('DA4P')
METAFL ('CONS')
DISINI ()
HWFONT ()
PAGERA ()

TITLIN ('Polar Plots', 2)
TICKS  (3, 'Y')
AXENDS ('NOENDS', 'X')
LABDIG (-1, 'Y')
AXSLEN (1000, 1000)
AXSORG (1050, 900)

GRAFP  (1.,0., 0.2, 0., 30.)
CURVE  (x1, y1, n)
HTITLE (50)
TITLE  ()
ENDGRF ()

LABDIG (-1, 'X')
AXSORG (1050, 2250)
LABTYP ('VERT', 'Y')
GRAFP  (10.,0.,2.,0.,30.)
BARWTH (-5.)
POLCRV ('FBARS')
CURVE  (x2, y2, m)

DISFIN ()

Symbols / GCL

%GCL
// Symbols

CHAR CSTR[3]
CTIT='Symbols'

SETPAG ('DA4P')
METAFL ('CONS')
DISINI ()
PAGERA ()

COMPLX ()
HEIGHT (60)
NL = NLMESS (CTIT)
MESSAG (CTIT, (2100 - NL) / 2, 200)

HEIGHT (50)
HSYMBL (120)

NY = 150
DO I=0,23
  IF ((I % 4) == 0)
    NY = NY + 400
    NXP = 550
  ELSE
    NXP = NXP + 350
  END IF

  SPRINTF (CSTR, '%d', I)
  NL = NLMESS (CSTR) 
  MESSAG (CSTR, NXP - NL / 2, NY + 150)
  SYMBOL (I, NXP, NY)
END DO

DISFIN ()

Interpolation Methods / GCL

%GCL
// Interpolation Methods

X = {0.,1.,3.,4.5,6.,8.,9.,11.,12.,12.5,13.,15.,16.,17.,19.,20.}
Y = {2.,4.,4.5,3.,1.,7.,2.,3.,5.,2.,2.5,2.,4.,6.,5.5,4.}
NYA = 2700

SETPAG ('DA4P')
METAFL ('CONS')
DISINI ()
COMPLX ()
PAGERA ()
INCMRK (1)
HSYMBL (25)
TITLIN ('Interpolation Methods',1)
AXSLEN (1500,350)
SETGRF ('LINE','LINE','LINE','LINE')
IC=INTRGB (1.0,1.0,0.0)
AXSBGD (IC)

DO I=0,5
  IF (I == 0)
    CPOL = 'SPLINE'
  ELSE IF (I == 1)
    CPOL = 'STEM'
  ELSE IF (I == 2)
    CPOL = 'BARS'
  ELSE IF (I == 3)
    CPOL = 'STAIRS'
  ELSE IF (I == 4)
    CPOL = 'STEP'
  ELSE IF (I == 5)
    CPOL = 'LINEAR'
  END IF 

  AXSPOS (350,NYA-I*350)
  POLCRV (CPOL)
  MARKER (16)

  GRAF   (0.,20.,0.,5.,0.,10.,0.,5.)
  NX=NXPOSN (1.)
  NY=NYPOSN (8.)
  MESSAG (CPOL,NX,NY)
  COLOR  ('RED') 
  CURVE  (X,Y,16)
  COLOR  ('FORE')

  IF (I == 5) 
    HEIGHT (50)
    TITLE ()
  END IF
  ENDGRF ()
END DO

DISFIN ()

Bar Graphs / GCL

%GCL
// Bar Graphs

N     = 9
XRAY  = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0}
YRAY1 = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
YRAY2 = { 1.0, 1.5, 2.5, 1.3, 2.0, 1.2, 0.7, 1.4, 1.1}
YRAY3 = { 2.0, 2.7, 3.5, 2.1, 3.2, 1.9, 2.0, 2.3, 1.8}
YRAY4 = { 4.0, 3.5, 4.5, 3.7, 4.0, 2.9, 3.0, 3.2, 2.6}

SETPAG ('DA4P')
METAFL ('CONS')
DISINI ()
PAGERA ()
COMPLX ()

TICKS  (1, 'X')
INTAX  ()
AXSLEN (1600, 700)
TITLIN ('Bar Graphs', 3)

LEGINI (CBUF, 3, 8)
LEGLIN (CBUF, 'FIRST' , 1)
LEGLIN (CBUF, 'SECOND', 2)
LEGLIN (CBUF, 'THIRD' , 3)
LEGTIT (' ')

SHDPAT (5)
AXSPOS (300, 2700) 
GRAF   (0.,10.,0.,1.,0.,5.,0.,1.)

BARGRP (3, 0.15)
COLOR  ('RED')
BARS   (XRAY, YRAY1, YRAY2, N)

COLOR  ('GREEN')
BARS   (XRAY, YRAY1, YRAY3, N)

COLOR  ('BLUE')
BARS   (XRAY, YRAY1, YRAY4, N)

COLOR  ('FORE')
RESET  ('BARGRP')
LEGEND (CBUF, 7)
ENDGRF ()

LABELS('NONE','X')
AXSPOS (300, 1900) 
GRAF   (0.,10.,0.,1.,0.,5.,0.,1.)
HEIGHT (30)
LABELS ('DELTA',  'BARS')
LABPOS ('CENTER', 'BARS')
COLOR  ('RED')
BARS   (XRAY, YRAY1, YRAY2, N)

COLOR  ('GREEN')
BARS   (XRAY, YRAY2, YRAY3, N)

COLOR  ('BLUE')
BARS   (XRAY, YRAY3, YRAY4, N)

COLOR  ('FORE')
HEIGHT (36)
LEGEND (CBUF, 7)
ENDGRF ()

AXSPOS (300, 1100) 
GRAF   (0.,10.,0.,1.,0.,5.,0.,1.)
LABELS ('SECOND', 'BARS')
LABPOS ('OUTSIDE', 'BARS')
COLOR  ('RED')

BARS   (XRAY, YRAY1, YRAY2, N)

COLOR  ('FORE')
HEIGHT (50)
TITLE  ()
ENDGRF ()

DISFIN ()

Pie Charts / GCL

%GCL
// Pie Charts (PIEGRF)

n = 5
xray = {1.0, 2.5, 2.0, 2.7, 1.8}

setpag ('da4p')
metafl ('cons')
disini ()
pagera ()
complx ()
axslen (1600,1000)
titlin ('Pie Charts (PIEGRF)', 2)
chnpie ('both')

legini (cbuf, 5, 8)
leglin (cbuf, 'FIRST',  1)
leglin (cbuf, 'SECOND', 2)
leglin (cbuf, 'THIRD',  3)
leglin (cbuf, 'FOURTH', 4)
leglin (cbuf, 'FIFTH',  5)

patcyc (1, 7)
patcyc (2, 4)
patcyc (3, 13)
patcyc (4, 3)
patcyc (5, 5)

axspos (250, 2800)
piegrf (cbuf, 1, xray, n)
endgrf ()

axspos (250, 1600)
labels ('data', 'pie')
labpos ('external', 'pie')
piegrf (cbuf, 1, xray, n)

height (50)
title  ()

disfin ()

3-D Bar Graph / 3-D Pie Chart / GCL

%GCL
// 3-D Bar Graph / 3-D Pie Chart

CHAR CBUF[80]
XRAY   = {2.,4.,6.,8.,10.}
Y1RAY  = {0.,0.,0.,0.,0.}
Y2RAY  = {3.2,1.5,2.0,1.0,3.0}
IC1RAY = {50,150,100,200,175}
IC2RAY = {50,150,100,200,175}

METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
PAGERA ()
HWFONT ()

TITLIN ('3-D Bar Graph / 3-D Pie Chart', 2)
HTITLE (40)

SHDPAT (16)
AXSLEN (1500,1000)
AXSPOS (300,1400)

BARWTH (0.5)
BARTYP ('3DVERT')
LABELS ('SECOND','BARS')
LABPOS ('OUTSIDE','BARS')
LABCLR (255,'BARS')
GRAF   (0.,12.,0.,2.,0.,5.,0.,1.)
TITLE  ()
COLOR  ('RED')
BARS   (XRAY,Y1RAY,Y2RAY,5)
ENDGRF ()

SHDPAT (16)
LABELS ('DATA','PIE')
LABCLR (255,'PIE')
CHNPIE ('NONE')
PIECLR (IC1RAY,IC2RAY,5)
PIETYP ('3D')
AXSPOS (300,2700)
PIEGRF (CBUF,0,Y2RAY,5)       
DISFIN ()

3-D Bars / BARS3D / GCL

%GCL
// 3-D Bars / BARS3D
CHAR CBUF[80]

N = 18
FLOAT XWRAY[18], YWRAY[18]
XRAY = {1., 3., 8., 1.5, 9., 6.3, 5.8, 2.3, 8.1, 3.5,   @
        2.2, 8.7, 9.2, 4.8, 3.4, 6.9, 7.5, 3.8}
YRAY = {5., 8., 3.5, 2., 7., 1.,4.3, 7.2, 6.0, 8.5,     @
       4.1, 5.0, 7.3, 2.8, 1.6, 8.9, 9.5, 3.2}
Z1RAY = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,        @
         0., 0., 0., 0., 0., 0., 0., 0.}
Z2RAY = {4.,5.,3.,2.,3.5,4.5,2.,1.6,3.8,4.7,            @
       2.1, 3.5, 1.9, 4.2, 4.9, 2.8, 3.6, 4.3}
ICRAY = {30, 30, 30, 30, 30, 30, 100, 100, 100, 100,    @
         100, 100, 170, 170, 170, 170, 170, 170}

DO I=0,N-1
  XWRAY[I]=0.5
  YWRAY[I]=0.5
END DO

SETPAG ('DA4P')
DISINI ()
PAGERA ()
HWFONT ()
AXSPOS (200,2600)
AXSLEN (1800,1800)

NAME   ('X-axis','X')
NAME   ('Y-axis','Y')
NAME   ('Z-axis','Z')

TITLIN ('3-D Bars / BARS3D',3)

LABL3D ('HORI')
GRAF3D (0.,10.,0.,2.,0.,10.,0.,2.,0.,5.,0.,1.)
GRID3D (1,1,'BOTTOM')

BARS3D (XRAY,YRAY,Z1RAY,Z2RAY,XWRAY,YWRAY,ICRAY,N)
LEGINI (CBUF,3,20)
LEGTIT (' ')
LEGPOS (1300,1100)
LEGLIN (CBUF,'First',1)
LEGLIN (CBUF,'Second',2)
LEGLIN (CBUF,'Third',3)
LEGEND (CBUF,3)

HEIGHT (50)
TITLE  ()
DISFIN () 

Shading Patterns / GCL

%GCL
// Shading Patterns

CHAR CSTR[3]
IX = {0, 300, 300, 0}
IY = {0, 0, 400, 400}
CTIT = 'Shading Patterns (AREAF)'

METAFL ('CONS')
DISINI ()
SETVLT ('SMALL')
PAGERA ()
COMPLX ()

HEIGHT (50)
NL = NLMESS (CTIT)
NX = (2970 - NL) / 2
MESSAG (CTIT, NX, 200)

NX0 = 335
NY0 = 350

DO I=1,3
  NY = NY0 + (I - 1) * 600
  DO J=1,6
    ICLR = (I - 1) * 6 + J - 1
    ICLR = ICLR % 8
    IF (ICLR == 0) ICLR = 8
    SETCLR (ICLR)
    NX = NX0 + (J - 1) * 400
    II = (I - 1) * 6 + J - 1
    SHDPAT (II)
    SPRINTF (CSTR, '%2d', II)

    IXP = IX + NX
    IYP = IY + NY
    AREAF(IXP,IYP,4)

    NL = NLMESS (CSTR)
    NX = NX + (300 - NL) / 2
    MESSAG (CSTR, NX, NY + 460)
  END DO
END DO

DISFIN ()

3-D Colour Plot / GCL

%GCL
// 3-D Colour Plot
 
N = 100
FLOAT ZMAT[N,N], XRAY[N]

PI = 3.1415927
STEP = 2. * PI / (N - 1)

DO I = 0, N - 1
  XRAY[I] = SIN (I * STEP)
END DO

DO J = 0, N - 1
  ZMAT[*,J] = 2 * XRAY * SIN (J * STEP)
END DO

METAFL ('CONS')
DISINI ()
COMPLX ()
PAGERA ()

DIGITS (-1, 'XYZ')
NAME   ('X-Achse', 'X') 
NAME   ('Y-Achse', 'Y') 
NAME   ('Z-Achse', 'Z') 
TITLIN ('3-D Colour Plot of the Function', 1)
TITLIN ('F(X,Y) = 2 * SIN(X) * SIN(Y)', 3)

AUTRES (N, N)
GRAF3  (0.,360.,0.,90.,0.,360.,0.,90.,-2.,2.,-2.,1.0)
TITLE  ()

CRVMAT (ZMAT, N, N, 1, 1)
MPAEPL (3)
DISFIN ()


Surface Plot / GCL

%GCL
// Surface Plot
N = 100
FLOAT ZMAT[N,N], XRAY[N]

PI = 3.1415927
STEP = 2. * PI / (N - 1)

DO I = 0, N - 1
  XRAY[I] = SIN (I * STEP)
END DO

DO J = 0, N - 1
  ZMAT[*,J] = 2 * XRAY * SIN (J * STEP)
END DO

METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
COMPLX ()
PAGERA ()

AXSPOS (200, 2600)
AXSLEN (1800, 1800)

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 
NAME   ('Z-axis', 'Z') 

TITLIN ('Surface Plot (SURMAT)', 2)
TITLIN ('F(X,Y) = 2 * SIN(X) * SIN(Y)', 4)

VIEW3D (-5.,-5.,4.,'ABS') 
GRAF3D (0.,360.,0.,90.,0.,360.,0.,90.,-3.,3.,-3.,1.)
HEIGHT (50)
TITLE  ()

COLOR  ('GREEN')
SHLSUR ()
SURMAT (ZMAT, N, N, 1, 1)

DISFIN ()

Shaded Surface Plot / GCL

%GCL
// Surface Plot
N = 50
FLOAT ZMAT[N,N], XRAY[N], YRAY[N]

PI = 3.1415927
STEP = 2. * PI / (N - 1)

DO I = 0, N - 1
  XRAY[I] = SIN (I * STEP)
END DO

DO J = 0, N - 1
  ZMAT[*,J] = 2 * XRAY * SIN (J * STEP)
END DO

STEP = 360. / (N - 1)
DO I = 0, N - 1
  XRAY[I] = I * STEP
  YRAY[I] = I * STEP
END DO

METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
COMPLX ()
PAGERA ()

AXSPOS (200, 2600)
AXSLEN (1800, 1800)

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 
NAME   ('Z-axis', 'Z') 

TITLIN ('Shaded Surface Plot', 2)
TITLIN ('F(X,Y) = 2 * SIN(X) * SIN(Y)', 4)

VIEW3D (-5.,-5.,4.,'ABS') 
GRAF3D (0.,360.,0.,90.,0.,360.,0.,90.,-3.,3.,-3.,1.)
HEIGHT (50)
TITLE  ()

SHDMOD ('SMOOTH','SURFACE')
SURSHD (XRAY,N,YRAY,N,ZMAT)

DISFIN ()

Contour Plot / GCL

%GCL
// Contour Plot

N = 100
FLOAT ZMAT[N,N], XRAY[N]

FPI = 3.1415927 / 180.
STEP = 360. / (N - 1)
X = FALLOC (N) * STEP
Y = FALLOC (N) * STEP

DO J = 0, N - 1
  ZMAT[*,J] = 2 * SIN (X * FPI) * SIN (Y[J] * FPI)
END DO

METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
COMPLX ()
PAGERA ()

INTAX  ()
AXSPOS (450, 2670)

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 

TITLIN ('Contour Plot', 2)
TITLIN ('F(X,Y) = 2 * SIN(X) * SIN(Y)', 4)

GRAF (0.,360.,0.,90.,0.,360.,0.,90.)

HEIGHT (30)
DO I = 1,9
  ZLEV = -2.0 + (I - 1) * 0.5
   IF (I == 5)
    LABELS ('NONE', 'CONTUR')
   ELSE
    LABELS ('FLOAT', 'CONTUR')
  END IF
  CONTUR (X, N, Y, N, ZMAT, ZLEV) 
END DO

HEIGHT (50)
TITLE  ()
DISFIN ()

Shaded Contour Plot / GCL

%GCL
// Shaded Contour Plot

N = 100
FLOAT ZMAT[N,N], XRAY[N], YRAY[N], ZLEV[12]

STEP = 1.6 / (N - 1)
XRAY = FALLOC (N) * STEP
YRAY = FALLOC (N) * STEP
X    = XRAY * XRAY - 1

DO J = 0, N - 1
  Y=YRAY[J] * YRAY[J] - 1.
  ZMAT[*,J] = X * X + Y * Y
END DO

METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
COMPLX ()
PAGERA ()

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 

MIXALF ()
TITLIN ('Shaded Contour Plot', 1)
TITLIN ('F(X,Y) = (X[2$ - 1)[2$ + (y[2$ - 1)[2$', 3)

SHDMOD ('POLY', 'CONTUR')
AXSPOS (450, 2670)
GRAF   (0., 1.6, 0., 0.2, 0., 1.6, 0., 0.2)

HEIGHT (30)
DO I = 0, 11
  ZLEV[11-I] = 0.1 + I * 0.1
END DO

CONSHD (XRAY, N, YRAY, N, ZMAT, ZLEV, 12) 

HEIGHT (50)
TITLE  ()
DISFIN ()


Shaded Surface / Contour Plot / GCL

%GCL
// Shaded Surface / Contour Plot
N = 50
NLEV = 20
FLOAT ZMAT[N,N], XRAY[N], YRAY[N], ZLEV[NLEV]

PI = 3.1415927
STEP = 2. * PI / (N - 1)

DO I = 0, N - 1
  XRAY[I] = SIN (I * STEP)
END DO

DO J = 0, N - 1
  ZMAT[*,J] = 2 * XRAY * SIN (J * STEP)
END DO

STEP = 360. / (N - 1)
DO I = 0, N - 1
  XRAY[I] = I * STEP
  YRAY[I] = I * STEP
END DO

SCRMOD('REVERS')
METAFL ('CONS')
SETPAG ('DA4P')
DISINI ()
HWFONT ()
PAGERA ()

AXSPOS (200, 2600)
AXSLEN (1800, 1800)

NAME   ('X-axis', 'X') 
NAME   ('Y-axis', 'Y') 
NAME   ('Z-axis', 'Z') 

TITLIN ('Shaded Surface / Contour Plot', 2)
TITLIN ('F(X,Y) = 2 * SIN(X) * SIN(Y)', 4)

GRAF3D (0.,360.,0.,90.,0.,360.,0.,90.,-3.,3.,-3.,1.)
HEIGHT (50)
TITLE  ()

GRFINI (-1.,-1.,-1.,1.,-1.,-1.,1.,1.,-1.)
NOGRAF ()
GRAF   (0.,360.,0.,90.,0.,360.,0.,90.)
STEP = 4. / NLEV
DO I = 0, NLEV - 1
  ZLEV[i] = -2.0 + I * STEP
END DO

CONSHD(XRAY,N,YRAY,N,ZMAT,ZLEV,NLEV)
BOX2D  ()
RESET  ('NOGRAF')
GRFFIN ()

SHDMOD ('SMOOTH','SURFACE')
SURSHD (XRAY,N,YRAY,N,ZMAT)
DISFIN ()

Spheres and Tubes / GCL

%GCL
// Spheres and Tubes
X = {10., 20., 10., 20., 5., 15., 25., 5., 15., 25.,   @
      5., 15., 25., 10., 20., 10., 20.}
Y = {10., 10., 20., 20., 5., 5., 5., 15., 15., 15.,    @
     25., 25., 25., 10., 10., 20., 20.}
Z = {5., 5., 5., 5., 15., 15., 15., 15., 15., 15.,     @
    15., 15., 15., 25., 25., 25., 25.}
IDX  = {1, 2, 1, 3, 3, 4, 2, 4, 5, 6, 6, 7, 8, 9, 9, 10,  @
       11, 12, 12, 13,  5, 8, 8, 11, 6, 9, 9, 12, 7, 10,  @
       10, 13,  14, 15, 16, 17, 14, 16, 15, 17,           @
        1, 5, 2, 7, 3, 11, 4, 13, 5, 14, 7, 15, 11, 16, 13, 17}

SETPAG ('da4p')
SCRMOD ('revers')
METAFL ('cons')
DISINI ()
PAGERA ()
HWFONT ()

LIGHT  ('on')
MATOP3 (0.02, 0.02, 0.02, 'specular')

CLIP3D ('none')
AXSPOS (0,2500)
AXSLEN (2100,2100)

HTITLE (50)
TITLIN ('Spheres and Tubes', 4)

NAME   ('X-axis', 'x')
NAME   ('Y-axis', 'y')
NAME   ('Z-axis', 'z')

LABDIG (-1, 'xyz')  
LABL3D ('hori')
GRAF3D (0., 30., 0., 5., 0., 30., 0., 5., 0., 30., 0., 5.)
TITLE  ()

SHDMOD ('smooth', 'surface')
IRET = ZBFINI()
MATOP3 (1.0, 0.0, 0.0, 'diffuse')

DO I=0,16
  SPHE3D (X[I],Y[I],Z[I],2.0,50,25)
END DO

MATOP3(0.0, 1.0, 0.0, 'diffuse')
DO I=0,55,2
  J1=IDX[I]-1
  J2=IDX[I+1]-1
  TUBE3D (X[J1],Y[J1],Z[J1],X[J2],Y[J2],Z[J2],0.5,10,5)
END DO
ZBFFIN ()
DISFIN ()

Some Solids / GCL

%GCL
// Some Solids
SETPAG ('da4p')
SCRMOD ('revers')
METAFL ('cons')
DISINI ()
PAGERA ()
HWFONT ()
LIGHT  ('on')
LITOP3 (1,0.5,0.5,0.5,'ambient')

MATOP3 (1.0,0.5,0.0,'diffuse')

CLIP3D ('none')
AXSPOS (0, 2500)
AXSLEN (2100, 2100)

HTITLE (60)
TITLIN ('Some Solids', 4)

NOGRAF ()
GRAF3D (-5., 5., -5., 2., -5., 5., -5., 2., -5., 5., -5., 2.)
TITLE  ()
 
SHDMOD ('smooth', 'surface')
IRET = ZBFINI ()

MATOP3 (1.0,0.5,0.0,'diffuse')
TUBE3D (-3., -3., 8.0, 2., 3., 5.5, 1., 40, 20) 

ROT3D  (-60., 0., 0.) 
MATOP3 (1.0, 0.0, 1.0, 'diffuse')
SETFCE ('bottom')
MATOP3 (1.0, 0.0, 0.0, 'diffuse')
CONE3D (-3., -3., 3.5, 2., 3., 3., 40, 20)
SETFCE ('top')

ROT3D  (0., 0., 0.) 
MATOP3 (0.0, 1.0, 1.0, 'diffuse')
PLAT3D (4., 4., 3., 3., 'icos')

ROT3D(0., 0., 0.) 
MATOP3(1.0, 1.0, 0.0, 'diffuse')
SPHE3D (0., 0., 0., 3., 40, 20)

ROT3D  (0., 0., -20.) 
MATOP3 (0.0, 0.0, 1.0, 'diffuse')
QUAD3D (-4., -4., -3., 3., 3., 3.)

ROT3D  (0., 0., 30.) 
MATOP3 (1.0, 0.3, 0.3, 'diffuse')
PYRA3D (-2., -5., -10., 3., 5., 5., 4)

ROT3D  (0., 0., 0.) 
MATOP3 (1.0, 0.0, 0.0, 'diffuse')
TORUS3D(7., -3., -2., 1.5, 3.5, 1.5, 0., 360., 40, 20)
ROT3D  (0., 90., 0.) 

MATOP3 (0.0, 1.0, 0.0, 'diffuse')
TORUS3D(7., -5., -2., 1.5, 3.5, 1.5, 0., 360., 40, 20)

ZBFFIN ()
DISFIN ()

Map Plot / GCL

%GCL
// World Coastlines and Lakes

METAFL ('CONS')
DISINI ()
PAGERA ()
COMPLX ()

AXSPOS (400, 1850)
AXSLEN (2400, 1400)

NAME   ('Longitude', 'X')
NAME   ('Latitude', 'X')
TITLIN ('World Coastlines and Lakes', 3)

LABELS ('MAP', 'XY')
GRAFMP (-180.,180.,-180.,90.,-90.,90.,-90.,30.)

GRIDMP (1, 1)
COLOR  ('GREEN')
WORLD  ()
COLOR  ('FORE')

HEIGHT (50)
TITLE  ()
DISFIN ()

TeX Instructions for Mathematical Formulas / GCL

%GCL

CSTR='TeX Instructions for Mathematical Formulas'

SETPAG('DA4P')
DISINI()
PAGERA()
COMPLX()
HEIGHT(40)

NL=NLMESS(CSTR)
MESSAG(CSTR, (2100 - nl)/2, 100)
  
TEXMOD('ON')
MESSAG('$\frac{1}{x+y}$', 150, 400)
MESSAG('$\frac{a^2 - b^2}{a+b} = a - b$', 1200, 400)
  
MESSAG('$r = \sqrt{x^2 + y^2}', 150, 700)
MESSAG('$\cos \phi = \frac{x}{\sqrt{x^2 + y^2}}$', 1200, 700)

MESSAG('$\Gamma(x) = \int_0^\infty e^{-t}t^{x-1}dt$', 150, 1000)
MESSAG('$\lim_{x \to \infty} (1 + \frac{1}{x})^x = e$', 1200, 1000)

MESSAG('$\mu = \sum_{i=1}^n x_i p_i$', 150, 1300)
MESSAG('$\mu = \int_{-\infty}^ \infty x f(x) dx$', 1200, 1300)

MESSAG('$\overline{x} = \frac{1}{n} \sum_{i=1}^n x_i$', 150, 1600)
MESSAG('$s^2 = \frac{1}{n-1} \sum_{i=1}^n (x_i - \overline{x})^2$',1200, 1600)

MESSAG('$\sqrt[n]{\frac{x^n - y^n}{1 + u^{2n}}}$', 150, 1900)  
MESSAG('$\sqrt[3]{-q + \sqrt{q^2 + p^3}}$', 1200, 1900)

MESSAG('$\int \frac{dx}{1+x^2} = \arctan x + C$', 150, 2200)
MESSAG('$\int \frac{dx}{\sqrt{1+x^2}} = {\rm arsinh} x + C$', 1200, 2200)

MESSAG('$\overline{P_1P_2} = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$', 150,2500)
MESSAG('$x = \frac{x_1 + \lambda x_2}{1 + \lambda}$', 1200, 2500)

DISFIN()
Zur Redakteursansicht