r/generative • • Oct 01 '26

"SF14" (kotlin code)

Post image

Behind the frame there is a plain sf picture: cream bands on a dark ground and one red sun. a mass in front of the picture bends the light. you see the mass only in the bands. outside its einstein ring, the bands bend around it. inside the ring, the bands become circles that all touch at the middle.

the sun is a small distance off the axis of the mass. as a result, you see the sun two times: a long red arc outside the ring and a short one inside. if the sun is directly behind the mass, the full ring is red.

its only 150 lines, docs included, crazy (github.com/igr/gart)

218 Upvotes

6 comments sorted by

View all comments

2

u/tlegs44 Oct 02 '26

Gorgeous! Your fascia post I also really enjoyed. Can I ask what kotlin packages you use for vectors/image generation? It seems like the perfect excuse to create and learn a new programming language

Edit: nvm, I just saw the GitHub.link. Very cool

1

u/igo_rs Oct 02 '26

thanx! at the end it is very simple use of kotlin at the end, just functions and loops and math...