Skip to content
Snippets Groups Projects
Commit 1ce2b8e0 authored by Oliver Bock's avatar Oliver Bock
Browse files

Put pulsar radius into variable

parent d5e73ff1
No related branches found
No related tags found
No related merge requests found
...@@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : ...@@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initial binary system parameters (have to match GUI!) // initial binary system parameters (have to match GUI!)
m_pulsarMass = 1.4; m_pulsarMass = 1.4;
// initial companion is "Neutron Star" m_pulsarRadius = 1.0;
m_companionMass = 1.4;
m_pulsarSpinAxisInclination = 0.0; m_pulsarSpinAxisInclination = 0.0;
m_pulsarMagneticAxisInclination = 60.0; m_pulsarMagneticAxisInclination = 60.0;
m_pulsarSemiMajorAxis = 5.0; m_pulsarSemiMajorAxis = 5.0;
m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
// initial spin frequency of 0.5 Hz // initial spin frequency of 0.5 Hz
m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond; m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond;
// beam properties (keep this order!) // beam properties (keep this order!)
m_pulsarBeamLength = 3.0f; m_pulsarBeamLength = 3.0f;
setPulsarBeamAngle(30); 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) // update orbital period (based on settings above)
updateOrbitPeriod(); updateOrbitPeriod();
...@@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL() ...@@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL()
glEnable(GL_LIGHTING); glEnable(GL_LIGHTING);
glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat); glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
gluSphere(m_quadricPulsar, 1.0, 32, 32); gluSphere(m_quadricPulsar, m_pulsarRadius, 32, 32);
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
} }
glPopMatrix(); glPopMatrix();
......
...@@ -104,16 +104,16 @@ private: ...@@ -104,16 +104,16 @@ private:
double m_orbitRotationAngle; double m_orbitRotationAngle;
double m_orbitRotationDelta; double m_orbitRotationDelta;
double m_pulsarRadius;
double m_pulsarBeamLength;
double m_pulsarBeamAngle;
double m_pulsarBeamOuterRadius;
double m_pulsarMass; double m_pulsarMass;
double m_pulsarSemiMajorAxis; double m_pulsarSemiMajorAxis;
double m_companionMass;
double m_companionSemiMajorAxis;
double m_pulsarSpinAxisInclination; double m_pulsarSpinAxisInclination;
double m_pulsarMagneticAxisInclination; double m_pulsarMagneticAxisInclination;
double m_pulsarBeamLength; double m_companionMass;
double m_pulsarBeamAngle; double m_companionSemiMajorAxis;
double m_pulsarBeamOuterRadius;
bool m_showOrbits; bool m_showOrbits;
bool m_showRotationAxes; bool m_showRotationAxes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment