Jump to content
Sign in to follow this  
faxingberlin

How Could I use Complex Number via VEX Language?

Recommended Posts

I am making some fractal which is needed Complex Numbers.

I use Python Module's Complex Method. => complex(1, 2) = 1+2j

But I want to know using Complex Numbers via VEX Language.

 

According to SideFX's Houdini Documents, 

vector2 : Two floating point values. You might use this to represent texture coordinates (though usually Houdini uses vectors) or complex numbers.

But I cannot know how to express the complex numbers in VEX.

Share this post


Link to post
Share on other sites
mestela    451

You have to come up with your own complex mult/add functions, but you can do it using vector2 types:

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
39 minutes ago, mestela said:

You have to come up with your own complex mult/add functions, but you can do it using vector2 types:

 

Okay  That works! I understand. Thanks!

 

 

Share this post


Link to post
Share on other sites
petz    305

if you are using houdini 16, just include complex.h in your vex code. it´s in $HFS/houdini/vex/include.

  • Like 2

Share this post


Link to post
Share on other sites
mestela    451

Ace, thanks petz!

(edit)

Oh wait, its a subset of functionality of the standard lib, so no cdiv or other more interesting things. Doh!

 

Share this post


Link to post
Share on other sites
On 2017. 4. 23. at 5:13 AM, petz said:

if you are using houdini 16, just include complex.h in your vex code. it´s in $HFS/houdini/vex/include.

Thanks! That's really helpful

Share this post


Link to post
Share on other sites
petz    305
On 23.4.2017 at 3:56 AM, mestela said:

Ace, thanks petz!

(edit)

Oh wait, its a subset of functionality of the standard lib, so no cdiv or other more interesting things. Doh!

 

ah, yes, cdiv is missing. might be worth an RFE!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×