http://ftp.aanet.ru/pub/Linux/X11/apps/xscreensaver-2.31.tar.gz
[xscreensaver] / hacks / glx / whale.c
index 4b1cba612993a597d8908c004739393c789f0707..afff1d381310290dd227010fb313975558d646cb 100644 (file)
@@ -1,13 +1,13 @@
 /* atlantis --- Shows moving 3D sea animals */
 
 #if !defined( lint ) && !defined( SABER )
-static const char sccsid[] = "@(#)whale.c      1.1 98/05/13 xlockmore";
+static const char sccsid[] = "@(#)whale.c      1.3 98/06/18 xlockmore";
 
 #endif
 
 /* Copyright (c) E. Lassauge, 1998. */
 
-/*
+/*-
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)whale.c     1.1 98/05/13 xlockmore";
  *
  */
 
-/**
+/*-
  * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
  * ALL RIGHTS RESERVED
  * Permission to use, copy, modify, and distribute this software for
@@ -79,10 +79,10 @@ static const char sccsid[] = "@(#)whale.c   1.1 98/05/13 xlockmore";
 #ifdef USE_GL
 
 #ifdef STANDALONE
+#include <math.h>
 #include <GL/glx.h>
 #endif
 
-#include <math.h>
 #include "atlantis.h"
 /* *INDENT-OFF* */
 static float N001[3] = {0.019249 ,0.011340 ,-0.999750};
@@ -405,1488 +405,1491 @@ static float P120[3] = {519.73, 128.36, 9163.26};
 static float P121[3] = {524.66, 141.43, 9138.62};
 /* *INDENT-ON* */
 
+
+
 static void
-Whale001(void)
+Whale001(GLenum cap)
 {
-
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N010);
+       glVertex3fv(P010);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glNormal3fv(N010);
+       glVertex3fv(P010);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N074);
+       glVertex3fv(P074);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N072);
+       glVertex3fv(P072);
+       glNormal3fv(N074);
+       glVertex3fv(P074);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N072);
+       glVertex3fv(P072);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N074);
+       glVertex3fv(P074);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N074);
+       glVertex3fv(P074);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N070);
+       glVertex3fv(P070);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N076);
+       glVertex3fv(P076);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N010);
+       glVertex3fv(P010);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N068);
+       glVertex3fv(P068);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N010);
+       glVertex3fv(P010);
+       glEnd();
 }
 
 static void
-Whale002(void)
+Whale002(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N009);
+       glVertex3fv(P009);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N009);
+       glVertex3fv(P009);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glNormal3fv(N073);
+       glVertex3fv(P073);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N071);
+       glVertex3fv(P071);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N073);
+       glVertex3fv(P073);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N009);
+       glVertex3fv(P009);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N009);
+       glVertex3fv(P009);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N011);
+       glVertex3fv(P011);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N073);
+       glVertex3fv(P073);
+       glNormal3fv(N075);
+       glVertex3fv(P075);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N069);
+       glVertex3fv(P069);
+       glNormal3fv(N071);
+       glVertex3fv(P071);
+       glNormal3fv(N073);
+       glVertex3fv(P073);
+       glEnd();
 }
 
 static void
-Whale003(void)
+Whale003(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N018);
+       glVertex3fv(P018);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N019);
+       glVertex3fv(P019);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N019);
+       glVertex3fv(P019);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N012);
+       glVertex3fv(P012);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N017);
+       glVertex3fv(P017);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N018);
+       glVertex3fv(P018);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N017);
+       glVertex3fv(P017);
+       glNormal3fv(N016);
+       glVertex3fv(P016);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N013);
+       glVertex3fv(P013);
+       glNormal3fv(N012);
+       glVertex3fv(P012);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N016);
+       glVertex3fv(P016);
+       glNormal3fv(N015);
+       glVertex3fv(P015);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N014);
+       glVertex3fv(P014);
+       glNormal3fv(N013);
+       glVertex3fv(P013);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N001);
+       glVertex3fv(P001);
+       glNormal3fv(N015);
+       glVertex3fv(P015);
+       glNormal3fv(N014);
+       glVertex3fv(P014);
+       glEnd();
 }
 
 static void
