Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
faxingberlin

How Could I use Complex Number via VEX Language?

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

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

 

 

 

1 person likes this

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

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

2 people like this

Share this post


Link to post
Share on other sites

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
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  
Followers 0