Mapping circle to square

Official forum for open source FreePIE discussion and development.
Post Reply
Jabberwock
Cross Eyed!
Posts: 196
Joined: Mon Mar 02, 2015 3:58 pm

Mapping circle to square

Post by Jabberwock »

My balance board is somehow working, but I have encountered another problem: the values provided by the board are more or less circular. This means I cannot directly use it for XBOX controller emulator, as I would lose the corners (no surfing tricks!).

I have found some solutions to this:
http://squircular.blogspot.com/2015/09/ ... quare.html
or
http://ngemu.com/threads/circle-to-squa ... ng.155968/

but I cannot get it to work in python... The first almost works, but I somehow exceed the required values for u and v... The second is too c for me to get it.
Post Reply

Return to “FreePIE”