Followup from yesterday's post about uvs

No.14136187 ViewReplyOriginalReport
I made a thread asking for help with converting a position in 3D space for a uv coordinate and put it in abstract math terms because I wasn't specifically for programming help:
>>14128918

Anon psuedocoded out the an answer within 30 minutes:
>>14129013
It looked neat so I decided to try it out. I thought I should put the real code in a thread here .