private void setAxisParams(BiffurcationMap map) { chart_orbits.Series[0].Name = "F(x)"; chart_orbits.Series[1].Name = "F = x"; chart_orbits.ChartAreas[0].AxisX.MajorGrid.Enabled = false; chart_orbits.ChartAreas[0].AxisY.MajorGrid.Enabled = false; chart_orbits.ChartAreas[0].AxisY.Minimum = 0.05; chart_orbits.ChartAreas[0].AxisY.Maximum = 1.05; chart_orbits.ChartAreas[0].AxisX.Minimum = -0.05; chart_orbits.ChartAreas[0].AxisX.Maximum = 1.05; }
private void calculateAndDrowMap(BiffurcationMap map) { Queue <double> que = new Queue <double>(); double x_0 = inputParams.startingPoint; var point = x_0; double itersNum = inputParams.itersNum; que.Enqueue(point); chart_orbits.Series[2].Name = map.mapName; dataGridView_orbitsTable.Rows.Add(0, point); bool IsFixed = false; chart_orbits.Series[2].Color = Color.Red; int i = 1; for (; i < itersNum && point != 0; i++) { if (IsFixed == true) { break; } double x_1 = map.nextPoint(point); chart_orbits.Series[2].Points.AddXY(point, x_1); chart_orbits.Series[2].Points.AddXY(x_1, x_1); dataGridView_orbitsTable.Rows.Add(i, x_1); point = Math.Round(x_1, 11); if (que.Count > 10000) { que.Dequeue(); } foreach (var s in que) { if (s == point) { IsFixed = true; chart_orbits.Series[2].Color = Color.Black; break; } } que.Enqueue(point); } if (point == 0) { IsFixed = true; chart_orbits.Series[2].Color = Color.Black; } string s1 = $"Рассматривали {map.mapName} при x_0 = {inputParams.startingPoint}, k = {map.coefficient} "; if (IsFixed) { string s2 = $"Точка является периодической с периодом {i}"; Form form = new ResultWindow(s1, s2); form.Show(); } if (!IsFixed) { string s2 = $"Точка не является периодической"; Form form = new ResultWindow(s1, s2); form.Show(); } }