Exactly. Just like that.
To make things lighter, I’ve generated the big lists (point, vector, colors, and eventually trail polylines) all inside the c# script, because inputting or outputting big lists would slow down whole GH.
So input is the simple “view square” rectangle, and output is a colored mesh (a single object).
I’d like to treasure a bit more what I’ve spent my time over it (like any other under the gallery tag), specifically when it’s something a bit remotely original , given my limited design skills . I hope you can understand.
I’ve attached a simple example above, start from there and try. You can pm me with your results.
Rhino ways is your way. A really vaste and complete engine accessible by many roads. In this case it’s GH + rhinocommon via c#.
That solution is tweaking a normal render engine and exploiting refraction index with multiple shells of “glass-like” material.
While the result is really good looking, I’d say it’s objectively wrong: the image of the disk in front of the black hole (nearer the camera/viewer) isn’t deformed at all by the gravity, but it should!
My goal was to “check” if my basic knowledge (a particle system with fixed particle speed) would resemble what seen elsewhere. I know from start I could not achieve a complex render, with lights, materials, shadows, etc
But, for example, I hoped to have similar but simpler effect like:
https://www.iflscience.com/first-image-predicted-supernova-32755 … here the same galaxy is visible trice thanks to gravitational lenses. (And each of the three images have a different “timestamp”… where they could predict a nova burst!).
… and here:
I could see the same black hole 4 times! (and almost 2 more times behind the other disks…) but due to resolution the attached shot only 2 are visible.
Not having any background “sky” leave few object to be seen… I should play it more and enhance the definition.
I’m not sure with multiple shells of glass this effect would occur. Surely a lot different. Light that doesn’t intersect any glass shell will just go perfectly straight.
I was not pursuing aesthetic results as the video you linked. I just wanted to play with math
But I’m sure any programmer could get my same result (and better) in any different software. I use Rhino because it’s easy and very accessible.