Given three direction cosines l, m and n of a 3-D plane, the task is to check if it is possible to draw a straight line with them or not. Print Yes if possible else print No.
Input: l = 0.258, m = 0.80, n = 0.23
Input: l = 0.70710678, m = 0.5, n = 0.5
Approach: If a straight line forms angle a with positive X-axis, angle b with positive Y-axis and angle c with positive Z-axis then its direction cosines are cos(a), cos(b) and cos(c).
For a straight line, cos2(a) + cos2(b) + cos2(c) = 1.
Below is the implementation of the above approach:
- Represent a given set of points by the best possible straight line
- Direction of a Point from a Line Segment
- Check whether two straight lines are orthogonal or not
- Check if three straight lines are concurrent or not
- Check if a line passes through the origin
- Check whether the point (x, y) lies on a given line
- How to check if two given line segments intersect?
- Check if a line touches or intersects a circle
- Program to find third side of triangle using law of cosines
- Check if a line at 45 degree can divide the plane into two equal weight parts
- Count of different straight lines with total n points with m collinear
- Draw geometric shapes on images using OpenCV
- Chain Code for 2D Line
- Find the other end point of a line with given one end and mid
- Reflection of a point about a line in C++