Black Hole sim (Warmup)
- 3 Devlogs
- 24 Total hours
Yo this is my first project in a while, so my C#/C++ is pretty rusty. So I had a go at simulating a black hole as its more maths focused than code focused. I used unity, but in hindsight i should have just learned open Gl or whatever. This all runs on the CPU which is a no go for what im planning to build next, so im gonna look into HLSL which should be manageable? IDK. THe method i used is by no means the right one, but i decided to make a ray class. In this they ray is propelled outwards, where i used polar coordinates with the origin set at the center of the black hole. If you want to simulate a blakc hole yourself do not look at this as it is not a good implementation. One issue I encountered alot was rays exploding at the x axis line (div 0 error I think), and you can see i tried to fix that but to limited success. But anyways I hope you think this final render is cool and have a good day!