Category: Maths

Determine position of two points with respect to a 3D plane

#include using namespace std;  void check_position(int a, int b, int c, int d,                    int x1, int y1, int z1,                    int x2, int y2, int z2){        int value_1 = a * x1 + b * y1 + c * z1 + d;    int value_2 = a * x2 + b * y2 + c * z2 + d;          if ((value_1 > 0 […]

Continue Reading

Equation of a straight line passing through a point and making a given angle with a given line

#include using namespace std;  double line_slope(double a, double b){    if (a != 0)        return -b / a;                  else        return (-2);}  void line_equation(double a, double b,                   double c, double x1,                   double y1, double alfa){        cout

Continue Reading