Möbius Transformation

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
insignia
Prole
Posts: 8
Joined: Wed Jun 05, 2024 10:29 pm

Möbius Transformation

Post by insignia »

For the past few weeks I've been trying to figure out a method for rendering hyperbolic geometry using Love 2d. At this point I figured out how to use Möbius transformations and here is my product. The equation I used should hopefully (If God himself is willing...) be a precursor to effectivly helping render hyperbolic geometry.

Controls: Left, Right, Up, Down, to Move the dots. LShift to speed up the dots.
Attachments
Mobius.png
Mobius.png (21.69 KiB) Viewed 14318 times
Mobius.love
(660 Bytes) Downloaded 1712 times
:]]
User avatar
pgimeno
Party member
Posts: 3672
Joined: Sun Oct 18, 2015 2:58 pm

Re: Möbius Transformation

Post by pgimeno »

Looks cool! I couldn't quite understand why the yellow square is off centre with respect to the purple square though. I managed to centre it and make it symmetric but I'm not sure what I was doing as I haven't checked the math.
insignia wrote: Wed Aug 28, 2024 7:28 pmThe equation I used should hopefully (If God himself is willing...) be a precursor to effectivly helping render hyperbolic geometry.
An obvious route is to make the square a mesh and the dots vertices; assign UVs to each vertex and then apply the transform to the vertices, perhaps using a vertex shader, I'm not sure of that.

Another possibility is to apply the transform with a fragment shader, but for that you will need the inverse transform I presume.
User avatar
insignia
Prole
Posts: 8
Joined: Wed Jun 05, 2024 10:29 pm

Re: Möbius Transformation

Post by insignia »

pgimeno wrote: Mon Sep 02, 2024 9:03 pm Looks cool! I couldn't quite understand why the yellow square is off centre with respect to the purple square though. I managed to centre it and make it symmetric but I'm not sure what I was doing as I haven't checked the math.
insignia wrote: Wed Aug 28, 2024 7:28 pmThe equation I used should hopefully (If God himself is willing...) be a precursor to effectivly helping render hyperbolic geometry.
An obvious route is to make the square a mesh and the dots vertices; assign UVs to each vertex and then apply the transform to the vertices, perhaps using a vertex shader, I'm not sure of that.

Another possibility is to apply the transform with a fragment shader, but for that you will need the inverse transform I presume.
The reason for this artifact is because, That's just how the math works. No bugs or anything.
:]]
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests