// // Do these segments creates an X? // public bool Crosses(Segment that) { Point p = this.FindIntersection(that); if (p == null) { return(false); } return(this.PointLiesOnAndExactlyBetweenEndpoints(p) && that.PointLiesOnAndExactlyBetweenEndpoints(p)); }
public bool DefinesDiameter(Segment seg) { if (!seg.PointLiesOnAndExactlyBetweenEndpoints(center)) return false; return this.PointLiesOn(seg.Point1) && this.PointLiesOn(seg.Point2); }
// // Do these segments creates an X? // public bool Crosses(Segment that) { Point p = this.FindIntersection(that); if (p == null) return false; return this.PointLiesOnAndExactlyBetweenEndpoints(p) && that.PointLiesOnAndExactlyBetweenEndpoints(p); }
private List<Atomizer.AtomicRegion> ConvertToSemicircle(Segment diameter, Semicircle semi) { // Verification Step 2. if (!diameter.PointLiesOnAndExactlyBetweenEndpoints(semi.theCircle.center)) { throw new Exception("Semicircle: expected center between endpoints."); } Sector sector = new Sector(semi); return Utilities.MakeList<AtomicRegion>(new ShapeAtomicRegion(sector)); }