private Point3DCollection ViewportPlotter() { Point3DCollection tempPoints = new Point3DCollection(); double x = 1; double y = 1; double c1 = 1; double c2 = 1; for (int i = 0; i < 640; i = i + 3) { for (int p = 0; p < 480; p = p + 3) { x = c1; y = c2; if (this.z[((p*640)+i)] > 800 && this.z[((p*640)+i)] < 8000) { tempPoints.Add(new Point3D(x, y, this.z[((p*640)+i)])); } c2 = c2 + 3; } c1 = c1 + 3; c2 = 0; } System.Diagnostics.Debug.WriteLine(tempPoints.Count()); return tempPoints; }