public GgbVector getCartesianEquationVector(GgbMatrix m) {
    GgbVector origin = getCoordSys().getOrigin();
    GgbVector direction = getCoordSys().getVx();

    // TODO generalize it to other planes than xOy

    // if lines is not in the plane, return null
    if (!Kernel.isZero(origin.getZ()) || !Kernel.isZero(direction.getZ())) return null;

    double x = -direction.getY();
    double y = direction.getX();
    double z = -x * origin.getX() - y * origin.getY();

    return new GgbVector(x, y, z);
  }
  /**
   * returns the point at position lambda on the coord sys in the dimension given
   *
   * @param dimension
   * @param lambda
   * @return the point at position lambda on the coord sys
   */
  public GgbVector getPointInD(int dimension, double lambda) {

    GgbVector v = getPoint(lambda);
    switch (dimension) {
      case 3:
        return v;
      case 2:
        return new GgbVector(v.getX(), v.getY(), v.getW());
      default:
        return null;
    }
  }