Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The diagonal superfluous lines are there because you are adding points and segments to the same figure. The pen never gets lifted from the paper. You have to split your geometry into more figures.</p> <p>Copy your segment and figures creating into every place you want the pen to "go down", and the figure.Segments.Add(segment) and geometry.Figures.Add(figure) into every place you want the pen to "go up".</p> <p>That way your geometry will consist of many separate figures, and your diagonals should no longer be a problem.</p> <pre><code> for (int ra = 0; ra &lt;= 24; ra = ra + 3) { figure = new PathFigure(); segment = new PolyLineSegment(); for (int dec = -90; dec &lt;= 90; dec = dec + 3) { points = coords.GetAitoffCoord(ra, dec); double xCoord = xCenter + points.X * width / 2; double yCoord = yCenter + points.Y * height / 2; segment.Points.Add(new Point(xCoord, yCoord)); } figure.StartPoint = segment.Points[0]; figure.Segments.Add(segment); geometry.Figures.Add(figure); } for (int dec = -90; dec &lt;= 90; dec = dec + 30) { figure = new PathFigure(); segment = new PolyLineSegment(); for (int ra = 0; ra &lt;= 12; ra = ra + 1) { points = coords.GetAitoffCoord(ra, dec); double xCoord = xCenter + points.X * width / 2; double yCoord = yCenter + points.Y * height / 2; segment.Points.Add(new Point(xCoord, yCoord)); } figure.StartPoint = segment.Points[0]; figure.Segments.Add(segment); geometry.Figures.Add(figure); } for (int dec = -90; dec &lt;= 90; dec = dec + 30) { figure = new PathFigure(); segment = new PolyLineSegment(); for (double ra = 12.01; ra &lt;= 25; ra++) { points = coords.GetAitoffCoord(ra, dec); double xCoord = xCenter + points.X * width / 2; double yCoord = yCenter + points.Y * height / 2; segment.Points.Add(new Point(xCoord, yCoord)); } figure.StartPoint = segment.Points[0]; figure.Segments.Add(segment); geometry.Figures.Add(figure); } figure = new PathFigure(); segment = new PolyLineSegment(); for (int dec = -90; dec &lt;= 90; dec = dec + 3) { double ra = 12.01; points = coords.GetAitoffCoord(ra, dec); double xCoord = xCenter + points.X * width / 2; double yCoord = yCenter + points.Y * height / 2; segment.Points.Add(new Point(xCoord, yCoord)); } figure.StartPoint = segment.Points[0]; figure.Segments.Add(segment); geometry.Figures.Add(figure); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload