Thanks for the response. But correct me if I’m wrong the dot product way is the cos (theta) way I mentioned earlier. Sorry if this is confusing, but is what I meant by the cos (theta) way - https://www.youtube.com/watch?v=TTom8n3FFCw
That will lead to the answers on the right side, which is not what I am after.
The picture on the left of your diagram is also the angle between two vectors, it’s just that one of the vectors is the difference between the two points, and the other vector is the x axis.
If you calculate where the the planes of your points intersect, you can calculate the lengths of the other sides. After which you can use cos(theta) to calculate your angle, because you should now have the hyptohenus and the adjacent.
@cur10us
I don’t really have a working code but here is from the video posted above with the cos (theta)
To be upfront, I am a beginner in coding. So, apologies in advance if the lines will burn your eyes.
import math
point1= (875.906, 116.319, 666.301)
point2= (1148.838, 257.817, 922.204)
#magnitude of point1
mp1 = math.sqrt((point1[0]*point1[0])+(point1[1]*point1[1])+(point1[2]*point1[2]))
#magnitude of point2
mp2 = math.sqrt((point2[0]*point2[0])+(point2[1]*point2[1])+(point2[2]*point2[2]))
#dot product of point1 and point2
dp = ((point1[0]*point2[0])+(point1[1]*point2[1])+(point1[2]*point2[2]))
angle = 1/(math.cos(mp1/mp2))
print (math.degrees(angle))
#result to 77.584 degrees
# The intended resulting angle is -46.844 ° at least on the X rotation and 20.717 ° on the Y rotation.
# The values are retrieved from the manually rotating the edge
Thanks for the response. I am ashamed to say that I don’t really understand so far the concept of your approach (although JesseFK’s seems to make sense to me. Just not sure how to implement it) . I’m not that good with trigonometry, but I’ll try to search around and will get back to you if get something.