public static ControlConstraints SegmentConstraints(PhasePoint beginning, PhasePoint end, PhasePoint steps) { ControlConstraints constr = new ControlConstraints(); PhasePoint currentpoint = beginning; while (currentpoint.CompareTo(end) != 0) { constr.Add(currentpoint, null); currentpoint += steps; } return(constr); }
public static Grid SegmentGrid(PhasePoint beginning, PhasePoint end, PhasePoint steps) { Grid grid = new Grid(); grid.Steps = steps; PhasePoint currentpoint = beginning; while (currentpoint.CompareTo(end) != 0) { grid.Add(currentpoint, null); currentpoint += steps; } return(grid); }