不用递归吧?
var points = new System.Drawing.Point[10];
points[0] = new System.Drawing.Point(10, 30);
points[1] = new System.Drawing.Point(32, 53);
points[2] = new System.Drawing.Point(98, 42);
points[3] = new System.Drawing.Point(139, 90);
points[4] = new System.Drawing.Point(211, 55);
points[5] = new System.Drawing.Point(289, 38);
points[6] = new System.Drawing.Point(342, 46);
points[7] = new System.Drawing.Point(386, 29);
points[8] = new System.Drawing.Point(437, 87);
points[9] = new System.Drawing.Point(486, 93);
System.Drawing.Image img = new System.Drawing.Bitmap(600, 100);
System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(img);
graphics.Clear(System.Drawing.Color.White);
System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
System.Drawing.Pen pen = new System.Drawing.Pen(brush, 1);
for (int x = 1; x < points.Length; x++) {
graphics.DrawLine(pen, points[x - 1], points[x]);
}
Response.Clear();
img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png);
pen.Dispose();
brush.Dispose();
graphics.Dispose();
img.Dispose();
Response.Flush();
points就是你的点数据,每个点包含一个X和Y.