public void CreateAspectsCollection(List <SpaceObjectData> lstSO1) { InitRedBuletsStatic(lstSO1); _aspects = new List <Aspect>(); for (int i = 0; i < lstSO1.Count; ++i) { SpaceObject so1 = lstSO1[i]._so; for (int j = i + 1; j < lstSO1.Count; ++j) { SpaceObject so2 = lstSO1[j]._so; double dLambda = Math.Abs(so1.Lambda - so2.Lambda); if (dLambda > 180) { dLambda = 360 - dLambda; } AspectType at = GetAspectType(dLambda, so1.PlanetType, so2.PlanetType); if (at == AspectType.AT_CONJUNCTION) { lstSO1[i].IsRed = lstSO1[j].IsRed = true; } if (at != AspectType.AT_NONE) { double l10 = so1.Lambda; double l20 = so2.Lambda; double[] do1 = so1.GetDynPosition(); double[] do2 = so2.GetDynPosition(); double delta2 = Math.Abs((int)at - Math.Abs(do1[0] - do2[0])); double delta1 = Math.Abs((int)at - Math.Abs(l10 - l20)); bool IsConvergative = false; if (delta2 < delta1) { IsConvergative = true; } _aspects.Add(new Aspect() { Angle = Math.Abs(dLambda), PlanetType1 = so1.PlanetType, PlanetType2 = so2.PlanetType, IsConvergative = IsConvergative, _aspect_data = (AspectData)_AspectsDataCollection.Where(x => x.Angle == ((decimal)at)).FirstOrDefault() }); } } } }