Recent posts

#1
Discussion / Re: Why this Forum is so dead?...
Last post by Zlatko Vid - Today at 06:48:44 PM
Well Frank

I think that i know /remember you from thinBasic and old Oxygenbasic
forum...i really don't know what you expect ...
sorry but i am not very much interested in openGL programs
and i am busy with my programming of my interpreter ( micro(A) )
and that is my main ocupation.

Also i am not sure what kind of feedback you want .
Forums are very quiet places..
#2
Meta Forum / Forum Maintenance days
Last post by Theo Gottwald - Today at 01:45:06 PM
These days we are working on improving the Forum, this may lead to some outages.

If so, we will be back.
#3
Hi Frank,

Ray Tracing is a huge subject. I used POV-Ray quite a lot for procedural Ray-Tracing but the last stable release was in 2013. I'm waiting for ray-tracing hardware to become standard on regular PCs.

refs:
https://en.wikipedia.org/wiki/Ray_tracing_(graphics)
-->
https://www.povray.org/
https://www.povray.org/download/
https://github.com/POV-Ray/povray/releases/
v. 3.7 (2013) core 7meg
-->
RayTracing in Real-Time
What Is Ray Tracing? (And What It Means for PC Gaming)
https://uk.pcmag.com/graphics-cards/133269/what-is-ray-tracing-and-what-it-means-for-pc-gaming
DXR

The nearest we have is:

demos\opengl\geom\SierpinskiScene.o2bas
It includes a skybox and reflection surfaces on the cube and sphere. But no shadows.

#4
Discussion / Why this Forum is so dead?
Last post by Frank Brübach - Today at 01:00:06 PM
It's a shame but I think this forum is absolutely dead. I have no idea why that is. Why am I still posting anything? There is no feedback and I will delete all posts Here next days

People used this forum copy Codes and Shows pics didnt have any Feedback its a normal behaviour of often boring Programmers?

Sorry, my opinion, Frank, I love oxygen Basic but I have No more fun to do anything even its great or good stuff
#5
OxygenBasic Examples / Re: Spheres + reflection (rayt...
Last post by Frank Brübach - Yesterday at 08:35:01 PM
Hello theo, I am already translate another example Takes a while but so I am learning more   :) Dont want to ask Mistral or another AI for it I think I can manage it alone

Beside that I have a c++ Code saved already

