Cosine value between two vectors:
The cosine between two vectors can be found by Euclid's dot product formula. Given two attribute vectors A and B, the similarity θ of other chords is given by dot product and vector length.
The upper part of the formula: the coordinate operation of the product of a and b: let a=(x 1, y 1) and b=(x2, y2), then A B = x 1x2+y 1y2. The lower part of the formula is the product of the modules of a and b: let a=(x 1, y 1) and b=(x2, y2), then (| a ||| b |) = under the radical sign (x 1 square+y/kloc-0).
Solution of line angle and line angle;
The line angle can be directly obtained by the following formula, because the range of the line angle is (0, π/2), so the sine value and cosine value of the included angle are always greater than or equal to zero, so the absolute value can be directly obtained.
The calculation of line-plane angle needs the help of plane normal vector. As shown in the figure below, the angle formed by the line plane angle and the normal vector of the line and the plane are complementary, so the sine value of the line plane angle is the cosine value of the angle formed by the line and the normal vector of the plane, and the sine value of the angle formed by the line plane angle and the normal vector of the plane.
Because the value range of the included angle between a straight line and a plane is also (0, π/2), and the sine and cosine values of the included angle are always greater than or equal to zero, the cosine value of the angle formed by the straight line and the plane normal vector can be directly taken as the absolute value.