GraphPane myPane = zgc.GraphPane; // Make up some data points from the Sine function PointPairList list1 = new PointPairList(); double amplitude = double.Parse(textBox2.Text); double period = double.Parse(textBox3.Text); double y = 0; for (double x = 0; x <= double.Parse(textBox1.Text); x += .005) { double p = (x % (period)) / period; if (p >= 0 && p <= 0.25) y = 4 * p * amplitude; if (p > 0.25 && p < 0.5) y = amplitude - (p - 0.25) * 4 * amplitude; if (p > 0.5 && p <= 0.75) y = -4 * (p - 0.5) * amplitude; if (p > 0.75 && p <= 1) y = -(amplitude - (p - 0.75) * 4 * amplitude); list1.Add(x, y); } var line = zg1.MasterPane[0].AddCurve("", list1, Color.Goldenrod); line.Symbol.IsVisible = false; zg1.AxisChange(); zg1.Refresh(); zgc.AxisChange();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)