Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
einsteinathome
pulsatingscience
Commits
1c6f58a7
Commit
1c6f58a7
authored
Jul 20, 2010
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed spin/magnetic axis rotations to reflect new initial camera position
parent
6b75f14b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+7
-7
src/pulsatingscience.ui
src/pulsatingscience.ui
+4
-1
No files found.
src/pulsaranimationwidget.cpp
View file @
1c6f58a7
...
...
@@ -262,7 +262,7 @@ void PulsarAnimationWidget::paintGL()
// draw pulsar
glPushMatrix
();
glPushMatrix
();
glRotatef
(
m_pulsarSpinAxisInclination
,
0
.0
,
0.0
,
1
.0
);
glRotatef
(
-
m_pulsarSpinAxisInclination
,
1
.0
,
0.0
,
0
.0
);
glRotatef
(
m_pulsarRotationAngle
,
0.0
,
0.0
,
1.0
);
// draw spin axis
...
...
@@ -303,10 +303,10 @@ void PulsarAnimationWidget::paintGL()
// first cone
glPushMatrix
();
glRotatef
(
m_pulsarSpinAxisInclination
,
0
.0
,
1
.0
,
0.0
);
glRotatef
(
-
m_pulsarSpinAxisInclination
,
1
.0
,
0
.0
,
0.0
);
glRotatef
(
-
m_pulsarRotationAngle
-
90.0
,
0.0
,
0.0
,
1.0
);
glRotatef
(
-
m_pulsarMagneticAxisInclination
,
1
.0
,
0
.0
,
0.0
);
glRotatef
(
m_pulsarMagneticAxisInclination
,
0
.0
,
1
.0
,
0.0
);
// draw magnetic axis (for both cones)
if
(
m_showRotationAxes
)
{
...
...
@@ -374,10 +374,10 @@ void PulsarAnimationWidget::paintGL()
// second cone
glPushMatrix
();
glRotatef
(
180.0
,
1.0
,
0.0
,
0.0
);
glRotatef
(
-
m_pulsarSpinAxisInclination
,
0
.0
,
1
.0
,
0.0
);
glRotatef
(
-
m_pulsarSpinAxisInclination
,
1
.0
,
0
.0
,
0.0
);
glRotatef
(
m_pulsarRotationAngle
-
90.0
,
0.0
,
0.0
,
1.0
);
glRotatef
(
m_pulsarMagneticAxisInclination
,
1
.0
,
0
.0
,
0.0
);
glRotatef
(
m_pulsarMagneticAxisInclination
,
0
.0
,
1
.0
,
0.0
);
glTranslatef
(
0.0
,
0.0
,
-
4.0
);
...
...
@@ -615,8 +615,8 @@ void PulsarAnimationWidget::updatePulseProfile()
const
double
yk
=
-
m_cameraPosX
;
const
double
zk
=
m_cameraPosY
;
const
double
cam
=
pow
(
xk
,
2.0
)
+
pow
(
yk
,
2.0
)
+
pow
(
zk
,
2.0
);
const
double
alpha
=
deg2rad
*
(
90.0
-
m_mouseAngleH
);
const
double
delta
=
deg2rad
*
m_mouseAngleV
;
const
double
alpha
=
deg2rad
*
(
90.0
-
m_mouseAngleH
);
const
double
delta
=
deg2rad
*
m_mouseAngleV
;
const
double
gaussProfile
=
0.012337
;
for
(
int
x
=
0
;
x
<
360
;
++
x
)
{
...
...
src/pulsatingscience.ui
View file @
1c6f58a7
...
...
@@ -144,7 +144,7 @@
<item
row=
"2"
column=
"1"
>
<widget
class=
"QSlider"
name=
"sliderPulsarSpinAxisInclination"
>
<property
name=
"statusTip"
>
<string>
Use this slider to adjust the inclination of the spin axis with respect to the
orbit axis
</string>
<string>
Use this slider to adjust the inclination of the spin axis with respect to the
line of sight to the observer
</string>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
...
...
@@ -241,6 +241,9 @@
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QSlider"
name=
"sliderPulsarBeamAngle"
>
<property
name=
"statusTip"
>
<string>
Use this slider to adjust the pulsar beam spread angle (aperture or width)
</string>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment