public void Problem01() { /* const string input1 = "A(2,0)"; * const string input2 = "B(5,4)";*/ var pt1 = new Point(2, 0); var ps1 = new PointSymbol(pt1); var pt2 = new Point(5, 4); var ps2 = new PointSymbol(pt2); var d = new Var("d"); var eqGoal = new EqGoal(d, 5); var ls = new LineSegment(pt1, pt2); var lss = new LineSegmentSymbol(ls); TraceInstructionalDesign.FromPointsToLineSegment(lss); TraceInstructionalDesign.FromLineSegmentToDistance(lss); }
public static LineSegmentSymbol GenerateLineSegment(Point pt1, Point pt2) { if (pt1.Equals(pt2)) { return(null); } Debug.Assert(pt1.Concrete); Debug.Assert(pt2.Concrete); var ls = new LineSegment(pt1, pt2); var lss = new LineSegmentSymbol(ls); if (pt1.Traces.Count != 0) { lss.Traces.AddRange(pt1.Traces); } if (pt2.Traces.Count != 0) { lss.Traces.AddRange(pt2.Traces); } TraceInstructionalDesign.FromPointsToLineSegment(lss); return(lss); }