//--------------------------------------------------------------------------------------------- //Трансформация траектоории (центрирование, поворот, растяжение) private Curve2D TransformateTrajectory( Curve2D trajectory, EllipseDescriptor approximateEllipse ) { //Центрирование Curve2D transformedTrajectory = this.CentreTrajectory(trajectory, approximateEllipse); //Поворот параллельно координатной оси double rotationAngleToAxis = approximateEllipse.GetAngleBetweenOxAndPrincipalAxis(); transformedTrajectory = this.RotateTrajectory(transformedTrajectory, rotationAngleToAxis); //Растяжение EllipseOrientaion primaryOrientation = approximateEllipse.GetOrientaion(); TrajectoryOrientation trajectoryOrientation = this.DetectTrajectoryOrientation(primaryOrientation, rotationAngleToAxis); double koefficientOfStretch = 1 / approximateEllipse.GetCompressionRatio(); transformedTrajectory = this.StretchingTrajectory (transformedTrajectory, trajectoryOrientation, koefficientOfStretch); //Поворот траектории до пересечения первой точки с осью OX Point2D firstPointTrajectory = transformedTrajectory[0]; double rotationAngle = Mathem.Arctg(firstPointTrajectory.Y, firstPointTrajectory.X); transformedTrajectory = this.RotateTrajectory(transformedTrajectory, rotationAngle); return(transformedTrajectory); }
//------------------------------------------------------------------------------------------- //Вычисление фазовых сдвигов по траектории private double[] CalculatePhaseShifts(Curve2D trajectory) { int shiftsCount = trajectory.PointsCount; double[] phaseShifts = new double[shiftsCount]; for (int index = 0; index < shiftsCount; index++) { Point2D point = trajectory[index]; double phaseShift = Mathem.Arctg(point.Y, point.X); phaseShifts[index] = phaseShift; } return(phaseShifts); }
//--------------------------------------------------------------------------------------------- //Вычисление фазы в точке private double CalculatePhase(double x, double y) { double phase = Mathem.Arctg(y, x); return(phase); }