OpenGL -- Hex Sphere - Icosahedron

103 views
Skip to first unread message

Bert Mariani

unread,
Apr 4, 2026, 10:35:17 AMApr 4
to The Ring Programming Language
Hello Mahmoud et ALL

Attached:
     Hex_Sphere.ring

It is an example of UsingOpenGL
It draws a  Hex Sphere - Icosahedron - Animation
You can use the Mouse click and move to rotate the sphere while it is in motion.

# Complete 20-Face Icosahedron - verified correct topology
# All 30 edges appear exactly twice, all 12 vertices have valence 5

==================

SH-.PNG

Regards
Bert Mariani
Hex_Sphere.ring

Mahmoud Fayed

unread,
Apr 4, 2026, 7:34:49 PMApr 4
to The Ring Programming Language
Hello Bert

Thanks for sharing :D


Greetings,
Mahmoud

Bert Mariani

unread,
Apr 5, 2026, 11:21:41 AMApr 5
to The Ring Programming Language
Thanks Mahmoud

Added 2 more
     Penta_Sphere.ring
     Octagon_Sphere.ring

They use the libraries
     "opengl21lib.ring"
     "freeglut.ring"-


Penta      -- Dodecahedron Sphere -  5 sided Pentagons on a Ghost Wireframe Sphere

Octagon -- Octahedron Sphere  - 4 sided  Squares on a Ghost Wireframe Sphere


==========================P2-Snap4.png-


S1-Snap5.png
Octagon_Sphere.ring
Penta_Sphere.ring

Mansour Ayouni

unread,
Apr 5, 2026, 2:30:24 PMApr 5
to Bert Mariani, The Ring Programming Language
Hello Bert,

Beautiful work!

Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/7cef518c-215b-4636-8750-3e4bfc9ccab8n%40googlegroups.com.

Mahmoud Fayed

unread,
Apr 5, 2026, 7:21:10 PMApr 5
to The Ring Programming Language
Hello Bert

Thank you very much for the new samples :D


Greetings,
Mahmoud

Bert Mariani

unread,
Apr 6, 2026, 10:44:27 AMApr 6
to The Ring Programming Language
Hello Mahmound

Another one using opengl21lib.ring  and  freeglut.ring
     SinCos_Surface.ring

Surface Plot:  z = sin(x) * cos(y)
Looks like an egg carton.
Colors depend on resulting Z value.

It scales according to the Window Re-Sizing
It can be Rotated in all directions  --even Upside-Down

=====================

SC-Snap2.png

Regards
Bert Mariani
SinCos_Surface.ring

Mahmoud Fayed

unread,
Apr 6, 2026, 11:12:54 AMApr 6
to The Ring Programming Language
Hello Bert

The sample looks very nice :D


Greetings,
Mahmoud

Liam OBrien

unread,
Apr 7, 2026, 10:09:45 AMApr 7
to The Ring Programming Language
Really good work, Bert! Well done!

Bert Mariani

unread,
Apr 10, 2026, 10:11:45 AMApr 10
to The Ring Programming Language
Hello Mahmoud, Azzeddine et ALL

 Using opengl21lib.ring  and  freeglut.ring
Added Mug Rotation
    Mug_PointCloud_3D.ring

Azzeddine
     I have a bug I can't seem to figure out.
     Y-axis rotation ~ 225 degrees, Mug Handle jumps to Front ??
     X and Z set to No Rotation.
Does it happen on your version of Mug Rotation with Tensors ?


===========================
#  DEBUG AXIS CHECKBOXES (click OR keyboard to toggle):
#    Click checkbox  -- toggle that axis on/off independently
#    X key  -- spin X axis only
#    Y key  -- spin Y axis only  (default)
#    Z key  -- spin Z axis only
#    A key  -- All axes
#    S key  -- Stop / pause
#    ESC    -- Quit

=============================

MG-11.PNG
mug.txt
Mug_PointCloud_3D.ring
Reply all
Reply to author
Forward
0 new messages