# Vex_Question

## Recommended Posts

Hi guys,

I'm a junior houdini artist, I'm studying vex now and it's very useful but quite difficult for me at the moment. I was wondering how to do the dot product of the same vector between two points in a geometry and then calculate the angle for every points of that.

I'm not sure if I have to use the neighbour vex function in the point wrangle and then use the foreach loop vex function to calculate the angle between the two neighbours points for every single point in the geometry. Or instead of the neighbour code I have to use the xyzdist vex function. I'm a little bit confuse at the moment.

I hope I have been clear enough.

Thank you so much!

Cheers!

##### Share on other sites

Hey Flavio,

It's a bit tricky to understand what you want to do. Which 2 vectors do you want to compare? Can you clarify what you mean by 'same vector'? It would be great to have an example hip or drawing

##### Share on other sites

Hi Luis,

Thank you very much for replying, I attached an hip file. I hope it can be useful to understand what I mean.

Flavio

example.hipnc

##### Share on other sites

Take a look at this

dot_consecutive_pts_odf.hipnc

• 1

##### Share on other sites

Hi Vitor,

this is exactly what I was looking for. I coudn't believe that it could be done in this way. I still have to learn a lot.

Thank you so much for your help!

Best regards!

Flavio

##### Share on other sites

hi,

another vex code here. First, fixing the 0-point tangent. Second, to get the real angle in the inside or outside, you need to subtract PI-angle (radians)

dot_consecutive_pts_odf_v2.hipnc

• 1

##### Share on other sites

Hi Cyril;

wow it looks so great and very useful for what I want to do.

Thank you so much!

Flavio

## Create an account

Register a new account