-Whale004(void)
+Whale004(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N014);
+       glVertex3fv(P014);
+       glNormal3fv(N015);
+       glVertex3fv(P015);
+       glNormal3fv(N023);
+       glVertex3fv(P023);
+       glNormal3fv(N022);
+       glVertex3fv(P022);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N015);
+       glVertex3fv(P015);
+       glNormal3fv(N016);
+       glVertex3fv(P016);
+       glNormal3fv(N024);
+       glVertex3fv(P024);
+       glNormal3fv(N023);
+       glVertex3fv(P023);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N016);
+       glVertex3fv(P016);
+       glNormal3fv(N017);
+       glVertex3fv(P017);
+       glNormal3fv(N025);
+       glVertex3fv(P025);
+       glNormal3fv(N024);
+       glVertex3fv(P024);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N017);
+       glVertex3fv(P017);
+       glNormal3fv(N018);
+       glVertex3fv(P018);
+       glNormal3fv(N026);
+       glVertex3fv(P026);
+       glNormal3fv(N025);
+       glVertex3fv(P025);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N013);
+       glVertex3fv(P013);
+       glNormal3fv(N014);
+       glVertex3fv(P014);
+       glNormal3fv(N022);
+       glVertex3fv(P022);
+       glNormal3fv(N021);
+       glVertex3fv(P021);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N012);
+       glVertex3fv(P012);
+       glNormal3fv(N013);
+       glVertex3fv(P013);
+       glNormal3fv(N021);
+       glVertex3fv(P021);
+       glNormal3fv(N020);
+       glVertex3fv(P020);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N018);
+       glVertex3fv(P018);
+       glNormal3fv(N019);
+       glVertex3fv(P019);
+       glNormal3fv(N027);
+       glVertex3fv(P027);
+       glNormal3fv(N026);
+       glVertex3fv(P026);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N019);
+       glVertex3fv(P019);
+       glNormal3fv(N012);
+       glVertex3fv(P012);
+       glNormal3fv(N020);
+       glVertex3fv(P020);
+       glNormal3fv(N027);
+       glVertex3fv(P027);
+       glEnd();
 }
 
 static void
-Whale005(void)
+Whale005(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N022);
+       glVertex3fv(P022);
+       glNormal3fv(N023);
+       glVertex3fv(P023);
+       glNormal3fv(N031);
+       glVertex3fv(P031);
+       glNormal3fv(N030);
+       glVertex3fv(P030);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N021);
+       glVertex3fv(P021);
+       glNormal3fv(N022);
+       glVertex3fv(P022);
+       glNormal3fv(N030);
+       glVertex3fv(P030);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N021);
+       glVertex3fv(P021);
+       glNormal3fv(N030);
+       glVertex3fv(P030);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N023);
+       glVertex3fv(P023);
+       glNormal3fv(N024);
+       glVertex3fv(P024);
+       glNormal3fv(N031);
+       glVertex3fv(P031);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N024);
+       glVertex3fv(P024);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glNormal3fv(N031);
+       glVertex3fv(P031);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N024);
+       glVertex3fv(P024);
+       glNormal3fv(N025);
+       glVertex3fv(P025);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N025);
+       glVertex3fv(P025);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N020);
+       glVertex3fv(P020);
+       glNormal3fv(N021);
+       glVertex3fv(P021);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N020);
+       glVertex3fv(P020);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N027);
+       glVertex3fv(P027);
+       glNormal3fv(N020);
+       glVertex3fv(P020);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N027);
+       glVertex3fv(P027);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glNormal3fv(N035);
+       glVertex3fv(P035);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N025);
+       glVertex3fv(P025);
+       glNormal3fv(N026);
+       glVertex3fv(P026);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N026);
+       glVertex3fv(P026);
+       glNormal3fv(N034);
+       glVertex3fv(P034);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N026);
+       glVertex3fv(P026);
+       glNormal3fv(N027);
+       glVertex3fv(P027);
+       glNormal3fv(N035);
+       glVertex3fv(P035);
+       glNormal3fv(N034);
+       glVertex3fv(P034);
+       glEnd();
 }
 
 static void
