public IEnumerable <RelativePoint> GetGridPoints() { if (TopBottomDistance == 0 || LeftRightDistance == 0) { return(null); } var vLines = new List <RelativeLine>(); var hLines = new List <RelativeLine>(); var points = new List <RelativePoint>(); SolvePerspective(); double currentDist = 0; while (currentDist <= LeftRightDistance) { hLines.Add(new RelativeLine(Perspective(new Point2d(0, currentDist)), Perspective(new Point2d(1, currentDist)))); currentDist += Defaults.GridNotchDistance; } currentDist = 0; while (currentDist <= TopBottomDistance) { vLines.Add(new RelativeLine(Perspective(new Point2d(currentDist, 0)), Perspective(new Point2d(currentDist, 1)))); currentDist += Defaults.GridNotchDistance; } foreach (var vLine in vLines) { foreach (var hLine in hLines) { try { points.Add(GeometryHelpers.LineIntersection(vLine, hLine)); } catch { } } } return(points); }