Author Topic: lines + xy coordinates with markings  (Read 3417 times)

0 Members and 1 Guest are viewing this topic.

Frankolinox

  • Guest
lines + xy coordinates with markings
« on: November 05, 2014, 08:30:24 AM »
topic: openGL

I have a simple problem with adding a little marking sequence in x -axes (with small vertical lines) and y-axes (with small horizontal lines). see my code example. thanks.

Code: [Select]
  includepath "$\inc\"
  $ FileName  "t.exe"
  'include    "RTL32.inc"
  'include    "RTL64.inc"
  $ title     "Lines + coordinate_system"
  include     "OpenglSceneFrame.inc"


  sub initialize(sys hWnd)
  '=======================
  end sub
  '

  sub scene(sys hWnd)
  '==================
  '
  double i
  static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
  '
  glLoadIdentity
  glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
  glClearColor 0.5, 0, 0, 0
  '
  '
  glrotatef    ang1, 0,0,1
  gltranslatef 0,0,-1
  glscalef     0.001,0.001,0.001
  '
  glLineWidth 3.0
  '
  glBegin GL_LINES
  glColor4ub  250,250,150,250
  glVertex2i -100,-100
  glVertex2i  100, 100
  glColor4ub  150,250,250,250
  glVertex2i -100, 100
  glVertex2i  100,-100
  glEnd
  '
  glLineWidth 2.0
  '
  ri=0
  glBegin GL_LINE_LOOP
  for i=0 to 360 step 10
    ra=rad(i)
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
  next
  glEnd
 
  '---------------------- new ------------------------- //
 
  glLineWidth 2.0
  glBegin GL_LINES
  glColor4ub  250,250,0,250
  '---------------- //
 
      ' -- x axis -------------
      glVertex2i -505,0
      glVertex2i 505,0
     
      ' -- y axis -------------
      glVertex2i  0,505
      glVertex2i  0,-505
 
  glColor4ub  0,0,250,250
 
  ' -- how to set small vertical lines on x axes and horizontal lines on y axes ? ---------------
 
  ' -- vertical marks on x axes ----- doesn't work here -----------
      for i = -405 to 405
        glVertex2i  i, -1.5  ' patterns like this one: --l--l--l--l--l--
        glVertex2i  i,  1.5  ' patterns like this one: --l--l--l--l--l--
       
        glVertex2i -1.5,i
        glVertex2i  1.5,i
      next 
  ' -- horizontal marks on y axes ----- doesn't work here -----------

  glEnd 
   
  '---------------- end new ---------------- //
 
  '
  'ang1+=angi1
  if ang1>360 then ang1-=360
  '
  end sub


  sub Release(sys hwnd)
  '====================
  end sub

regards, frank

Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #1 on: November 05, 2014, 03:04:22 PM »
Hi Frank,

You might find this procedure useful:

Code: OxygenBasic
  1.   sub linescale(optional float r,a,b,w)
  2.   =====================================
  3.   float i
  4.   float c,d
  5.   if not r then r=10.00 'length of line
  6.  if not a then a= 1.00 'tick interval
  7.  if not b then b= 0.3  'tick size
  8.  if not w then w= 5.0  'major interval count
  9.  glLineWidth 2
  10.   glBegin GL_LINES
  11.   glVertex2f .0 , .0
  12.   glVertex2f  r , .0
  13.   glend
  14.   'ticks
  15.  glLineWidth 1
  16.   glBegin GL_LINES
  17.   do
  18.     glVertex2f i,.0
  19.     if mod(c,w)=0 then d=-b*2 else d=-b
  20.     glVertex2f i,d
  21.     i+=a
  22.     c+=1.0
  23.     if i>r then exit do
  24.   end do
  25.   glEnd
  26.   end sub
  27.  

Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #2 on: November 06, 2014, 02:59:51 AM »

Deployed in an OpenGL console application:

  linescale 20.0, 1.0,  .3, 5  'X AXIS
  glRotatef  90,0,0,1
  linescale  10.0, 1.0, -.3, 5 'Y AXIS
  glRotatef -90,0,0,1


