#Angle difference when projecting a vector on a plane

1 messages · Page 1 of 1 (latest)

zinc bone
#

Hello everyone,
I am having trouble understanding why I get two different angles when supposedly they should be the same.

The blue plane is the XZ plane, the red plane is the orbit plane which is inclined by 45 degrees. With red and blue vectors along these planes. As you can see the angle there is 45 deg

I am interested in the vector along the ellipse at that point, the green vector. I make a projection of it on the blue plane (yellow) the angle I get is 39 deg.

This is how I derive the projection from the tangent vector:
var v_proj = (t_world - reference_plane_normal * t_world.dot(reference_plane_normal))

To my understanding the angle between these vectors should be 45 deg yet it isn't. I've checked my code multiple times and I believe it is mathematically sound. I can also provide a github link to the code.

I am seriously lost why this is happening.

limber warren
#

I mean if you print them when doing the calculation

zinc bone
#

t_world: (-0.447214, 0.632456, -0.632456)
reference_plane_normal: (0.0, 1.0, 0.0)
these are the exact values

limber warren
#

I'm not at my computer, but don't those numbers look a bit too big for a normalized vector? (Which I think it needs to be)

#

Hmm, no, maybe they add up correctly 🤔