public static Point2d[] HyperbolaHyperbola(Hyperbola2d hyp1, Hyperbola2d hyp2) { Transform2d tr = hyp1.ToStandardPosition; hyp2 = new Hyperbola2d(hyp2); //copy for modification hyp2.Transform(tr); Point2dSet res = StdHyperbolaConic(hyp1.Ratio, hyp2); res.InverseTransform(tr); return(res.ToArray()); }
public static Point2d[] ParabolaHyperbola(Parabola2d pab, Hyperbola2d hyp) //tested ok { Transform2d tr = pab.ToStandardPosition; //y=x^2 hyp = new Hyperbola2d(hyp); //copy for transformation hyp.Transform(tr); //to standard space of parabola for stabillity GeneralConic2d gencon = hyp.ToGeneralConic(); var ptset = StandardPosParabolaGeneralConic(gencon); ptset.Transform(tr.Inversed); return(ptset.ToArray()); }
public static Point2d[] HyperbolaEllipse(Hyperbola2d hyp, Ellipse2d elp) { //TODO: this is probably more stable intersecting hyperbola with unitcircle. Rewrite. Transform2d tr = hyp.ToStandardPosition; hyp = new Hyperbola2d(hyp); elp = new Ellipse2d(elp); hyp.Transform(tr); elp.Transform(tr); GeneralConic2d hcon = new GeneralConic2d(1, 0.0, -1 / (hyp.B * hyp.B), 0.0, 0.0, -1); Point2dSet pset = new Point2dSet(); pset.AddRange(ConicConic(hcon, elp.ToGeneralConic())); pset.Transform(tr.Inversed); return(pset.ToArray()); }