Code: OxygenBasic
  1.   % Title "Console Demo"
  2.  '% Animated
  3.  % ScaleUp
  4.  '% PlaceCentral
  5. '% AnchorCentral
  6.  include "$\inc\ConsoleG.inc"
  7.  
  8.   sub linescale(optional float r,a,b,w)
  9.   =====================================
  10.   float i
  11.   float c,d
  12.   if not r then r=10.00 'length of line
  13.  if not a then a= 1.00 'tick interval
  14.  if not b then b= 0.3  'tick size
  15.  if not w then w= 5.0  'major interval count
  16.  glLineWidth 2
  17.   glBegin GL_LINES
  18.   glVertex2f .0 , .0
  19.   glVertex2f  r , .0
  20.   glend
  21.   'ticks
  22.  glLineWidth 1
  23.   glBegin GL_LINES
  24.   do
  25.     glVertex2f i,.0
  26.     if mod(c,w)=0 then d=-b*2 else d=-b
  27.     glVertex2f i,d
  28.     i+=a
  29.     c+=1.0
  30.     if i>r then exit do
  31.   end do
  32.   glEnd
  33.   end sub
  34.  
  35.  
  36.   sub main
  37.   ========
  38.   static sys   imgn,res,wi,ht
  39.   cls
  40.  
  41.   pushstate
  42.  
  43.   move 5,-16
  44.   linescale 20.0, 1.0,  .3, 5  'X AXIS
  45.  glRotatef  90,0,0,1
  46.   linescale  10.0, 1.0, -.3, 5 'Y AXIS
  47.  glRotatef -90,0,0,1
  48.   'X AXIS VALUES
  49.  color .5,1
  50.   pushstate
  51.     move 0,-1.5
  52.     pushstate : move 00 : print  "0.0" : popstate
  53.     pushstate : move 10 : print "10.0" : popstate
  54.     pushstate : move 20 : print "20.0" : popstate
  55.   popstate
  56.   'Y AXIS VALUES
  57.  color .99,.50
  58.   pushstate
  59.     move -3.5
  60.     pushstate : move 0,00 : print " 000.0" : popstate
  61.     pushstate : move 0,05 : print " 500.0" : popstate
  62.     pushstate : move 0,10 : print "1000.0" : popstate
  63.   popstate
  64.   glLineWidth 2
  65.   glBegin GL_LINE_STRIP
  66.   color   1,1,0
  67.   glVertex2f  0, 1
  68.   glVertex2f 10, 3
  69.   glVertex2f 20, 9
  70.   glend
  71.  
  72.   popstate
  73.  
  74.   move 0,-.5
  75.   scale 2
  76.   printl "2D Graphics"
  77.   'static float ang
  78.  'ang+=.5 : if ang>=360 then ang-=360
  79.  end sub 'main
  80.  
  81.   EndScript
  82.  

.

Peter

  • Guest
Re: lines + xy coordinates with markings
« Reply #3 on: November 06, 2014, 03:21:03 AM »
Hi Frank,

Do you mean this ?
Code: [Select]
include "asm.inc"
include "asmgl.inc"

hwnd = window 640,480,1
init3D hwnd

double i
single s1,s2,s3,s4,ang1,angi1=1,ra,ri

while keydown(27)=0
ClearBuffer 0.5,0,0,0
SetMatrix

glrotatef    ang1,0.0,0.0,1.0
gltranslatef 0.0,0.0,-1.0
glscalef     0.002,0.002,0.0
 
glLineWidth 3.0
   
glBegin GL_LINES
glColor4ub  255,255,255,255
glVertex2i -100,-100
glVertex2i  100, 100
glColor4ub  150,250,250,250
glVertex2i -100, 100
glVertex2i  100,-100
glEnd

glLineWidth 2.0
ri=0
glBegin GL_LINE_LOOP
for i=0 to 360 step 10
    ra=rad(i)
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
next
glEnd
 
glLineWidth 2.0
glBegin GL_LINES
glColor4ub  250,250,0,250
glVertex2i -505,0
glVertex2i  505,0
glVertex2i  0,505
glVertex2i  0,-505
glColor4ub  0,0,250,250
 
for i = -405 to 405
    glVertex2i  i,-1.5 
    glVertex2i  i, 1.5 
    glVertex2i -1.5, i
    glVertex2i  1.5, i
