Beispiel #1
0
 public static Line constructFromTwoPoints(Point A, Point B) {
   Line l = new Line();
   l.A = A;
   l.B = B;
   l.refreshCoefs();
   return l;
 }
Beispiel #2
0
 public static Line constructFromPointAndVector(Point A, double a, double b) {
   Line l = new Line();
   l.a = -b;
   l.b = a;
   l.A = A;
   l.B = new Point(A.x + a, A.y + b);
   l.c = b * A.x - a * A.y;
   return l;
 }
Beispiel #3
0
 public static Line constructFromPointAndNormal(Point A, double a, double b) {
   Line l = new Line();
   l.a = a;
   l.b = b;
   l.A = A;
   l.B = new Point(A.x - b, A.y + a);
   l.c = -a * A.x - b * A.y;
   return l;
 }