diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index 6399a2a2f4d769f598961d235e094e9371182c36..e3198a37185f18b39da4c2cfcbbfd84cd2dc0be6 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : // initial binary system parameters (have to match GUI!) m_pulsarMass = 1.4; - // initial companion is "Neutron Star" - m_companionMass = 1.4; + m_pulsarRadius = 1.0; m_pulsarSpinAxisInclination = 0.0; m_pulsarMagneticAxisInclination = 60.0; m_pulsarSemiMajorAxis = 5.0; - m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis; // initial spin frequency of 0.5 Hz m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond; // beam properties (keep this order!) m_pulsarBeamLength = 3.0f; setPulsarBeamAngle(30); - + // initial companion is "Neutron Star" + m_companionMass = 1.4; + m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis; // update orbital period (based on settings above) updateOrbitPeriod(); @@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL() glEnable(GL_LIGHTING); glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); - gluSphere(m_quadricPulsar, 1.0, 32, 32); + gluSphere(m_quadricPulsar, m_pulsarRadius, 32, 32); glDisable(GL_LIGHTING); } glPopMatrix(); diff --git a/src/pulsaranimationwidget.h b/src/pulsaranimationwidget.h index 7dc21bd829876e50fd0467324976320bed44e1c2..31f15f9b8c3feac7ca521c4fdcef3c7dd56fce77 100644 --- a/src/pulsaranimationwidget.h +++ b/src/pulsaranimationwidget.h @@ -104,16 +104,16 @@ private: double m_orbitRotationAngle; double m_orbitRotationDelta; + double m_pulsarRadius; + double m_pulsarBeamLength; + double m_pulsarBeamAngle; + double m_pulsarBeamOuterRadius; double m_pulsarMass; double m_pulsarSemiMajorAxis; - double m_companionMass; - double m_companionSemiMajorAxis; - double m_pulsarSpinAxisInclination; double m_pulsarMagneticAxisInclination; - double m_pulsarBeamLength; - double m_pulsarBeamAngle; - double m_pulsarBeamOuterRadius; + double m_companionMass; + double m_companionSemiMajorAxis; bool m_showOrbits; bool m_showRotationAxes;