-Whale006(void)
+Whale006(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N092);
+       glVertex3fv(P092);
+       glNormal3fv(N093);
+       glVertex3fv(P093);
+       glNormal3fv(N094);
+       glVertex3fv(P094);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N093);
+       glVertex3fv(P093);
+       glNormal3fv(N092);
+       glVertex3fv(P092);
+       glNormal3fv(N094);
+       glVertex3fv(P094);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N092);
+       glVertex3fv(P092);
+       glNormal3fv(N091);
+       glVertex3fv(P091);
+       glNormal3fv(N095);
+       glVertex3fv(P095);
+       glNormal3fv(N094);
+       glVertex3fv(P094);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N091);
+       glVertex3fv(P091);
+       glNormal3fv(N092);
+       glVertex3fv(P092);
+       glNormal3fv(N094);
+       glVertex3fv(P094);
+       glNormal3fv(N095);
+       glVertex3fv(P095);
+       glEnd();
 }
 
 static void
-Whale007(void)
+Whale007(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N030);
+       glVertex3fv(P030);
+       glNormal3fv(N031);
+       glVertex3fv(P031);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glNormal3fv(N030);
+       glVertex3fv(P030);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glNormal3fv(N029);
+       glVertex3fv(P029);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N035);
+       glVertex3fv(P035);
+       glNormal3fv(N028);
+       glVertex3fv(P028);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N035);
+       glVertex3fv(P035);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glNormal3fv(N043);
+       glVertex3fv(P043);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N034);
+       glVertex3fv(P034);
+       glNormal3fv(N035);
+       glVertex3fv(P035);
+       glNormal3fv(N043);
+       glVertex3fv(P043);
+       glNormal3fv(N042);
+       glVertex3fv(P042);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N034);
+       glVertex3fv(P034);
+       glNormal3fv(N042);
+       glVertex3fv(P042);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N042);
+       glVertex3fv(P042);
+       glNormal3fv(N041);
+       glVertex3fv(P041);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N031);
+       glVertex3fv(P031);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N032);
+       glVertex3fv(P032);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glNormal3fv(N033);
+       glVertex3fv(P033);
+       glNormal3fv(N041);
+       glVertex3fv(P041);
+       glEnd();
 }
 
 static void
-Whale008(void)
+Whale008(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N042);
+       glVertex3fv(P042);
+       glNormal3fv(N043);
+       glVertex3fv(P043);
+       glNormal3fv(N051);
+       glVertex3fv(P051);
+       glNormal3fv(N050);
+       glVertex3fv(P050);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N043);
+       glVertex3fv(P043);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glNormal3fv(N051);
+       glVertex3fv(P051);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N051);
+       glVertex3fv(P051);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N041);
+       glVertex3fv(P041);
+       glNormal3fv(N042);
+       glVertex3fv(P042);
+       glNormal3fv(N050);
+       glVertex3fv(P050);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N041);
+       glVertex3fv(P041);
+       glNormal3fv(N050);
+       glVertex3fv(P050);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N036);
+       glVertex3fv(P036);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glNormal3fv(N045);
+       glVertex3fv(P045);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glNormal3fv(N041);
+       glVertex3fv(P041);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glNormal3fv(N040);
+       glVertex3fv(P040);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glNormal3fv(N047);
+       glVertex3fv(P047);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N037);
+       glVertex3fv(P037);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glNormal3fv(N045);
+       glVertex3fv(P045);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glNormal3fv(N046);
+       glVertex3fv(P046);
+       glNormal3fv(N045);
+       glVertex3fv(P045);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N038);
+       glVertex3fv(P038);
+       glNormal3fv(N039);
+       glVertex3fv(P039);
+       glNormal3fv(N047);
+       glVertex3fv(P047);
+       glNormal3fv(N046);
+       glVertex3fv(P046);
+       glEnd();
 }
 
 static void
-Whale009(void)
+Whale009(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N050);
+       glVertex3fv(P050);
+       glNormal3fv(N051);
+       glVertex3fv(P051);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N051);
+       glVertex3fv(P051);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glNormal3fv(N052);
+       glVertex3fv(P052);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glNormal3fv(N045);
+       glVertex3fv(P045);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N044);
+       glVertex3fv(P044);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glNormal3fv(N052);
+       glVertex3fv(P052);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glNormal3fv(N050);
+       glVertex3fv(P050);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glNormal3fv(N057);
+       glVertex3fv(P057);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glNormal3fv(N049);
+       glVertex3fv(P049);
+       glNormal3fv(N057);
+       glVertex3fv(P057);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glNormal3fv(N057);
+       glVertex3fv(P057);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N047);
+       glVertex3fv(P047);
+       glNormal3fv(N048);
+       glVertex3fv(P048);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N047);
+       glVertex3fv(P047);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glNormal3fv(N055);
+       glVertex3fv(P055);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N045);
+       glVertex3fv(P045);
+       glNormal3fv(N046);
+       glVertex3fv(P046);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N046);
+       glVertex3fv(P046);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N046);
+       glVertex3fv(P046);
+       glNormal3fv(N047);
+       glVertex3fv(P047);
+       glNormal3fv(N055);
+       glVertex3fv(P055);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glEnd();
 }
 
 static void
-Whale010(void)
+Whale010(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N080);
+       glVertex3fv(P080);
+       glNormal3fv(N081);
+       glVertex3fv(P081);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N081);
+       glVertex3fv(P081);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N087);
+       glVertex3fv(P087);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glNormal3fv(N087);
+       glVertex3fv(P087);
+       glNormal3fv(N090);
+       glVertex3fv(P090);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N081);
+       glVertex3fv(P081);
+       glNormal3fv(N080);
+       glVertex3fv(P080);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N081);
+       glVertex3fv(P081);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N085);
+       glVertex3fv(P085);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N087);
+       glVertex3fv(P087);
+       glNormal3fv(N083);
+       glVertex3fv(P083);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N087);
+       glVertex3fv(P087);
+       glNormal3fv(N077);
+       glVertex3fv(P077);
+       glNormal3fv(N090);
+       glVertex3fv(P090);
+       glEnd();
 }
 
 static void
-Whale011(void)
+Whale011(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N082);
+       glVertex3fv(P082);
+       glNormal3fv(N084);
+       glVertex3fv(P084);
+       glNormal3fv(N079);
+       glVertex3fv(P079);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N084);
+       glVertex3fv(P084);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N079);
+       glVertex3fv(P079);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N079);
+       glVertex3fv(P079);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N088);
+       glVertex3fv(P088);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glNormal3fv(N088);
+       glVertex3fv(P088);
+       glNormal3fv(N089);
+       glVertex3fv(P089);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N088);
+       glVertex3fv(P088);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N089);
+       glVertex3fv(P089);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N089);
+       glVertex3fv(P089);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N086);
+       glVertex3fv(P086);
+       glNormal3fv(N084);
+       glVertex3fv(P084);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N078);
+       glVertex3fv(P078);
+       glNormal3fv(N084);
+       glVertex3fv(P084);
+       glNormal3fv(N079);
+       glVertex3fv(P079);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N084);
+       glVertex3fv(P084);
+       glNormal3fv(N082);
+       glVertex3fv(P082);
+       glNormal3fv(N079);
+       glVertex3fv(P079);
+       glEnd();
 }
 
 static void
-Whale012(void)
+Whale012(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glNormal3fv(N067);
+       glVertex3fv(P067);
+       glNormal3fv(N066);
+       glVertex3fv(P066);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glNormal3fv(N052);
+       glVertex3fv(P052);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N059);
+       glVertex3fv(P059);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glNormal3fv(N067);
+       glVertex3fv(P067);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glNormal3fv(N066);
+       glVertex3fv(P066);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N058);
+       glVertex3fv(P058);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glNormal3fv(N057);
+       glVertex3fv(P057);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glNormal3fv(N057);
+       glVertex3fv(P057);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N056);
+       glVertex3fv(P056);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glNormal3fv(N055);
+       glVertex3fv(P055);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glNormal3fv(N062);
+       glVertex3fv(P062);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N053);
+       glVertex3fv(P053);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glNormal3fv(N052);
+       glVertex3fv(P052);
+       glEnd();
 }
 
 static void
-Whale013(void)
+Whale013(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P005);
-    glVertex3fv(P006);
-    glVertex3fv(P099);
-    glVertex3fv(P098);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N066);
+       glVertex3fv(P066);
+       glNormal3fv(N067);
+       glVertex3fv(P067);
+       glNormal3fv(N096);
+       glVertex3fv(P096);
+       glNormal3fv(N097);
+       glVertex3fv(P097);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N097);
+       glVertex3fv(P097);
+       glNormal3fv(N096);
+       glVertex3fv(P096);
+       glNormal3fv(N098);
+       glVertex3fv(P098);
+       glNormal3fv(N099);
+       glVertex3fv(P099);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glNormal3fv(N066);
+       glVertex3fv(P066);
+       glNormal3fv(N097);
+       glVertex3fv(P097);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N067);
+       glVertex3fv(P067);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glNormal3fv(N096);
+       glVertex3fv(P096);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N060);
+       glVertex3fv(P060);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glNormal3fv(N096);
+       glVertex3fv(P096);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N096);
+       glVertex3fv(P096);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glNormal3fv(N098);
+       glVertex3fv(P098);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glNormal3fv(N065);
+       glVertex3fv(P065);
+       glNormal3fv(N097);
+       glVertex3fv(P097);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glNormal3fv(N097);
+       glVertex3fv(P097);
+       glNormal3fv(N099);
+       glVertex3fv(P099);
+       glEnd();
+       glBegin(cap);
+       glVertex3fv(P005);
+       glVertex3fv(P006);
+       glVertex3fv(P099);
+       glVertex3fv(P098);
+       glEnd();
 }
 
 static void
-Whale014(void)
+Whale014(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P006);
-    glVertex3fv(P005);
-    glVertex3fv(P004);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N062);
+       glVertex3fv(P062);
+       glNormal3fv(N004);
+       glVertex3fv(P004);
+       glNormal3fv(N005);
+       glVertex3fv(P005);
+       glEnd();
+       glBegin(cap);
+       glVertex3fv(P006);
+       glVertex3fv(P005);
+       glVertex3fv(P004);
+       glVertex3fv(P008);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glNormal3fv(N006);
+       glVertex3fv(P006);
+       glNormal3fv(N008);
+       glVertex3fv(P008);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glNormal3fv(N008);
+       glVertex3fv(P008);
+       glNormal3fv(N004);
+       glVertex3fv(P004);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N062);
+       glVertex3fv(P062);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glNormal3fv(N004);
+       glVertex3fv(P004);
+       glEnd();
 }
 
 static void
-Whale015(void)
+Whale015(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
+       glBegin(cap);
+       glNormal3fv(N055);
+       glVertex3fv(P055);
+       glNormal3fv(N003);
+       glVertex3fv(P003);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N003);
+       glVertex3fv(P003);
+       glNormal3fv(N055);
+       glVertex3fv(P055);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N003);
+       glVertex3fv(P003);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glNormal3fv(N100);
+       glVertex3fv(P100);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N003);
+       glVertex3fv(P003);
+       glNormal3fv(N100);
+       glVertex3fv(P100);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N054);
+       glVertex3fv(P054);
+       glNormal3fv(N100);
+       glVertex3fv(P100);
+       glNormal3fv(N062);
+       glVertex3fv(P062);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N100);
+       glVertex3fv(P100);
+       glNormal3fv(N063);
+       glVertex3fv(P063);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glEnd();
+       glBegin(cap);
+       glNormal3fv(N100);
+       glVertex3fv(P100);
+       glNormal3fv(N002);
+       glVertex3fv(P002);
+       glNormal3fv(N062);
+       glVertex3fv(P062);
+       glEnd();
 }
 
 static void
-Whale016(void)
+Whale016(GLenum cap)
 {
-    glBegin(GL_POLYGON);
-    glVertex3fv(P104);
-    glVertex3fv(P105);
-    glVertex3fv(P106);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P107);
-    glVertex3fv(P108);
-    glVertex3fv(P109);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P110);
-    glVertex3fv(P111);
-    glVertex3fv(P112);
-    glVertex3fv(P113);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P116);
-    glVertex3fv(P117);
-    glVertex3fv(P118);
-    glVertex3fv(P119);
-    glVertex3fv(P120);
-    glVertex3fv(P121);
-    glEnd();
+       glBegin(cap);
+       glVertex3fv(P104);
+       glVertex3fv(P105);
+       glVertex3fv(P106);
+       glEnd();
+       glBegin(cap);
+       glVertex3fv(P107);
+       glVertex3fv(P108);
+       glVertex3fv(P109);
+       glEnd();
+       glBegin(cap);
+       glVertex3fv(P110);
+       glVertex3fv(P111);
+       glVertex3fv(P112);
+       glVertex3fv(P113);
+       glVertex3fv(P114);
+       glVertex3fv(P115);
+       glEnd();
+       glBegin(cap);
+       glVertex3fv(P116);
+       glVertex3fv(P117);
+       glVertex3fv(P118);
+       glVertex3fv(P119);
+       glVertex3fv(P120);
+       glVertex3fv(P121);
+       glEnd();
 }
 
 void
-DrawWhale(fishRec * fish)
+DrawWhale(fishRec * fish, int wire)
 {
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
+       float       seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
+       float       pitch, thrash, chomp;
+       GLenum      cap;
 
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
+       fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
 
-    thrash = 70.0 * fish->v;
+       thrash = 70.0 * fish->v;
 
-    seg0 = 1.5 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD);
-    seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD);
-    seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD);
-    seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD);
-    seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD);
+       seg0 = 1.5 * thrash * sin((fish->htail) * RRAD);
+       seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD);
+       seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD);
+       seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD);
+       seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD);
+       seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD);
+       seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD);
+       seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD);
 
-    pitch = fish->v * sin((fish->htail - 160.0) * RRAD);
+       pitch = fish->v * sin((fish->htail - 160.0) * RRAD);
 
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
+       chomp = 0.0;
+       if (fish->v > 2.0) {
+               chomp = -(fish->v - 2.0) * 200.0;
+       }
+       P012[1] = iP012[1] + seg5;
+       P013[1] = iP013[1] + seg5;
+       P014[1] = iP014[1] + seg5;
+       P015[1] = iP015[1] + seg5;
+       P016[1] = iP016[1] + seg5;
+       P017[1] = iP017[1] + seg5;
+       P018[1] = iP018[1] + seg5;
+       P019[1] = iP019[1] + seg5;
 
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
+       P020[1] = iP020[1] + seg4;
+       P021[1] = iP021[1] + seg4;
+       P022[1] = iP022[1] + seg4;
+       P023[1] = iP023[1] + seg4;
+       P024[1] = iP024[1] + seg4;
+       P025[1] = iP025[1] + seg4;
+       P026[1] = iP026[1] + seg4;
+       P027[1] = iP027[1] + seg4;
 
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
+       P028[1] = iP028[1] + seg2;
+       P029[1] = iP029[1] + seg2;
+       P030[1] = iP030[1] + seg2;
+       P031[1] = iP031[1] + seg2;
+       P032[1] = iP032[1] + seg2;
+       P033[1] = iP033[1] + seg2;
+       P034[1] = iP034[1] + seg2;
+       P035[1] = iP035[1] + seg2;
 
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
+       P036[1] = iP036[1] + seg1;
+       P037[1] = iP037[1] + seg1;
+       P038[1] = iP038[1] + seg1;
+       P039[1] = iP039[1] + seg1;
+       P040[1] = iP040[1] + seg1;
+       P041[1] = iP041[1] + seg1;
+       P042[1] = iP042[1] + seg1;
+       P043[1] = iP043[1] + seg1;
 
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
+       P044[1] = iP044[1] + seg0;
+       P045[1] = iP045[1] + seg0;
+       P046[1] = iP046[1] + seg0;
+       P047[1] = iP047[1] + seg0;
+       P048[1] = iP048[1] + seg0;
+       P049[1] = iP049[1] + seg0;
+       P050[1] = iP050[1] + seg0;
+       P051[1] = iP051[1] + seg0;
 
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
+       P009[1] = iP009[1] + seg6;
+       P010[1] = iP010[1] + seg6;
+       P075[1] = iP075[1] + seg6;
+       P076[1] = iP076[1] + seg6;
 
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
+       P001[1] = iP001[1] + seg7;
+       P011[1] = iP011[1] + seg7;
+       P068[1] = iP068[1] + seg7;
+       P069[1] = iP069[1] + seg7;
+       P070[1] = iP070[1] + seg7;
+       P071[1] = iP071[1] + seg7;
+       P072[1] = iP072[1] + seg7;
+       P073[1] = iP073[1] + seg7;
+       P074[1] = iP074[1] + seg7;
 
-    P091[1] = iP091[1] + seg3 * 1.1;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3 * 0.9;
+       P091[1] = iP091[1] + seg3 * 1.1;
+       P092[1] = iP092[1] + seg3;
+       P093[1] = iP093[1] + seg3;
+       P094[1] = iP094[1] + seg3;
+       P095[1] = iP095[1] + seg3 * 0.9;
 
-    P099[1] = iP099[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P064[1] = iP064[1] + chomp;
-    P061[1] = iP061[1] + chomp;
-    P097[1] = iP097[1] + chomp;
-    P096[1] = iP096[1] + chomp;
+       P099[1] = iP099[1] + chomp;
+       P098[1] = iP098[1] + chomp;
+       P064[1] = iP064[1] + chomp;
+       P061[1] = iP061[1] + chomp;
+       P097[1] = iP097[1] + chomp;
+       P096[1] = iP096[1] + chomp;
 
-    glPushMatrix();
+       glPushMatrix();
 
-    glRotatef(pitch, 1.0, 0.0, 0.0);
+       glRotatef(pitch, 1.0, 0.0, 0.0);
 
-    glTranslatef(0.0, 0.0, 8000.0);
+       glTranslatef(0.0, 0.0, 8000.0);
 
-    glRotatef(180.0, 0.0, 1.0, 0.0);
+       glRotatef(180.0, 0.0, 1.0, 0.0);
 
-    glScalef(3.0, 3.0, 3.0);
+       glScalef(3.0, 3.0, 3.0);
 
-    glEnable(GL_CULL_FACE);
+       glEnable(GL_CULL_FACE);
 
-    Whale001();
-    Whale002();
-    Whale003();
-    Whale004();
-    Whale005();
-    Whale006();
-    Whale007();
-    Whale008();
-    Whale009();
-    Whale010();
-    Whale011();
-    Whale012();
-    Whale013();
-    Whale014();
-    Whale015();
-    Whale016();
+       cap = wire ? GL_LINE_LOOP : GL_POLYGON;
+       Whale001(cap);
+       Whale002(cap);
+       Whale003(cap);
+       Whale004(cap);
+       Whale005(cap);
+       Whale006(cap);
+       Whale007(cap);
+       Whale008(cap);
+       Whale009(cap);
+       Whale010(cap);
+       Whale011(cap);
+       Whale012(cap);
+       Whale013(cap);
+       Whale014(cap);
+       Whale015(cap);
+       Whale016(cap);
 
-    glDisable(GL_CULL_FACE);
+       glDisable(GL_CULL_FACE);
 
-    glPopMatrix();
+       glPopMatrix();
 }
 #endif