Thx for asking and reply , Frank
#6
OxygenBasic Examples / Re: Spheres + reflection (rayt...
Last post by Theo Gottwald - Yesterday at 08:26:11 PM
Quote from: Frank Brübach on Yesterday at 01:51:53 PMHello all

Hi Charles did you ever build  an example with raytracing with oxygen?
How I can mirror a sphere Texture or making some reflections?

See Photo four

I have used light Position light Ambient light diffuse light specular for my example below but thats Not enough isnt IT?

Do you have any Idea or example to study? Would be great one example I have found in c++

Oxygen openGl
  ' -- oxygen basic spheres and reflections
  ' -- how to make a mirror reflections and/or Raytracing?
  '
  #compact
  $ FileName "t.exe"
  'uses RTL32
  'uses "RTL64
  % title="Spheres and Reflections"
  % ExplicitMain ' MainWindow width,height,WS_OVERLAPPEDWINDOW
  uses OpenglSceneFrame
  uses glo2\shapes
  uses glo2\textures
  uses glo2\materials
  uses glo2\particles

  indexbase 1
  sys  GdiplusToken
  float ang1
  float ma[16]
  float li[16]
  sys  cube,sphere
  Cloud cloud1


  sub initialize(sys hWnd)
  ========================
  '
  GDIplus 1
  '
  BuildTextures 16,256
  '
  cube=CompileList  : CubeForm      : glEndList
  sphere=CompileList : Spheric 1,1,6 : glEndList
  '
  'standard lighting
  ------------------
  'li<=
  '0.0, 8.0, 8.0, 0.0,  'position / w=0 parallel or w=1 for directional
  '1.0, 1.0, 1.0, 1.0,  'ambient
  '1.0, 1.0, 1.0, 1.0,  'diffuse
  '1.0, 1.0, 1.0, 1.0  'specular


  Lighting li
  material white
  '
  end sub

  sub Release(sys hwnd)
  '====================
  glDeleteLists    cube,1
  glDeleteLists    sphere,1
  glDeleteTextures 4, texn
  Gdiplus 0
  end sub

  sub RenderCube(float x,y,z,sc,sys tex)
  ======================================
  glBindTexture GL_TEXTURE_2D,tex
  glPushMatrix
  gltranslatef x,y,z
  glscalef sc,sc,sc
  glCallList cube
  'glCallList pent
  glPopMatrix
  end sub

  sub RenderPlane(float x,y,z,sc,tex,u,v)
  =======================================
  glBindTexture GL_TEXTURE_2D,tex
  glPushMatrix
  gltranslatef x,y,z
  glscalef sc,1,sc
  glBegin GL_QUADS
  glTexCoord2f 0.0,0.0 : glVertex3f -1.0,0,-1.0
  glTexCoord2f u  ,0.0 : glVertex3f  1.0,0,-1.0
  glTexCoord2f u  ,v  : glVertex3f  1.0,0, 1.0
  glTexCoord2f 0.0,v  : glVertex3f -1.0,0, 1.0   
  glend
  glPopMatrix
  end sub


  sub scene(sys hWnd)
  '==================
  '
  static single ra,ri,angi1=.5
  '
  SnapShots hWnd 'Ctrl-P take snapshot
  NewFrame
  glClearColor 0.5, 0.5, 0.7, 0.0
  Fog          0.5, 0.5, 0.7, 0.035 'rgb and density
  '
  glPolygonMode GL_FRONT_AND_BACK, GL_FILL
  glEnable GL_LIGHTING
  glEnable GL_NORMALIZE

  static as single,
 
  model_diffuse(4)  => (1.0, 1.0, 1.0, 1.0), '(1.0, 0.8, 0.0, 1.0),
  model_specular(4) => (1.0, 1.0, 1.0, 1.0), '(0.0, 0.0, 1.0, 1.0),
  model_ambient(4) => (0.9, 0.9, 0.9, 1.0), '(0.0, 0.0, 1.0, 1.0),
  'model_ambient(4) => (0.75, 0.75, 0.75, 1.0), '(0.0, 0.0, 1.0, 1.0),

  model_shininess=0.1
  glColor4fv model_diffuse

  'glDisable GL_LIGHTING
  'glDepthMask GL_FALSE

  'glDisable GL_LIGHTING
 
  sys bb
  static as single,
  light_position(4) => (0.0, 8.0, 8.0, 0.0), '(0.0, 8.0, 8.0, 1.0),
  light_diffuse (4) => (0.29, 0.29, 0.29, 1.0), '(0.5, 0.5, 0.5, 1.0),
  light_specular(4) => (0.59, 0.59, 0.59, 1.0), '(0.5, 0.5, 0.5, 1.0),
  light_ambient (4) => (0.75, 0.75, 0.75, 1.0) '(0.5, 0.5, 0.5, 1.0)
  static as double aspect
 
  'Configure and enable light source 1
 
  ' here you can do some changes --------------------- //
  glLightfv GL_LIGHT1, GL_POSITION, light_position '(4) '' activate use all is white-black
  glLightfv GL_LIGHT1, GL_AMBIENT,  light_ambient(4)
  glLightfv GL_LIGHT1, GL_DIFFUSE,  light_diffuse(4) 'red effect
  glLightfv GL_LIGHT1, GL_SPECULAR, light_specular '(4)

  ' here you can do some changes --------------------- //

  glEnable GL_LIGHT1
  glEnable GL_LIGHTING


  '
  sys t1=texn[10]
  sys t2=texn[11]
  '
  'SPHERES
  glPushMatrix
  indexbase 1
  glTranslatef 4.,2.,-20.0 '-20.,10.,-60.0
  Material Red
  glScalef      4.,4.,4.
  glCallList sphere
  Material White
  glPopMatrix
  glPushMatrix
  glTranslatef 2.5,-1.0,-6.0
  glScalef      .5,.5,.5
  'glCallList sphere
  glPopMatrix
  '
  'SPHERES
  glPushMatrix
  indexbase 1
  glTranslatef -1.,2.,-10.0
  Material Gold
  glScalef      3.,3.,3.
  glCallList sphere
  Material White
  glPopMatrix
 
  glPushMatrix
  glTranslatef 2.5,-1.0,-6.0
  glScalef      .75,.75,.75
  glCallList sphere
  glPopMatrix

  glPushMatrix
  glTranslatef -2.5,-1.0,-6.0
  Material silver
  glScalef      .75,.75,.75
  glCallList sphere
  glPopMatrix


  glEnable GL_TEXTURE_2D
  '
  'RenderCube  2.5,-2.0,-6.0, 0.5,t1
  '
  RenderPlane  0.0,-2.0,-16.0,16.0,t2,8,8
  '
  glDisable GL_TEXTURE_2D
  glDisable GL_LIGHTING
  '
  'CLOUD
  glEnable GL_TEXTURE_2D
  glPushMatrix
  gltranslatef -10.0, -10.0, -48.0
  glscalef      20.0,12.0,1.0
  cloud1.render 30 'max 50
  glPopMatrix
  glDisable GL_TEXTURE_2D

  ang1+=angi1
  if ang1>360 then ang1-=360
  sleep 10
  end sub

  MainWindow width,height,WS_OVERLAPPEDWINDOW


Hallo Frank that looks impressive (seen from the Perspective of 2012) i remember, i have a book about AMIGA-BASIC from Data Becker which describes Raytracing in BASIC.

Let me add that you can get your answer easy and immediately if you ask
MISTRAL-AI

Don't worry, its free!

Generally Ray Tracing is a very special topic, you can not expect that Charles knows the answer.
He may also need to look it up somewhere. Means you can do that too.
Besides that Algorythms fo this topic change with time, i remember that there was "Phong Shading" and other options available in earlier times.
#7
OxygenBasic Examples / Spheres + reflection (raytraci...
Last post by Frank Brübach - Yesterday at 01:51:53 PM
Hello all

Hi Charles did you ever build  an example with raytracing with oxygen?
How I can mirror a sphere Texture or making some reflections?

See Photo four

I have used light Position light Ambient light diffuse light specular for my example below but thats Not enough isnt IT?

Do you have any Idea or example to study? Would be great one example I have found in c++

Oxygen openGl
  ' -- oxygen basic spheres and reflections
  ' -- how to make a mirror reflections and/or Raytracing?
  '
  #compact
  $ FileName "t.exe"
  'uses RTL32
  'uses "RTL64
  % title="Spheres and Reflections"
  % ExplicitMain ' MainWindow width,height,WS_OVERLAPPEDWINDOW
  uses OpenglSceneFrame
  uses glo2\shapes
  uses glo2\textures
  uses glo2\materials
  uses glo2\particles

  indexbase 1
  sys  GdiplusToken
  float ang1
  float ma[16]
  float li[16]
  sys  cube,sphere
  Cloud cloud1


  sub initialize(sys hWnd)
  ========================
  '
  GDIplus 1
  '
  BuildTextures 16,256
  '
  cube=CompileList  : CubeForm      : glEndList
  sphere=CompileList : Spheric 1,1,6 : glEndList
  '
  'standard lighting
  ------------------
  'li<=
  '0.0, 8.0, 8.0, 0.0,  'position / w=0 parallel or w=1 for directional
  '1.0, 1.0, 1.0, 1.0,  'ambient
  '1.0, 1.0, 1.0, 1.0,  'diffuse
  '1.0, 1.0, 1.0, 1.0  'specular


  Lighting li
  material white
  '
  end sub

  sub Release(sys hwnd)
  '====================
  glDeleteLists    cube,1
  glDeleteLists    sphere,1
  glDeleteTextures 4, texn
  Gdiplus 0
  end sub

  sub RenderCube(float x,y,z,sc,sys tex)
  ======================================
  glBindTexture GL_TEXTURE_2D,tex
  glPushMatrix
  gltranslatef x,y,z
  glscalef sc,sc,sc
  glCallList cube
  'glCallList pent
  glPopMatrix
  end sub

  sub RenderPlane(float x,y,z,sc,tex,u,v)
  =======================================
  glBindTexture GL_TEXTURE_2D,tex
  glPushMatrix
  gltranslatef x,y,z
  glscalef sc,1,sc
  glBegin GL_QUADS
  glTexCoord2f 0.0,0.0 : glVertex3f -1.0,0,-1.0
  glTexCoord2f u  ,0.0 : glVertex3f  1.0,0,-1.0
  glTexCoord2f u  ,v  : glVertex3f  1.0,0, 1.0
  glTexCoord2f 0.0,v  : glVertex3f -1.0,0, 1.0   
  glend
  glPopMatrix
  end sub


  sub scene(sys hWnd)
  '==================
  '
  static single ra,ri,angi1=.5
  '
  SnapShots hWnd 'Ctrl-P take snapshot
  NewFrame
  glClearColor 0.5, 0.5, 0.7, 0.0
  Fog          0.5, 0.5, 0.7, 0.035 'rgb and density
  '
  glPolygonMode GL_FRONT_AND_BACK, GL_FILL
  glEnable GL_LIGHTING
  glEnable GL_NORMALIZE

  static as single,
 
  model_diffuse(4)  => (1.0, 1.0, 1.0, 1.0), '(1.0, 0.8, 0.0, 1.0),
  model_specular(4) => (1.0, 1.0, 1.0, 1.0), '(0.0, 0.0, 1.0, 1.0),
  model_ambient(4) => (0.9, 0.9, 0.9, 1.0), '(0.0, 0.0, 1.0, 1.0),
  'model_ambient(4) => (0.75, 0.75, 0.75, 1.0), '(0.0, 0.0, 1.0, 1.0),

  model_shininess=0.1
  glColor4fv model_diffuse

  'glDisable GL_LIGHTING
  'glDepthMask GL_FALSE

  'glDisable GL_LIGHTING
 
  sys bb
  static as single,
  light_position(4) => (0.0, 8.0, 8.0, 0.0), '(0.0, 8.0, 8.0, 1.0),
  light_diffuse (4) => (0.29, 0.29, 0.29, 1.0), '(0.5, 0.5, 0.5, 1.0),
  light_specular(4) => (0.59, 0.59, 0.59, 1.0), '(0.5, 0.5, 0.5, 1.0),
  light_ambient (4) => (0.75, 0.75, 0.75, 1.0) '(0.5, 0.5, 0.5, 1.0)
  static as double aspect
 
  'Configure and enable light source 1
 
  ' here you can do some changes --------------------- //
  glLightfv GL_LIGHT1, GL_POSITION, light_position '(4) '' activate use all is white-black
  glLightfv GL_LIGHT1, GL_AMBIENT,  light_ambient(4)
  glLightfv GL_LIGHT1, GL_DIFFUSE,  light_diffuse(4) 'red effect
  glLightfv GL_LIGHT1, GL_SPECULAR, light_specular '(4)

  ' here you can do some changes --------------------- //

  glEnable GL_LIGHT1
  glEnable GL_LIGHTING


  '
  sys t1=texn[10]
  sys t2=texn[11]
  '
  'SPHERES
  glPushMatrix
  indexbase 1
  glTranslatef 4.,2.,-20.0 '-20.,10.,-60.0
  Material Red
  glScalef      4.,4.,4.
  glCallList sphere
  Material White
  glPopMatrix
  glPushMatrix
  glTranslatef 2.5,-1.0,-6.0
  glScalef      .5,.5,.5
  'glCallList sphere
  glPopMatrix
  '
  'SPHERES
  glPushMatrix
  indexbase 1
  glTranslatef -1.,2.,-10.0
  Material Gold
  glScalef      3.,3.,3.
  glCallList sphere
  Material White
  glPopMatrix
 
  glPushMatrix
  glTranslatef 2.5,-1.0,-6.0
  glScalef      .75,.75,.75
  glCallList sphere
  glPopMatrix

  glPushMatrix
  glTranslatef -2.5,-1.0,-6.0
  Material silver
  glScalef      .75,.75,.75
  glCallList sphere
  glPopMatrix


  glEnable GL_TEXTURE_2D
  '
  'RenderCube  2.5,-2.0,-6.0, 0.5,t1
  '
  RenderPlane  0.0,-2.0,-16.0,16.0,t2,8,8
  '
  glDisable GL_TEXTURE_2D
  glDisable GL_LIGHTING
  '
  'CLOUD
  glEnable GL_TEXTURE_2D
  glPushMatrix
  gltranslatef -10.0, -10.0, -48.0
  glscalef      20.0,12.0,1.0
  cloud1.render 30 'max 50
  glPopMatrix
  glDisable GL_TEXTURE_2D

  ang1+=angi1
  if ang1>360 then ang1-=360
  sleep 10
  end sub

  MainWindow width,height,WS_OVERLAPPEDWINDOW
#8
General Discussion / Mumbai: the Infernal Megalopol...
Last post by Charles Pegge - Yesterday at 10:17:44 AM
What overpopulation looks like

Best Documentary
18 jun 2023 / orig 2021


#9
General Discussion / New Photonic Chip: The Next Er...
Last post by Charles Pegge - April 29, 2024, 02:13:14 PM
Use of photonics in AI / low power /  massively parallel

Anastasi In Tech
25 apr 2024


#10
OxygenBasic Examples / Re: Oxygen and c++ expl
Last post by Frank Brübach - April 29, 2024, 11:58:03 AM
Good morning all

So far AS I have understood namespace Works in oxygen Like
This expl I have built

' -- oxygen basic
' -- example 1)

' global_var is in the global namespace
int global_var = 10

function outer_function() as integer

    '  outer_var is in the local namespace
    int outer_var = 20

        function inner_function() as integer
        'inner_var is in the nested local namespace
        int inner_var = 30

        print inner_var
        end function

    print outer_var

    inner_function()
end function

' print the value of the global variable
print global_var

' call the outer function and print local and nested local variables
outer_function()

'------------------- //
' -- example 2)
'
'NESTABLE NAMESPACES
int vic=99

namespace maria
  namespace tom
      int vic = 200
  end namespace
end namespace
'
print maria..tom..vic '200
print vic '99