Jump to content

Mobius transformations


sessionbeer

Recommended Posts

I'd like to know if anyone has done something like this in Houdini? Applying a mobius transformation to a simple grid for

example? The formula looks straight forward....if you can read maths, which I can't!

http://www.math.ucla.edu/~mwilliams/complex.html

I've been looking around for code examples of

a Mobius transformation but haven't found any good examples which I could reproduce in Houdini. It would be interesting to hear

if any one has done something like this, or can translate the equation into readable code for a non-mathematician :) 

 

 

mobius_generic.png

mobius2_thumb.png

Edited by sessionbeer
Link to comment
Share on other sites

  • 2 weeks later...

I couldn't let this one go; python sop is a little slow (though having a built in complex type is super handy), thought I'd try and port it to vex.

This is substantially faster than the python one, the code is a little messy. Tried to get a complex struct happening too, but that got boring really quickly, so just abused some vector2 variables instead. :)

Interesting that there's some errors in the vex one that aren't apparent in the python one; not sure if that's due to vex precision errors, or because my complex divide function isn't doing the right thing; I found a few C examples of dealing with complex number, some did lots of tests within their divide functions for when values were near 0, I went lazy and found another example that did no testing at all....)

-matt

 

complex_v02.hip

  • Like 6
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...