public void CalcNextTrajectory() { List <PointD> current = new List <PointD>(Traject); List <PointD> newList = new List <PointD>(); Traject.Clear(); foreach (PointD p in current) { Traject = Trajectory(p); newList.AddRange(Traject); } Traject = newList; }
public override List <PointD> Trajectory(PointD p) { Traject.Clear(); decimal startX = p.X; decimal startY = p.Y; for (int h = 0; h < multStepPoints && (startX * startX + startY * startY < max_MAG_SQUARED); h++) { decimal stX = startX; startX = startX * startX - startY * startY; startY = 2 * stX * startY; Traject.Add(new PointD(startX, startY)); } return(Traject); }
public virtual List <PointD> Trajectory(PointD p) { Traject.Clear(); decimal startX = p.X; decimal startY = p.Y; for (int h = 0; h < multStepPoints && (startX * startX + startY * startY < max_MAG_SQUARED); h++) { decimal stX = startX; startX = 1 - parameters[2] * startX * startX + startY; startY = parameters[1] * stX; Traject.Add(new PointD(startX, startY)); } return(Traject); }
public void InitTrajectory(PointD p) { Traject.Clear(); decimal radiusX = (xMax - XMin) / 200; decimal radiusY = (YMax - yMin) / 100; double alpha = 0; int totalPoints = initionalDots; for (int c = 0; c < totalPoints; c++) { decimal dx = radiusX * (decimal)Math.Sin(alpha); decimal dy = radiusY * (decimal)Math.Cos(alpha); decimal x = p.X - dx; decimal y = p.Y - dy; PointD newP = new PointD(x, y); Traject.Add(newP); alpha += 2 * Math.PI / totalPoints; } }