Jump to content

Dot product strangeness


Recommended Posts

Hi;

I have quite a simple question on a seemingly simple task, yet I'm kinda confused. If you check out the snapshot attached, you'll see that I tried to create Outward facing normals on a circle and also vectors facing along the positive Z axis in a parallel fashion. When I go ahead and get the dot product of these 2 vectors, I know I should get scalar values between -1 and 1. Yet, when you check out points 0, 2, 4 and 6, not all the values are as they should be. The dot product on points 0 and 4 seem to be correct, yet I'm getting off values for the other 2. What do you think I'm doing wrong?

Thank you so much in advance;

 

AJ

 

image.thumb.png.f7a7c5defe35302f72a863573750f2d3.png

Link to comment
Share on other sites

Hi @Aizatulin Thanx for your reply. The problem that I'm seeing is that the values go beyond -1 and 1. Shouldn't they yields be confined to that bracket only? And with both vectors normalized, I find the results to be off :(

image.png.13fd1ad36785e70183096903566a7f76.png

Edited by noc2
Link to comment
Share on other sites

17 minutes ago, animatrix said:

The values you outlined are not outside [-1, 1]. Some of them are just really small values.

Oh jeez... Thanx @animatrix. So, I guess I'm add odds as to how to read those values. Lastly, I really want to be able to read those values correctly. So, the dot product at point #2 reads: 4.37114e-08 as is. I'm aware that it should be very closely biased toward 0 as the angle is seemingly almost 90 degrees between the 2 vectors. What is the right way to interpret such numeric yields, for someone like me, who expects to see literally something like -0.00001 or something?

Lotsa cheers;

AJ

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...