next 
glEnd 

DoEvents
SwapBuffer
SetFps 60
wend

Quit3D
WinExit

.
« Last Edit: November 06, 2014, 12:32:38 PM by Peter »

Frankolinox

  • Guest
Re: lines + xy coordinates with markings
« Reply #4 on: November 06, 2014, 12:23:02 PM »
many thanks charles and peter, I've meant "ticks", sorry, that it wasn't so clear in my first post like charles did it with his last console 2d graphic example.

I have modified it for openGL modus.. here's my approach and that wasn't so easy after an hour of work (for me!) how to visualize it ;)

Code: [Select]
  includepath "$\inc\"
  $ FileName  "t.exe"
  'include    "RTL32.inc"
  'include    "RTL64.inc"
  $ title     "Lines + coordinate_system"
  include     "OpenglSceneFrame.inc"


  sub move(optional float x,y,z)
  ==============================
  glTranslatef x,y,z
  end sub
 
    '--------------------------------------
      sub linescale(optional float r,a,b,w)
  =====================================
  float i
  float c,d
  if not r then r=10.00 'length of line
if not a then a= 1.00 'tick interval
if not b then b= 0.4  'tick size
if not w then w= 5.0  'major interval count
glLineWidth 2
  glBegin GL_LINES
        'glColor4ub  0,0,250,250
  glVertex2f .0 , .0
  glVertex2f  r , .0
  glend
  'ticks
glLineWidth 1
  glBegin GL_LINES
  do
    glVertex2f i,.0
    if mod(c,w)=0 then d=-b*2 else d=-b
    glVertex2f i,d
    i+=a
    c+=1.0
    if i>r then exit do
  end do
  glEnd
  end sub


  sub initialize(sys hWnd)
  '=======================
  end sub
  '
  sub scene(sys hWnd)
  '==================
  '
  double i 'float i
  static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
  ' 
  glLoadIdentity
  glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
  glClearColor 0.5, 0, 0, 0
  '
  '
  glrotatef    ang1, 0,0,1
  gltranslatef 0,0,-1
  glscalef     0.001,0.001,0.001
  '
  glLineWidth 2.0
  '
  ri=0
  glBegin GL_LINE_LOOP
  for i=0 to 360 step 10
    ra=rad(i)
    glColor4ub  250,50,150,250
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
  next
  glEnd
  '
  '--------------- my idea -------------------- //
  move -500,-16
      'linescale 20.0, 1.0,  0.3, 5  'X AXIS
      glColor4ub  0,0,250,250
      linescale 500.0, 10.0,  20.3, 5  'X AXIS
 
  move 500,-0     
     glColor4ub  0,250,0,250
     linescale 500.0, 10.0,  20.3, 5  'X AXIS
     
     glRotatef  -90,0,0,1  '90,0,0,1
  'move -500,0
      glColor4ub  0,250,250,250  
      linescale  500.0, 10.0, 20.3, 5 'Y AXIS
     
     glRotatef  0,0,0,1
  move -500,0
      glColor4ub  0,250,250,250  
      linescale  500.0, 10.0, 20.3, 5 'Y AXIS    
     glEnd
'--------------- my idea -------------------- //

  'ang1+=angi1
  if ang1>360 then ang1-=360
  '
  end sub


  sub Release(sys hwnd)
  '====================
  end sub

there are "tick" lines in x,y,-x,-y directions :)

best regards, frank

.

Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #5 on: November 06, 2014, 01:34:32 PM »
Thanks Frank,

I think, on reflection, your mark is a more suitable word than my tick :)

Frankolinox

  • Guest
Re: lines + xy coordinates with markings
« Reply #6 on: November 07, 2014, 02:43:20 AM »
is there any way for the future to simplify the print command in openGL scenes?

if you have a primitive (for example: cube) then you can program and specify the print message directly below the primitve object with coordinates and translation possibilities instead of:

Code: [Select]
pushstate
    move 0,-1.5
    pushstate : move 00 : print  "0.0" : popstate
    pushstate : move 10 : print "10.0" : popstate
    pushstate : move 20 : print "20.0" : popstate
  popstate

just an idea.

thanks, frank


Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #7 on: November 07, 2014, 06:53:01 AM »
Hi Frank,

