Measure apparent surface from arbitrary angle
I'm not sure of the correct terminology here, which is impeding my googling about the subject. A name for what I'm trying to do might suffice.
Basically what I want to do is calculate the apparent surface area of a surface as seen from an arbitrary angle. the orientation of the surface is also arbitrary.
we can think of the surface as a sail, and the direction as the wind. If the sail is positioned in a certain way, how much wind will it catch given a certain direction of the wind?
I've managed to calculate this accurately enough for the case where the wind is perfectly aligned with one of the base vectors, I'll give an example:
say the sail is triangular, and defined by the coordinates of it's three corners a, b and c:
a= [1,2,3]
b= [2,3,1]
c= [3,1,2]
now, if we imagine the wind is aligned with Z, we can simply remove the Z value of the above coordinates to get a 2-dimensional triangle which is the result I'm after:
a=[1,2]
b=[2,3]
c=[3,1]
from here all we have to do is get the distances of the sides and we can calculate the surface fairly easily.but this method falls apart when the wind is not aligned with X, Y, or Z.
I guess all I really need is to apply the correct rotational transformation on the original coordinates and this method will work, but then I need to figure out the correct rotation and I have no idea how to do that. Also I suspect there is a faster, easier way of doing this, I just don't know what it is. any ideas?
Your answer
Follow this Question
Related Questions
Having trouble with Vectors 1 Answer
Need some help programming basic AI movement 0 Answers
Vectors side determing by a line. Please help me out !!!! 0 Answers
Moved GameObject under Canvas (Parent), transform.position vector coordinates mismatch 0 Answers
How To Duplicate Canvas To Follow Player 0 Answers