Jump to content
noc2

Dot products coming out all wrong

Recommended Posts

Hi;

I've run into a strange problem. I'm trying to get the dot-product of vectors between a geo's points and it's neighboring points 0 and 1. In the screen-shot you can see my vex code. I checked and double-checked and the code seems quite ok to me, yet the dot-product I'm getting is completely off although the edge directions are all straight. The direction vectors between the points and their neighbors look way off. I really don't know why this is happening, any help would be greatly appreciated.

Cheers;

AJ

image.thumb.png.730bcee6ff881e27cd7d4fdefebcca00.png  

CORNERS_DOTP.hip

Edited by noc2

Share this post


Link to post
Share on other sites

you have normalize(@ptnum - p0)  @ptnum is the integer id of the point, not its position.

Share this post


Link to post
Share on other sites
1 hour ago, MENOZ said:

you have normalize(@ptnum - p0)  @ptnum is the integer id of the point, not its position.

I can't believe that escaped me and most importantly, what was I thinking by God :) Thanx so much Menoz. 

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

×