line-based printing is very simple:

from  /projectsA/OpenglCns/SurfaceFormula.o2bas
Code: OxygenBasic
  1.   'F1 HELP
  2.  '
  3.  if key[0x70]
  4.     flat
  5.     pushstate
  6.     move 20,0
  7.     color .9,.9,.9
  8.     scale  1.5,1.0
  9.     printl "Active Keys:"
  10.     printl
  11.     scale  1/1.5,1.0
  12.     printl "Esc"    tab "Exit"
  13.     printl "Ctrl-P" tab "Take snapshot"
  14.     printl "F1 This help panel"
  15.     printl "F5 Exec function"
  16.     printl
  17.     scale 1.5,1.0
  18.     printl "Mouse:"
  19.     scale 1/1.5,1.0
  20.     printl "Point to Object, then"
  21.     printl "Left button to Rotate"
  22.     printl "Right button to Move"
  23.     popstate
  24.   end if
  25.  



.

Frankolinox

  • Guest
Re: lines + xy coordinates with markings
« Reply #8 on: November 08, 2014, 02:20:45 AM »
Quote
line-based printing is very simple:

no ;) not easy...

thanks charles, but your example serves for console openGL not my example with openGL and text ("print", "gprint"). I have problems to visualize print message with text (openGL folder/ "text.o2bas" or "keyboardcode.o2bas"  as basis). I think my problem belongs to the scale factor. can you check my last example "lines+coordinatesystem.o2bas" and show how to make a "simple" print message in a pure openGL scene? 

thanks in advance, frank

Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #9 on: November 08, 2014, 03:36:40 AM »
Hi Frank,

Scaled example of gprint. the optional second parameter is like crlf, normally set to 1.0

from Examples/OpenGl/HelpF1.o2bas

Code: OxygenBasic
  1.   'PRINTING INFO / LABELS
  2.  '
  3.  'glDisable GL_TEXTURE_2D
  4.  glDisable GL_LIGHTING
  5.   '
  6.  'F1 HELP
  7.  if hlps
  8.     glLoadIdentity
  9.     glPushMatrix
  10.     gltranslatef -.5,.28,-1.
  11.     float w,h
  12.     glColor3f    .00,.99,.99
  13.     glScalef     .07,.07,.01
  14.     gprint       "Help:",.7
  15.     glColor3f    .99,.99,.99
  16.     glScalef     .5,.5,1.
  17.     gprint       "mouse to select object and drag.",1.
  18.     gprint       "number keys to select object 1..3.",1.
  19.     gprint       "arrow keys to move selected object.",1.
  20.     gprint       "shift+arrow keys to rotate.",1.
  21.     glPopMatrix
  22.     hlps=0
  23.   end if
  24.  


Frankolinox

  • Guest
Re: lines + xy coordinates with markings
« Reply #10 on: November 09, 2014, 07:21:22 AM »
yoh, thanks, I didn't know that example yet...

how I can display the print message in my simple example? the trick is a) the translate moving factor and b) the scale factor.. but I don't manage it, thought it was the same -1.0 z-coordinate as the example shows but that wasn't correct...

Code: [Select]
   includepath "$\inc\"
  $ FileName  "t.exe"
  'include    "RTL32.inc"
  'include    "RTL64.inc"
  $ title     "Rotating Lines"
  include     "OpenglSceneFrame.inc"


  sub initialize(sys hWnd)
  '=======================
  end sub
  '

  sub scene(sys hWnd)
  '==================
  '
  static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
  static hlps
  '
  glLoadIdentity
  glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
  glClearColor 0.5, 0, 0, 0
  '
  '
  glrotatef    ang1, 0,0,1
  gltranslatef 0,0,-1
  glscalef     0.001,0.001,0.001
  '
  glLineWidth 3.0
  '
  glBegin GL_LINES
  glColor4ub  250,250,150,250
  glVertex2i -100,-100
  glVertex2i  100, 100
  glColor4ub  150,250,250,250
  glVertex2i -100, 100
  glVertex2i  100,-100
  glEnd
  '
  glLineWidth 2.0
  '
  ri=0
  glBegin GL_LINE_LOOP
  for i=0 to 360 step 10
    ra=rad(i)
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
  next
  glEnd
  '
  'CONTROL WITH KEYBOARD KEYS
  'static hlps
 
glDisable GL_LIGHTING
  '
  'F1 HELP
  'if hlps
    glLoadIdentity
    glPushMatrix
    'gltranslatef -.5,.28,-1.
    gltranslatef 0.0,0.0,-1.0
    float w,h
    glColor3f    .00,.99,.99
    glScalef     0.001,0.001,0.001
    glScalef  '.07,.07,.01
    gprint       "Help:",.7
    glColor3f    .99,.99,.99
    glScalef     .5,.5,1.
    gprint       "mouse to select object and drag.",1.
    gprint       "number keys to select object 1..3.",1.
    gprint       "arrow keys to move selected object.",1.
    gprint       "shift+arrow keys to rotate.",1.
    glPopMatrix
    hlps=0
  'end if
  '
 
  'ang1+=angi1
  if ang1>360 then ang1-=360
  '
  end sub


  sub Release(sys hwnd)
  '====================
  end sub
 

best regards, frank

Charles Pegge

  • Guest
Re: lines + xy coordinates with markings
« Reply #11 on: November 09, 2014, 08:03:48 AM »

Hi Frank,

  $ title     "Rotating Lines"
  $ fontA        "Arial",FW_SEMIBOLD
  include     "OpenglSceneFrame.inc"


Code: [Select]
includepath "$\inc\"
  $ FileName  "t.exe"
  'include    "RTL32.inc"
  'include    "RTL64.inc"
  $ title     "Rotating Lines"
  $ fontA        "Arial",FW_SEMIBOLD
  include     "OpenglSceneFrame.inc"


  sub initialize(sys hWnd)
  '=======================
  end sub
  '

  sub scene(sys hWnd)
  '==================
  '
  static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
  static hlps
  '
  glLoadIdentity
  glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
  glClearColor 0.5, 0, 0, 0
  '
  '
  glrotatef    ang1, 0,0,1
  gltranslatef 0,0,-1
  glscalef     0.001, 0.001, 0.001
  '
  glLineWidth 3.0
  '
  glBegin GL_LINES
  glColor4ub  250,250,150,250
  glVertex2i -100,-100
  glVertex2i  100, 100
  glColor4ub  150,250,250,250
  glVertex2i -100, 100
  glVertex2i  100,-100
  glEnd
  '
  glLineWidth 2.0
  '
  ri=0
  glBegin GL_LINE_LOOP
  for i=0 to 360 step 10
    ra=rad(i)
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
  next
  glEnd
  '
 
  glDisable GL_LIGHTING
  '
  'F1 HELP
    glLoadIdentity
    glPushMatrix
    'gltranslatef -.5,.28,-1.
    gltranslatef 0.0,0.0,-1.0
    glColor3f    .00,.99,.99
    glScalef     .07,.07,.01
    gprint       "Help:",.7
    glColor3f    .99,.99,.99
    glScalef     .5,.5,1.
    gprint       "mouse to select object and drag.",1.
    gprint       "number keys to select object 1..3.",1.
    gprint       "arrow keys to move selected object.",1.
    gprint       "shift+arrow keys to rotate.",1.
    glPopMatrix
 
  'ang1+=angi1
  if ang1>360 then ang1-=360
  '
  end sub


  sub Release(sys hwnd)
  '====================
  end sub

Frankolinox

  • Guest
Re: lines + xy coordinates with markings
« Reply #12 on: November 10, 2014, 03:11:40 AM »
yes, I see I have forgotten to set the "font", thanks charles.

now here's my correct example plus text and a sinus curve:

Code: [Select]
  '
  ' openGL example, oxygenbasic, lines, marks, text, sinus curve, 09.nov.2014
  ' by frankolinox (frank brĂ¼bach, bsa)
  '
  includepath "$\inc\"
  $ FileName  "t.exe"
  'include    "RTL32.inc"
  'include    "RTL64.inc"
  $ title     "Lines + coordinate_system, Text+Sinus Curve"
  $ fontA        "Arial",FW_SEMIBOLD
  include     "OpenglSceneFrame.inc"
 
  sub move(optional float x,y,z)
  ==============================
  glTranslatef x,y,z
  end sub
 
    '--------------------------------------
      sub linescale(optional float r,a,b,w)
  =====================================
  float i
  float c,d
  if not r then r=10.00 'length of line
if not a then a= 1.00 'tick interval
if not b then b= 0.4  'tick size
if not w then w= 5.0  'major interval count
glLineWidth 2
  glBegin GL_LINES
        'glColor4ub  0,0,250,250
  glVertex2f .0 , .0
  glVertex2f  r , .0
  glend
  'ticks
glLineWidth 1
  glBegin GL_LINES
  do
    glVertex2f i,.0
    if mod(c,w)=0 then d=-b*2 else d=-b
    glVertex2f i,d
    i+=a
    c+=1.0
    if i>r then exit do
  end do
  glEnd
  end sub

  sub initialize(sys hWnd)
  '=======================
  end sub
  '
  sub scene(sys hWnd)
  '==================
  '
  double i 'float i
  static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
  static hlps
  ' 
  glLoadIdentity
  glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
  glClearColor 0.5, 0, 0, 0
  '
  '
  glrotatef    ang1, 0,0,1
  gltranslatef 0,0,-1
  glscalef     0.001,0.001,0.001
  '
 
  glLineWidth 3.0
  '
  glBegin GL_LINES
  glColor4ub  250,250,150,250
  glVertex2i -100,-100
  glVertex2i  100, 100
  glColor4ub  150,250,250,250
  glVertex2i -100, 100
  glVertex2i  100,-100
  glEnd
 
  glLineWidth 2.0
  '
  ri=0
  glBegin GL_LINE_LOOP
  for i=0 to 360 step 10
    ra=rad(i)
    glColor4ub  250,50,150,250
    glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
    ri=30-ri
  next
  glEnd
  '
  ' ------- sinus / Cosinus curve -------------------- //
  ri=30
  glLineWidth 2
    glBegin GL_LINES             
      for i = -500 to 500 step 0.1 '0.1
        glColor4ub  250,0,0,250
        glVertex2f i*ra, sin(i)*ri 'ra
        glVertex2f i*ra+0.1, sin(i+0.1)*ri
                     
        glColor4ub 0, 255, 0,250
        glVertex2f i*ra, cos(i)*ri
        glVertex2f i*ra+0.1, cos(i+0.1)*ri       
      next 
    glEnd
' ------- sinus / Cosinus curve -------------------- //

  move -500,-16
      'linescale 20.0, 1.0,  0.3, 5  'X AXIS
      glColor4ub  0,0,250,250
      linescale 500.0, 10.0,  20.3, 5  'X AXIS
 
  move 500,-0     
     glColor4ub  0,250,0,250
     linescale 500.0, 10.0,  20.3, 5  'X AXIS
     
     glRotatef  -90,0,0,1 
      glColor4ub  0,250,250,250  
      linescale  500.0, 10.0, 20.3, 5 'Y AXIS
     
     glRotatef  0,0,0,1
  move -500,0
      glColor4ub  0,250,250,250  
      linescale  500.0, 10.0, 20.3, 5 'Y AXIS    
     glEnd

'------------- gprint text passage ---------------- //
  glDisable GL_LIGHTING
  '
    glLoadIdentity
    glPushMatrix
    'gltranslatef -.5,.28,-1.
    'gltranslatef 0.0,0.0,-1.0
    gltranslatef 0.05,-0.08,-1.0
    glColor3f    .00,.99,.99
    glScalef     .07,.07,.01
    gprint       "Avengers:",.7
    glColor3f    .99,.99,.99
    glScalef     .5,.5,1.
    gprint       "Thor, Hulk.",1.
    gprint       "Captain America, Iron Man.",1.
    gprint       "Black Widow, Hawkeye.",1.
    glColor3f    .99,.90,.05
    gprint       "Giant, Spiderman, Wesp.",1.
    glScalef     .75,.75,0.75
    gprint       "have fun with these heroes, good evening :).",1.
    glPopMatrix
'------------- gprint text passage ---------------- //

  'ang1+=angi1
  if ang1>360 then ang1-=360
  '
  end sub


  sub Release(sys hwnd)
  '====================
  end sub

regards, frank

.