private void Fill() { points3D1.Clear(); points3D1.BeginUpdate(); try { int m = 40; double tmpz, tmpx, tmpy; for (int x = -m; x < m; x++) { tmpx = x * x / 900.0; for (int z = -m; z < m; z++) { tmpz = z * z / 900.0; tmpz = Math.Sqrt(tmpx + tmpz); tmpy = 4 * Math.Cos(3 * tmpz) * Math.Exp(-0.5 * tmpz); points3D1.Add(x, tmpy, z); } } } finally { points3D1.EndUpdate(); } }
private void bRefresh_Click(object sender, EventArgs e) { points3D.Clear(); AddPoints(); }