diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index 8ad39548a75d7b3c0bf9bf0d16f6499a2cde0b92..baa155306ab77c789db56cb83443cc406cabaa88 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -353,6 +353,31 @@ void PulsarAnimationWidget::paintGL() gluDisk(m_quadricPulsarSpinAxisTop2, 0, 0.020, 32, 8); } glPopMatrix(); + + glPushMatrix(); + { + glTranslatef(0.0, 0.0, 2.0f - 0.75f); + glBegin(GL_TRIANGLE_FAN); + { + // Pinnacle of cone is shared vertex for fan, moved up z-axis + // to produce a cone instead of a circle + glVertex3f(0.0f, 0.0f, 0.75f); + + // Loop around in a circle and specify even points along the circle + // as the vertices of the triangle fan (32 sections) + for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) + { + // Calculate x and y position of the next vertex + x = 0.25f * sin(angle); + y = 0.25f * cos(angle); + + // Specify the next vertex for the triangle fan + glVertex2f(x, y); + } + } + glEnd(); + } + glPopMatrix(); } // draw disc