Recent posts

#1
OxygenBasic / Re: Create a PDF directly
Last post by Nicola - Today at 12:58:31 PM
Seeing what you've accomplished, you make a mockery of AI.
O2 has a lot of potential.

Only one problem for me.
... I won't hide from you that, due to my lack of knowledge, I would like the listings to be more explained. INC files, for example. It wouldn't hurt to know right away which functions are for internal use only. But even this takes time and energy
 
#3
OxygenBasic / Re: Create a PDF directly
Last post by Charles Pegge - Today at 11:22:31 AM
Limited time and energy constrain me from getting more involved, unfortunately. I am a limited resource. AI to the rescue? :)
#4
There's a sphere texture mapping for the Earth:

demos\OpenGl\ConsoleG\SphereMapPolar.o2bas

  % Title "Sphere Mapping Demo"
  % Animated
  % ScaleUp
 '% PlaceCentral
 '% AnchorCentral
  $ filename "t.exe"
 'uses RTL64
  uses ConsoleG

  function SphereMap(int nPrecision)
  ==================================
  'From Mike Lobanovsky / Sphere mapping
  float ex,ey,ez,theta1,theta2,theta3
  float M_TWOPI = pi()*2
  float M_PI_2  = pi()/2
  int   i,j,ei
  ei=(nprecision-1)\2
  For i = 0 To ei
    theta1 = i * M_TWOPI / nPrecision - M_PI_2
    theta2 = (i + 1) * M_TWOPI / nPrecision - M_PI_2
    glBegin(GL_TRIANGLE_STRIP)
    For j = 0 To nPrecision
      theta3 = j * M_TWOPI / nPrecision
      ' Splices
      ex = cos(theta2) * cos(theta3) ' calculate Euler angles on 3 axes
      ey = sin(theta2)
      ez = cos(theta2) * sin(theta3)
      glNormal3f(ex, ey, ez) ' set up normals
      glTexCoord2f(-j / nPrecision, 2 * (i + 1) / nPrecision) ' set up UVs
      glVertex3f(1.5 * ex, 1.5 * ey, 1.5 * ez) ' render vertices
      ' Sides
      ex = cos(theta1) * cos(theta3)
      ey = sin(theta1)
      ez = cos(theta1) * sin(theta3)
      glNormal3f(ex, ey, ez)
      glTexCoord2f(-j / nPrecision, 2 * i / nPrecision)
      glVertex3f(1.5 * ex, 1.5 * ey, 1.5 * ez)
    Next
    glEnd()
  Next
  end function

  sub main()
  ==========
  static int   imgn,res,wi,ht,earth
  static float angx,angy
  if not imgn
    imgn=21
    res=0 'use image wi and ht (512*256)
    LoadTexture "..\..\images\Earth.jpg",imgn,res,wi,ht
   'LoadTexture "NASA_Blue_Marble.jpg",imgn,res,wi,ht
   'http://www.johnstonsarchive.net/spaceart/earthmap.jpg
   'LoadTexture "earthmap.jpg",imgn,res,wi,ht
    earth=CompileList : SphereMap 128 : glEndlist
  end if
  cls '0,0,0
  'display image
  '
  pushstate
  move 16,-16
  shading
  color 1,1,1,1
  texture imgn
  scale 8
 'rotateX angX
  rotateY angY
  go earth
  'quadnorm 10.0, 10.0 'apply image texture to quad
  texture 0
  popstate
 flat
 move 0,-.5
 scale 2
 printl "Sphere Mapping"
  angx+=.100 : if angx>=360 then angx-=360
  angy+=.125 : if angy>=360 then angy-=360
  end sub 'main

  EndScript
#5
OxygenBasic / Re: Array Ubound problem
Last post by Nicola - Today at 11:01:59 AM
very good.  :)
In fact, I wasn't making use of arrays while waiting for news.
Thank you Charles.
#6
OxygenBasic / Re: Array Ubound problem
Last post by Charles Pegge - Today at 10:57:58 AM
Ubound etc last tested in March. Should be ok now.
#7
microA Interpreter / Re: UDF testing in micro(A)
Last post by Zlatko Vid - Today at 10:45:52 AM
in case someone is interested
https://discord.gg/ANsRUPy
#8
Discussion / Re: Why this Forum is so dead?...
Last post by Johan Klassen - Yesterday at 06:15:28 PM
in the 70's when the micro computer revolution was happening, everybody got excited and people were very busy trying all kinds of things, the WWW was not in existence at the time but we had bulletin boards to share code, plus tons of magazines and outlets selling CD's loaded with source-code and shareware programs, but that's not the case today.
#9
OxygenBasic / Re: Create a PDF directly
Last post by Nicola - Yesterday at 05:17:53 PM
Hi Charles, 
the information from idrsolutions is very interesting.
Very good.
I also found how to do it via qpdf with the use of a json...
...

For now, I'm using programs that use the command line.
Cheers
#10
Discussion / Re: Why this Forum is so dead?...
Last post by Zlatko Vid - Yesterday at 05:08:57 PM
Quotefreebasic thinbasic are more busy?

Hi Frank
I really don't know why you have such a feeling
i don't visit freeBasic and thinBasic forum very much
just because they looks static to ...or simply i am not interested to see
what is there ..i am not sure .