shark.c
上传用户:xk288cn
上传日期:2007-05-28
资源大小:4876k
文件大小:34k
源码类别:

GIS编程

开发平台:

Visual C++

  1. /**
  2.  * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
  3.  * ALL RIGHTS RESERVED
  4.  * Permission to use, copy, modify, and distribute this software for
  5.  * any purpose and without fee is hereby granted, provided that the above
  6.  * copyright notice appear in all copies and that both the copyright notice
  7.  * and this permission notice appear in supporting documentation, and that
  8.  * the name of Silicon Graphics, Inc. not be used in advertising
  9.  * or publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.
  11.  *
  12.  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  13.  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  14.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  15.  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
  16.  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  17.  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  18.  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  19.  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  20.  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
  21.  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  22.  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  23.  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  *
  25.  * US Government Users Restricted Rights
  26.  * Use, duplication, or disclosure by the Government is subject to
  27.  * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  28.  * (c)(1)(ii) of the Rights in Technical Data and Computer Software
  29.  * clause at DFARS 252.227-7013 and/or in similar or successor
  30.  * clauses in the FAR or the DOD or NASA FAR Supplement.
  31.  * Unpublished-- rights reserved under the copyright laws of the
  32.  * United States.  Contractor/manufacturer is Silicon Graphics,
  33.  * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
  34.  *
  35.  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  36.  */
  37. #include <GL/glut.h>
  38. #include <math.h>
  39. #include "atlantis.h"
  40. /* *INDENT-OFF* */
  41. static float N002[3] = {0.000077 ,-0.020611 ,0.999788};
  42. static float N003[3] = {0.961425 ,0.258729 ,-0.093390};
  43. static float N004[3] = {0.510811 ,-0.769633 ,-0.383063};
  44. static float N005[3] = {0.400123 ,0.855734 ,-0.328055};
  45. static float N006[3] = {-0.770715 ,0.610204 ,-0.183440};
  46. static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316};
  47. static float N008[3] = {-0.972788 ,0.208921 ,-0.100179};
  48. static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383};
  49. static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589};
  50. static float N011[3] = {0.591434 ,-0.768401 ,-0.244471};
  51. static float N012[3] = {0.935152 ,-0.328495 ,-0.132598};
  52. static float N013[3] = {0.997102 ,0.074243 ,-0.016593};
  53. static float N014[3] = {0.969995 ,0.241712 ,-0.026186};
  54. static float N015[3] = {0.844539 ,0.502628 ,-0.184714};
  55. static float N016[3] = {-0.906608 ,0.386308 ,-0.169787};
  56. static float N017[3] = {-0.970016 ,0.241698 ,-0.025516};
  57. static float N018[3] = {-0.998652 ,0.050493 ,-0.012045};
  58. static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556};
  59. static float N020[3] = {-0.660944 ,-0.750276 ,0.015480};
  60. static float N021[3] = {0.503549 ,-0.862908 ,-0.042749};
  61. static float N022[3] = {0.953202 ,-0.302092 ,-0.012089};
  62. static float N023[3] = {0.998738 ,0.023574 ,0.044344};
  63. static float N024[3] = {0.979297 ,0.193272 ,0.060202};
  64. static float N025[3] = {0.798300 ,0.464885 ,0.382883};
  65. static float N026[3] = {-0.756590 ,0.452403 ,0.472126};
  66. static float N027[3] = {-0.953855 ,0.293003 ,0.065651};
  67. static float N028[3] = {-0.998033 ,0.040292 ,0.048028};
  68. static float N029[3] = {-0.977079 ,-0.204288 ,0.059858};
  69. static float N030[3] = {-0.729117 ,-0.675304 ,0.111140};
  70. static float N031[3] = {0.598361 ,-0.792753 ,0.116221};
  71. static float N032[3] = {0.965192 ,-0.252991 ,0.066332};
  72. static float N033[3] = {0.998201 ,-0.002790 ,0.059892};
  73. static float N034[3] = {0.978657 ,0.193135 ,0.070207};
  74. static float N035[3] = {0.718815 ,0.680392 ,0.142733};
  75. static float N036[3] = {-0.383096 ,0.906212 ,0.178936};
  76. static float N037[3] = {-0.952831 ,0.292590 ,0.080647};
  77. static float N038[3] = {-0.997680 ,0.032417 ,0.059861};
  78. static float N039[3] = {-0.982629 ,-0.169881 ,0.074700};
  79. static float N040[3] = {-0.695424 ,-0.703466 ,0.146700};
  80. static float N041[3] = {0.359323 ,-0.915531 ,0.180805};
  81. static float N042[3] = {0.943356 ,-0.319387 ,0.089842};
  82. static float N043[3] = {0.998272 ,-0.032435 ,0.048993};
  83. static float N044[3] = {0.978997 ,0.193205 ,0.065084};
  84. static float N045[3] = {0.872144 ,0.470094 ,-0.135565};
  85. static float N046[3] = {-0.664282 ,0.737945 ,-0.119027};
  86. static float N047[3] = {-0.954508 ,0.288570 ,0.075107};
  87. static float N048[3] = {-0.998273 ,0.032406 ,0.048993};
  88. static float N049[3] = {-0.979908 ,-0.193579 ,0.048038};
  89. static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938};
  90. static float N051[3] = {0.643545 ,-0.763887 ,-0.048237};
  91. static float N052[3] = {0.955580 ,-0.288954 ,0.058068};
  92. static float N058[3] = {0.000050 ,0.793007 ,-0.609213};
  93. static float N059[3] = {0.913510 ,0.235418 ,-0.331779};
  94. static float N060[3] = {-0.807970 ,0.495000 ,-0.319625};
  95. static float N061[3] = {0.000000 ,0.784687 ,-0.619892};
  96. static float N062[3] = {0.000000 ,-1.000000 ,0.000000};
  97. static float N063[3] = {0.000000 ,1.000000 ,0.000000};
  98. static float N064[3] = {0.000000 ,1.000000 ,0.000000};
  99. static float N065[3] = {0.000000 ,1.000000 ,0.000000};
  100. static float N066[3] = {-0.055784 ,0.257059 ,0.964784};
  101. static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127};
  102. static float N070[3] = {0.000000 ,1.000000 ,0.000000};
  103. static float P002[3] = {0.00, -36.59, 5687.72};
  104. static float P003[3] = {90.00, 114.73, 724.38};
  105. static float P004[3] = {58.24, -146.84, 262.35};
  106. static float P005[3] = {27.81, 231.52, 510.43};
  107. static float P006[3] = {-27.81, 230.43, 509.76};
  108. static float P007[3] = {-46.09, -146.83, 265.84};
  109. static float P008[3] = {-90.00, 103.84, 718.53};
  110. static float P009[3] = {-131.10, -165.92, 834.85};
  111. static float P010[3] = {-27.81, -285.31, 500.00};
  112. static float P011[3] = {27.81, -285.32, 500.00};
  113. static float P012[3] = {147.96, -170.89, 845.50};
  114. static float P013[3] = {180.00, 0.00, 2000.00};
  115. static float P014[3] = {145.62, 352.67, 2000.00};
  116. static float P015[3] = {55.62, 570.63, 2000.00};
  117. static float P016[3] = {-55.62, 570.64, 2000.00};
  118. static float P017[3] = {-145.62, 352.68, 2000.00};
  119. static float P018[3] = {-180.00, 0.01, 2000.00};
  120. static float P019[3] = {-178.20, -352.66, 2001.61};
  121. static float P020[3] = {-55.63, -570.63, 2000.00};
  122. static float P021[3] = {55.62, -570.64, 2000.00};
  123. static float P022[3] = {179.91, -352.69, 1998.39};
  124. static float P023[3] = {150.00, 0.00, 3000.00};
  125. static float P024[3] = {121.35, 293.89, 3000.00};
  126. static float P025[3] = {46.35, 502.93, 2883.09};
  127. static float P026[3] = {-46.35, 497.45, 2877.24};
  128. static float P027[3] = {-121.35, 293.90, 3000.00};
  129. static float P028[3] = {-150.00, 0.00, 3000.00};
  130. static float P029[3] = {-152.21, -304.84, 2858.68};
  131. static float P030[3] = {-46.36, -475.52, 3000.00};
  132. static float P031[3] = {46.35, -475.53, 3000.00};
  133. static float P032[3] = {155.64, -304.87, 2863.50};
  134. static float P033[3] = {90.00, 0.00, 4000.00};
  135. static float P034[3] = {72.81, 176.33, 4000.00};
  136. static float P035[3] = {27.81, 285.32, 4000.00};
  137. static float P036[3] = {-27.81, 285.32, 4000.00};
  138. static float P037[3] = {-72.81, 176.34, 4000.00};
  139. static float P038[3] = {-90.00, 0.00, 4000.00};
  140. static float P039[3] = {-72.81, -176.33, 4000.00};
  141. static float P040[3] = {-27.81, -285.31, 4000.00};
  142. static float P041[3] = {27.81, -285.32, 4000.00};
  143. static float P042[3] = {72.81, -176.34, 4000.00};
  144. static float P043[3] = {30.00, 0.00, 5000.00};
  145. static float P044[3] = {24.27, 58.78, 5000.00};
  146. static float P045[3] = {9.27, 95.11, 5000.00};
  147. static float P046[3] = {-9.27, 95.11, 5000.00};
  148. static float P047[3] = {-24.27, 58.78, 5000.00};
  149. static float P048[3] = {-30.00, 0.00, 5000.00};
  150. static float P049[3] = {-24.27, -58.78, 5000.00};
  151. static float P050[3] = {-9.27, -95.10, 5000.00};
  152. static float P051[3] = {9.27, -95.11, 5000.00};
  153. static float P052[3] = {24.27, -58.78, 5000.00};
  154. static float P058[3] = {0.00, 1212.72, 2703.08};
  155. static float P059[3] = {50.36, 0.00, 108.14};
  156. static float P060[3] = {-22.18, 0.00, 108.14};
  157. static float P061[3] = {0.00, 1181.61, 6344.65};
  158. static float P062[3] = {516.45, -887.08, 2535.45};
  159. static float P063[3] = {-545.69, -879.31, 2555.63};
  160. static float P064[3] = {618.89, -1005.64, 2988.32};
  161. static float P065[3] = {-635.37, -1014.79, 2938.68};
  162. static float P066[3] = {0.00, 1374.43, 3064.18};
  163. static float P069[3] = {0.00, -418.25, 5765.04};
  164. static float P070[3] = {0.00, 1266.91, 6629.60};
  165. static float P071[3] = {-139.12, -124.96, 997.98};
  166. static float P072[3] = {-139.24, -110.18, 1020.68};
  167. static float P073[3] = {-137.33, -94.52, 1022.63};
  168. static float P074[3] = {-137.03, -79.91, 996.89};
  169. static float P075[3] = {-135.21, -91.48, 969.14};
  170. static float P076[3] = {-135.39, -110.87, 968.76};
  171. static float P077[3] = {150.23, -78.44, 995.53};
  172. static float P078[3] = {152.79, -92.76, 1018.46};
  173. static float P079[3] = {154.19, -110.20, 1020.55};
  174. static float P080[3] = {151.33, -124.15, 993.77};
  175. static float P081[3] = {150.49, -111.19, 969.86};
  176. static float P082[3] = {150.79, -92.41, 969.70};
  177. static float iP002[3] = {0.00, -36.59, 5687.72};
  178. static float iP004[3] = {58.24, -146.84, 262.35};
  179. static float iP007[3] = {-46.09, -146.83, 265.84};
  180. static float iP010[3] = {-27.81, -285.31, 500.00};
  181. static float iP011[3] = {27.81, -285.32, 500.00};
  182. static float iP023[3] = {150.00, 0.00, 3000.00};
  183. static float iP024[3] = {121.35, 293.89, 3000.00};
  184. static float iP025[3] = {46.35, 502.93, 2883.09};
  185. static float iP026[3] = {-46.35, 497.45, 2877.24};
  186. static float iP027[3] = {-121.35, 293.90, 3000.00};
  187. static float iP028[3] = {-150.00, 0.00, 3000.00};
  188. static float iP029[3] = {-121.35, -304.84, 2853.86};
  189. static float iP030[3] = {-46.36, -475.52, 3000.00};
  190. static float iP031[3] = {46.35, -475.53, 3000.00};
  191. static float iP032[3] = {121.35, -304.87, 2853.86};
  192. static float iP033[3] = {90.00, 0.00, 4000.00};
  193. static float iP034[3] = {72.81, 176.33, 4000.00};
  194. static float iP035[3] = {27.81, 285.32, 4000.00};
  195. static float iP036[3] = {-27.81, 285.32, 4000.00};
  196. static float iP037[3] = {-72.81, 176.34, 4000.00};
  197. static float iP038[3] = {-90.00, 0.00, 4000.00};
  198. static float iP039[3] = {-72.81, -176.33, 4000.00};
  199. static float iP040[3] = {-27.81, -285.31, 4000.00};
  200. static float iP041[3] = {27.81, -285.32, 4000.00};
  201. static float iP042[3] = {72.81, -176.34, 4000.00};
  202. static float iP043[3] = {30.00, 0.00, 5000.00};
  203. static float iP044[3] = {24.27, 58.78, 5000.00};
  204. static float iP045[3] = {9.27, 95.11, 5000.00};
  205. static float iP046[3] = {-9.27, 95.11, 5000.00};
  206. static float iP047[3] = {-24.27, 58.78, 5000.00};
  207. static float iP048[3] = {-30.00, 0.00, 5000.00};
  208. static float iP049[3] = {-24.27, -58.78, 5000.00};
  209. static float iP050[3] = {-9.27, -95.10, 5000.00};
  210. static float iP051[3] = {9.27, -95.11, 5000.00};
  211. static float iP052[3] = {24.27, -58.78, 5000.00};
  212. static float iP061[3] = {0.00, 1181.61, 6344.65};
  213. static float iP069[3] = {0.00, -418.25, 5765.04};
  214. static float iP070[3] = {0.00, 1266.91, 6629.60};
  215. /* *INDENT-ON* */
  216. void
  217. Fish001(void)
  218. {
  219.     glBegin(GL_POLYGON);
  220.     glNormal3fv(N005);
  221.     glVertex3fv(P005);
  222.     glNormal3fv(N059);
  223.     glVertex3fv(P059);
  224.     glNormal3fv(N060);
  225.     glVertex3fv(P060);
  226.     glNormal3fv(N006);
  227.     glVertex3fv(P006);
  228.     glEnd();
  229.     glBegin(GL_POLYGON);
  230.     glNormal3fv(N015);
  231.     glVertex3fv(P015);
  232.     glNormal3fv(N005);
  233.     glVertex3fv(P005);
  234.     glNormal3fv(N006);
  235.     glVertex3fv(P006);
  236.     glNormal3fv(N016);
  237.     glVertex3fv(P016);
  238.     glEnd();
  239.     glBegin(GL_POLYGON);
  240.     glNormal3fv(N006);
  241.     glVertex3fv(P006);
  242.     glNormal3fv(N060);
  243.     glVertex3fv(P060);
  244.     glNormal3fv(N008);
  245.     glVertex3fv(P008);
  246.     glEnd();
  247.     glBegin(GL_POLYGON);
  248.     glNormal3fv(N016);
  249.     glVertex3fv(P016);
  250.     glNormal3fv(N006);
  251.     glVertex3fv(P006);
  252.     glNormal3fv(N008);
  253.     glVertex3fv(P008);
  254.     glEnd();
  255.     glBegin(GL_POLYGON);
  256.     glNormal3fv(N016);
  257.     glVertex3fv(P016);
  258.     glNormal3fv(N008);
  259.     glVertex3fv(P008);
  260.     glNormal3fv(N017);
  261.     glVertex3fv(P017);
  262.     glEnd();
  263.     glBegin(GL_POLYGON);
  264.     glNormal3fv(N017);
  265.     glVertex3fv(P017);
  266.     glNormal3fv(N008);
  267.     glVertex3fv(P008);
  268.     glNormal3fv(N018);
  269.     glVertex3fv(P018);
  270.     glEnd();
  271.     glBegin(GL_POLYGON);
  272.     glNormal3fv(N008);
  273.     glVertex3fv(P008);
  274.     glNormal3fv(N009);
  275.     glVertex3fv(P009);
  276.     glNormal3fv(N018);
  277.     glVertex3fv(P018);
  278.     glEnd();
  279.     glBegin(GL_POLYGON);
  280.     glNormal3fv(N008);
  281.     glVertex3fv(P008);
  282.     glNormal3fv(N060);
  283.     glVertex3fv(P060);
  284.     glNormal3fv(N009);
  285.     glVertex3fv(P009);
  286.     glEnd();
  287.     glBegin(GL_POLYGON);
  288.     glNormal3fv(N007);
  289.     glVertex3fv(P007);
  290.     glNormal3fv(N010);
  291.     glVertex3fv(P010);
  292.     glNormal3fv(N009);
  293.     glVertex3fv(P009);
  294.     glEnd();
  295.     glBegin(GL_POLYGON);
  296.     glNormal3fv(N009);
  297.     glVertex3fv(P009);
  298.     glNormal3fv(N019);
  299.     glVertex3fv(P019);
  300.     glNormal3fv(N018);
  301.     glVertex3fv(P018);
  302.     glEnd();
  303.     glBegin(GL_POLYGON);
  304.     glNormal3fv(N009);
  305.     glVertex3fv(P009);
  306.     glNormal3fv(N010);
  307.     glVertex3fv(P010);
  308.     glNormal3fv(N019);
  309.     glVertex3fv(P019);
  310.     glEnd();
  311.     glBegin(GL_POLYGON);
  312.     glNormal3fv(N010);
  313.     glVertex3fv(P010);
  314.     glNormal3fv(N020);
  315.     glVertex3fv(P020);
  316.     glNormal3fv(N019);
  317.     glVertex3fv(P019);
  318.     glEnd();
  319.     glBegin(GL_POLYGON);
  320.     glNormal3fv(N010);
  321.     glVertex3fv(P010);
  322.     glNormal3fv(N011);
  323.     glVertex3fv(P011);
  324.     glNormal3fv(N021);
  325.     glVertex3fv(P021);
  326.     glNormal3fv(N020);
  327.     glVertex3fv(P020);
  328.     glEnd();
  329.     glBegin(GL_POLYGON);
  330.     glNormal3fv(N004);
  331.     glVertex3fv(P004);
  332.     glNormal3fv(N011);
  333.     glVertex3fv(P011);
  334.     glNormal3fv(N010);
  335.     glVertex3fv(P010);
  336.     glNormal3fv(N007);
  337.     glVertex3fv(P007);
  338.     glEnd();
  339.     glBegin(GL_POLYGON);
  340.     glNormal3fv(N004);
  341.     glVertex3fv(P004);
  342.     glNormal3fv(N012);
  343.     glVertex3fv(P012);
  344.     glNormal3fv(N011);
  345.     glVertex3fv(P011);
  346.     glEnd();
  347.     glBegin(GL_POLYGON);
  348.     glNormal3fv(N012);
  349.     glVertex3fv(P012);
  350.     glNormal3fv(N022);
  351.     glVertex3fv(P022);
  352.     glNormal3fv(N011);
  353.     glVertex3fv(P011);
  354.     glEnd();
  355.     glBegin(GL_POLYGON);
  356.     glNormal3fv(N011);
  357.     glVertex3fv(P011);
  358.     glNormal3fv(N022);
  359.     glVertex3fv(P022);
  360.     glNormal3fv(N021);
  361.     glVertex3fv(P021);
  362.     glEnd();
  363.     glBegin(GL_POLYGON);
  364.     glNormal3fv(N059);
  365.     glVertex3fv(P059);
  366.     glNormal3fv(N005);
  367.     glVertex3fv(P005);
  368.     glNormal3fv(N015);
  369.     glVertex3fv(P015);
  370.     glEnd();
  371.     glBegin(GL_POLYGON);
  372.     glNormal3fv(N015);
  373.     glVertex3fv(P015);
  374.     glNormal3fv(N014);
  375.     glVertex3fv(P014);
  376.     glNormal3fv(N003);
  377.     glVertex3fv(P003);
  378.     glEnd();
  379.     glBegin(GL_POLYGON);
  380.     glNormal3fv(N015);
  381.     glVertex3fv(P015);
  382.     glNormal3fv(N003);
  383.     glVertex3fv(P003);
  384.     glNormal3fv(N059);
  385.     glVertex3fv(P059);
  386.     glEnd();
  387.     glBegin(GL_POLYGON);
  388.     glNormal3fv(N014);
  389.     glVertex3fv(P014);
  390.     glNormal3fv(N013);
  391.     glVertex3fv(P013);
  392.     glNormal3fv(N003);
  393.     glVertex3fv(P003);
  394.     glEnd();
  395.     glBegin(GL_POLYGON);
  396.     glNormal3fv(N003);
  397.     glVertex3fv(P003);
  398.     glNormal3fv(N012);
  399.     glVertex3fv(P012);
  400.     glNormal3fv(N059);
  401.     glVertex3fv(P059);
  402.     glEnd();
  403.     glBegin(GL_POLYGON);
  404.     glNormal3fv(N013);
  405.     glVertex3fv(P013);
  406.     glNormal3fv(N012);
  407.     glVertex3fv(P012);
  408.     glNormal3fv(N003);
  409.     glVertex3fv(P003);
  410.     glEnd();
  411.     glBegin(GL_POLYGON);
  412.     glNormal3fv(N013);
  413.     glVertex3fv(P013);
  414.     glNormal3fv(N022);
  415.     glVertex3fv(P022);
  416.     glNormal3fv(N012);
  417.     glVertex3fv(P012);
  418.     glEnd();
  419.     glBegin(GL_POLYGON);
  420.     glVertex3fv(P071);
  421.     glVertex3fv(P072);
  422.     glVertex3fv(P073);
  423.     glVertex3fv(P074);
  424.     glVertex3fv(P075);
  425.     glVertex3fv(P076);
  426.     glEnd();
  427.     glBegin(GL_POLYGON);
  428.     glVertex3fv(P077);
  429.     glVertex3fv(P078);
  430.     glVertex3fv(P079);
  431.     glVertex3fv(P080);
  432.     glVertex3fv(P081);
  433.     glVertex3fv(P082);
  434.     glEnd();
  435. }
  436. void
  437. Fish002(void)
  438. {
  439.     glBegin(GL_POLYGON);
  440.     glNormal3fv(N013);
  441.     glVertex3fv(P013);
  442.     glNormal3fv(N014);
  443.     glVertex3fv(P014);
  444.     glNormal3fv(N024);
  445.     glVertex3fv(P024);
  446.     glNormal3fv(N023);
  447.     glVertex3fv(P023);
  448.     glEnd();
  449.     glBegin(GL_POLYGON);
  450.     glNormal3fv(N014);
  451.     glVertex3fv(P014);
  452.     glNormal3fv(N015);
  453.     glVertex3fv(P015);
  454.     glNormal3fv(N025);
  455.     glVertex3fv(P025);
  456.     glNormal3fv(N024);
  457.     glVertex3fv(P024);
  458.     glEnd();
  459.     glBegin(GL_POLYGON);
  460.     glNormal3fv(N016);
  461.     glVertex3fv(P016);
  462.     glNormal3fv(N017);
  463.     glVertex3fv(P017);
  464.     glNormal3fv(N027);
  465.     glVertex3fv(P027);
  466.     glNormal3fv(N026);
  467.     glVertex3fv(P026);
  468.     glEnd();
  469.     glBegin(GL_POLYGON);
  470.     glNormal3fv(N017);
  471.     glVertex3fv(P017);
  472.     glNormal3fv(N018);
  473.     glVertex3fv(P018);
  474.     glNormal3fv(N028);
  475.     glVertex3fv(P028);
  476.     glNormal3fv(N027);
  477.     glVertex3fv(P027);
  478.     glEnd();
  479.     glBegin(GL_POLYGON);
  480.     glNormal3fv(N020);
  481.     glVertex3fv(P020);
  482.     glNormal3fv(N021);
  483.     glVertex3fv(P021);
  484.     glNormal3fv(N031);
  485.     glVertex3fv(P031);
  486.     glNormal3fv(N030);
  487.     glVertex3fv(P030);
  488.     glEnd();
  489.     glBegin(GL_POLYGON);
  490.     glNormal3fv(N013);
  491.     glVertex3fv(P013);
  492.     glNormal3fv(N023);
  493.     glVertex3fv(P023);
  494.     glNormal3fv(N022);
  495.     glVertex3fv(P022);
  496.     glEnd();
  497.     glBegin(GL_POLYGON);
  498.     glNormal3fv(N022);
  499.     glVertex3fv(P022);
  500.     glNormal3fv(N023);
  501.     glVertex3fv(P023);
  502.     glNormal3fv(N032);
  503.     glVertex3fv(P032);
  504.     glEnd();
  505.     glBegin(GL_POLYGON);
  506.     glNormal3fv(N022);
  507.     glVertex3fv(P022);
  508.     glNormal3fv(N032);
  509.     glVertex3fv(P032);
  510.     glNormal3fv(N031);
  511.     glVertex3fv(P031);
  512.     glEnd();
  513.     glBegin(GL_POLYGON);
  514.     glNormal3fv(N022);
  515.     glVertex3fv(P022);
  516.     glNormal3fv(N031);
  517.     glVertex3fv(P031);
  518.     glNormal3fv(N021);
  519.     glVertex3fv(P021);
  520.     glEnd();
  521.     glBegin(GL_POLYGON);
  522.     glNormal3fv(N018);
  523.     glVertex3fv(P018);
  524.     glNormal3fv(N019);
  525.     glVertex3fv(P019);
  526.     glNormal3fv(N029);
  527.     glVertex3fv(P029);
  528.     glEnd();
  529.     glBegin(GL_POLYGON);
  530.     glNormal3fv(N018);
  531.     glVertex3fv(P018);
  532.     glNormal3fv(N029);
  533.     glVertex3fv(P029);
  534.     glNormal3fv(N028);
  535.     glVertex3fv(P028);
  536.     glEnd();
  537.     glBegin(GL_POLYGON);
  538.     glNormal3fv(N019);
  539.     glVertex3fv(P019);
  540.     glNormal3fv(N020);
  541.     glVertex3fv(P020);
  542.     glNormal3fv(N030);
  543.     glVertex3fv(P030);
  544.     glEnd();
  545.     glBegin(GL_POLYGON);
  546.     glNormal3fv(N019);
  547.     glVertex3fv(P019);
  548.     glNormal3fv(N030);
  549.     glVertex3fv(P030);
  550.     glNormal3fv(N029);
  551.     glVertex3fv(P029);
  552.     glEnd();
  553. }
  554. void
  555. Fish003(void)
  556. {
  557.     glBegin(GL_POLYGON);
  558.     glNormal3fv(N032);
  559.     glVertex3fv(P032);
  560.     glNormal3fv(N023);
  561.     glVertex3fv(P023);
  562.     glNormal3fv(N033);
  563.     glVertex3fv(P033);
  564.     glNormal3fv(N042);
  565.     glVertex3fv(P042);
  566.     glEnd();
  567.     glBegin(GL_POLYGON);
  568.     glNormal3fv(N031);
  569.     glVertex3fv(P031);
  570.     glNormal3fv(N032);
  571.     glVertex3fv(P032);
  572.     glNormal3fv(N042);
  573.     glVertex3fv(P042);
  574.     glNormal3fv(N041);
  575.     glVertex3fv(P041);
  576.     glEnd();
  577.     glBegin(GL_POLYGON);
  578.     glNormal3fv(N023);
  579.     glVertex3fv(P023);
  580.     glNormal3fv(N024);
  581.     glVertex3fv(P024);
  582.     glNormal3fv(N034);
  583.     glVertex3fv(P034);
  584.     glNormal3fv(N033);
  585.     glVertex3fv(P033);
  586.     glEnd();
  587.     glBegin(GL_POLYGON);
  588.     glNormal3fv(N024);
  589.     glVertex3fv(P024);
  590.     glNormal3fv(N025);
  591.     glVertex3fv(P025);
  592.     glNormal3fv(N035);
  593.     glVertex3fv(P035);
  594.     glNormal3fv(N034);
  595.     glVertex3fv(P034);
  596.     glEnd();
  597.     glBegin(GL_POLYGON);
  598.     glNormal3fv(N030);
  599.     glVertex3fv(P030);
  600.     glNormal3fv(N031);
  601.     glVertex3fv(P031);
  602.     glNormal3fv(N041);
  603.     glVertex3fv(P041);
  604.     glNormal3fv(N040);
  605.     glVertex3fv(P040);
  606.     glEnd();
  607.     glBegin(GL_POLYGON);
  608.     glNormal3fv(N025);
  609.     glVertex3fv(P025);
  610.     glNormal3fv(N026);
  611.     glVertex3fv(P026);
  612.     glNormal3fv(N036);
  613.     glVertex3fv(P036);
  614.     glNormal3fv(N035);
  615.     glVertex3fv(P035);
  616.     glEnd();
  617.     glBegin(GL_POLYGON);
  618.     glNormal3fv(N026);
  619.     glVertex3fv(P026);
  620.     glNormal3fv(N027);
  621.     glVertex3fv(P027);
  622.     glNormal3fv(N037);
  623.     glVertex3fv(P037);
  624.     glNormal3fv(N036);
  625.     glVertex3fv(P036);
  626.     glEnd();
  627.     glBegin(GL_POLYGON);
  628.     glNormal3fv(N027);
  629.     glVertex3fv(P027);
  630.     glNormal3fv(N028);
  631.     glVertex3fv(P028);
  632.     glNormal3fv(N038);
  633.     glVertex3fv(P038);
  634.     glNormal3fv(N037);
  635.     glVertex3fv(P037);
  636.     glEnd();
  637.     glBegin(GL_POLYGON);
  638.     glNormal3fv(N028);
  639.     glVertex3fv(P028);
  640.     glNormal3fv(N029);
  641.     glVertex3fv(P029);
  642.     glNormal3fv(N039);
  643.     glVertex3fv(P039);
  644.     glNormal3fv(N038);
  645.     glVertex3fv(P038);
  646.     glEnd();
  647.     glBegin(GL_POLYGON);
  648.     glNormal3fv(N029);
  649.     glVertex3fv(P029);
  650.     glNormal3fv(N030);
  651.     glVertex3fv(P030);
  652.     glNormal3fv(N040);
  653.     glVertex3fv(P040);
  654.     glNormal3fv(N039);
  655.     glVertex3fv(P039);
  656.     glEnd();
  657. }
  658. void
  659. Fish004(void)
  660. {
  661.     glBegin(GL_POLYGON);
  662.     glNormal3fv(N040);
  663.     glVertex3fv(P040);
  664.     glNormal3fv(N041);
  665.     glVertex3fv(P041);
  666.     glNormal3fv(N051);
  667.     glVertex3fv(P051);
  668.     glNormal3fv(N050);
  669.     glVertex3fv(P050);
  670.     glEnd();
  671.     glBegin(GL_POLYGON);
  672.     glNormal3fv(N041);
  673.     glVertex3fv(P041);
  674.     glNormal3fv(N042);
  675.     glVertex3fv(P042);
  676.     glNormal3fv(N052);
  677.     glVertex3fv(P052);
  678.     glNormal3fv(N051);
  679.     glVertex3fv(P051);
  680.     glEnd();
  681.     glBegin(GL_POLYGON);
  682.     glNormal3fv(N042);
  683.     glVertex3fv(P042);
  684.     glNormal3fv(N033);
  685.     glVertex3fv(P033);
  686.     glNormal3fv(N043);
  687.     glVertex3fv(P043);
  688.     glNormal3fv(N052);
  689.     glVertex3fv(P052);
  690.     glEnd();
  691.     glBegin(GL_POLYGON);
  692.     glNormal3fv(N033);
  693.     glVertex3fv(P033);
  694.     glNormal3fv(N034);
  695.     glVertex3fv(P034);
  696.     glNormal3fv(N044);
  697.     glVertex3fv(P044);
  698.     glNormal3fv(N043);
  699.     glVertex3fv(P043);
  700.     glEnd();
  701.     glBegin(GL_POLYGON);
  702.     glNormal3fv(N034);
  703.     glVertex3fv(P034);
  704.     glNormal3fv(N035);
  705.     glVertex3fv(P035);
  706.     glNormal3fv(N045);
  707.     glVertex3fv(P045);
  708.     glNormal3fv(N044);
  709.     glVertex3fv(P044);
  710.     glEnd();
  711.     glBegin(GL_POLYGON);
  712.     glNormal3fv(N035);
  713.     glVertex3fv(P035);
  714.     glNormal3fv(N036);
  715.     glVertex3fv(P036);
  716.     glNormal3fv(N046);
  717.     glVertex3fv(P046);
  718.     glNormal3fv(N045);
  719.     glVertex3fv(P045);
  720.     glEnd();
  721.     glBegin(GL_POLYGON);
  722.     glNormal3fv(N036);
  723.     glVertex3fv(P036);
  724.     glNormal3fv(N037);
  725.     glVertex3fv(P037);
  726.     glNormal3fv(N047);
  727.     glVertex3fv(P047);
  728.     glNormal3fv(N046);
  729.     glVertex3fv(P046);
  730.     glEnd();
  731.     glBegin(GL_POLYGON);
  732.     glNormal3fv(N037);
  733.     glVertex3fv(P037);
  734.     glNormal3fv(N038);
  735.     glVertex3fv(P038);
  736.     glNormal3fv(N048);
  737.     glVertex3fv(P048);
  738.     glNormal3fv(N047);
  739.     glVertex3fv(P047);
  740.     glEnd();
  741.     glBegin(GL_POLYGON);
  742.     glNormal3fv(N038);
  743.     glVertex3fv(P038);
  744.     glNormal3fv(N039);
  745.     glVertex3fv(P039);
  746.     glNormal3fv(N049);
  747.     glVertex3fv(P049);
  748.     glNormal3fv(N048);
  749.     glVertex3fv(P048);
  750.     glEnd();
  751.     glBegin(GL_POLYGON);
  752.     glNormal3fv(N039);
  753.     glVertex3fv(P039);
  754.     glNormal3fv(N040);
  755.     glVertex3fv(P040);
  756.     glNormal3fv(N050);
  757.     glVertex3fv(P050);
  758.     glNormal3fv(N049);
  759.     glVertex3fv(P049);
  760.     glEnd();
  761.     glBegin(GL_POLYGON);
  762.     glNormal3fv(N070);
  763.     glVertex3fv(P070);
  764.     glNormal3fv(N061);
  765.     glVertex3fv(P061);
  766.     glNormal3fv(N002);
  767.     glVertex3fv(P002);
  768.     glEnd();
  769.     glBegin(GL_POLYGON);
  770.     glNormal3fv(N061);
  771.     glVertex3fv(P061);
  772.     glNormal3fv(N046);
  773.     glVertex3fv(P046);
  774.     glNormal3fv(N002);
  775.     glVertex3fv(P002);
  776.     glEnd();
  777.     glBegin(GL_POLYGON);
  778.     glNormal3fv(N045);
  779.     glVertex3fv(P045);
  780.     glNormal3fv(N046);
  781.     glVertex3fv(P046);
  782.     glNormal3fv(N061);
  783.     glVertex3fv(P061);
  784.     glEnd();
  785.     glBegin(GL_POLYGON);
  786.     glNormal3fv(N002);
  787.     glVertex3fv(P002);
  788.     glNormal3fv(N061);
  789.     glVertex3fv(P061);
  790.     glNormal3fv(N070);
  791.     glVertex3fv(P070);
  792.     glEnd();
  793.     glBegin(GL_POLYGON);
  794.     glNormal3fv(N002);
  795.     glVertex3fv(P002);
  796.     glNormal3fv(N045);
  797.     glVertex3fv(P045);
  798.     glNormal3fv(N061);
  799.     glVertex3fv(P061);
  800.     glEnd();
  801. }
  802. void
  803. Fish005(void)
  804. {
  805.     glBegin(GL_POLYGON);
  806.     glNormal3fv(N002);
  807.     glVertex3fv(P002);
  808.     glNormal3fv(N044);
  809.     glVertex3fv(P044);
  810.     glNormal3fv(N045);
  811.     glVertex3fv(P045);
  812.     glEnd();
  813.     glBegin(GL_POLYGON);
  814.     glNormal3fv(N002);
  815.     glVertex3fv(P002);
  816.     glNormal3fv(N043);
  817.     glVertex3fv(P043);
  818.     glNormal3fv(N044);
  819.     glVertex3fv(P044);
  820.     glEnd();
  821.     glBegin(GL_POLYGON);
  822.     glNormal3fv(N002);
  823.     glVertex3fv(P002);
  824.     glNormal3fv(N052);
  825.     glVertex3fv(P052);
  826.     glNormal3fv(N043);
  827.     glVertex3fv(P043);
  828.     glEnd();
  829.     glBegin(GL_POLYGON);
  830.     glNormal3fv(N002);
  831.     glVertex3fv(P002);
  832.     glNormal3fv(N051);
  833.     glVertex3fv(P051);
  834.     glNormal3fv(N052);
  835.     glVertex3fv(P052);
  836.     glEnd();
  837.     glBegin(GL_POLYGON);
  838.     glNormal3fv(N002);
  839.     glVertex3fv(P002);
  840.     glNormal3fv(N046);
  841.     glVertex3fv(P046);
  842.     glNormal3fv(N047);
  843.     glVertex3fv(P047);
  844.     glEnd();
  845.     glBegin(GL_POLYGON);
  846.     glNormal3fv(N002);
  847.     glVertex3fv(P002);
  848.     glNormal3fv(N047);
  849.     glVertex3fv(P047);
  850.     glNormal3fv(N048);
  851.     glVertex3fv(P048);
  852.     glEnd();
  853.     glBegin(GL_POLYGON);
  854.     glNormal3fv(N002);
  855.     glVertex3fv(P002);
  856.     glNormal3fv(N048);
  857.     glVertex3fv(P048);
  858.     glNormal3fv(N049);
  859.     glVertex3fv(P049);
  860.     glEnd();
  861.     glBegin(GL_POLYGON);
  862.     glNormal3fv(N002);
  863.     glVertex3fv(P002);
  864.     glNormal3fv(N049);
  865.     glVertex3fv(P049);
  866.     glNormal3fv(N050);
  867.     glVertex3fv(P050);
  868.     glEnd();
  869.     glBegin(GL_POLYGON);
  870.     glNormal3fv(N050);
  871.     glVertex3fv(P050);
  872.     glNormal3fv(N051);
  873.     glVertex3fv(P051);
  874.     glNormal3fv(N069);
  875.     glVertex3fv(P069);
  876.     glEnd();
  877.     glBegin(GL_POLYGON);
  878.     glNormal3fv(N051);
  879.     glVertex3fv(P051);
  880.     glNormal3fv(N002);
  881.     glVertex3fv(P002);
  882.     glNormal3fv(N069);
  883.     glVertex3fv(P069);
  884.     glEnd();
  885.     glBegin(GL_POLYGON);
  886.     glNormal3fv(N050);
  887.     glVertex3fv(P050);
  888.     glNormal3fv(N069);
  889.     glVertex3fv(P069);
  890.     glNormal3fv(N002);
  891.     glVertex3fv(P002);
  892.     glEnd();
  893. }
  894. void
  895. Fish006(void)
  896. {
  897.     glBegin(GL_POLYGON);
  898.     glNormal3fv(N066);
  899.     glVertex3fv(P066);
  900.     glNormal3fv(N016);
  901.     glVertex3fv(P016);
  902.     glNormal3fv(N026);
  903.     glVertex3fv(P026);
  904.     glEnd();
  905.     glBegin(GL_POLYGON);
  906.     glNormal3fv(N015);
  907.     glVertex3fv(P015);
  908.     glNormal3fv(N066);
  909.     glVertex3fv(P066);
  910.     glNormal3fv(N025);
  911.     glVertex3fv(P025);
  912.     glEnd();
  913.     glBegin(GL_POLYGON);
  914.     glNormal3fv(N025);
  915.     glVertex3fv(P025);
  916.     glNormal3fv(N066);
  917.     glVertex3fv(P066);
  918.     glNormal3fv(N026);
  919.     glVertex3fv(P026);
  920.     glEnd();
  921.     glBegin(GL_POLYGON);
  922.     glNormal3fv(N066);
  923.     glVertex3fv(P066);
  924.     glNormal3fv(N058);
  925.     glVertex3fv(P058);
  926.     glNormal3fv(N016);
  927.     glVertex3fv(P016);
  928.     glEnd();
  929.     glBegin(GL_POLYGON);
  930.     glNormal3fv(N015);
  931.     glVertex3fv(P015);
  932.     glNormal3fv(N058);
  933.     glVertex3fv(P058);
  934.     glNormal3fv(N066);
  935.     glVertex3fv(P066);
  936.     glEnd();
  937.     glBegin(GL_POLYGON);
  938.     glNormal3fv(N058);
  939.     glVertex3fv(P058);
  940.     glNormal3fv(N015);
  941.     glVertex3fv(P015);
  942.     glNormal3fv(N016);
  943.     glVertex3fv(P016);
  944.     glEnd();
  945. }
  946. void
  947. Fish007(void)
  948. {
  949.     glBegin(GL_POLYGON);
  950.     glNormal3fv(N062);
  951.     glVertex3fv(P062);
  952.     glNormal3fv(N022);
  953.     glVertex3fv(P022);
  954.     glNormal3fv(N032);
  955.     glVertex3fv(P032);
  956.     glEnd();
  957.     glBegin(GL_POLYGON);
  958.     glNormal3fv(N062);
  959.     glVertex3fv(P062);
  960.     glNormal3fv(N032);
  961.     glVertex3fv(P032);
  962.     glNormal3fv(N064);
  963.     glVertex3fv(P064);
  964.     glEnd();
  965.     glBegin(GL_POLYGON);
  966.     glNormal3fv(N022);
  967.     glVertex3fv(P022);
  968.     glNormal3fv(N062);
  969.     glVertex3fv(P062);
  970.     glNormal3fv(N032);
  971.     glVertex3fv(P032);
  972.     glEnd();
  973.     glBegin(GL_POLYGON);
  974.     glNormal3fv(N062);
  975.     glVertex3fv(P062);
  976.     glNormal3fv(N064);
  977.     glVertex3fv(P064);
  978.     glNormal3fv(N032);
  979.     glVertex3fv(P032);
  980.     glEnd();
  981. }
  982. void
  983. Fish008(void)
  984. {
  985.     glBegin(GL_POLYGON);
  986.     glNormal3fv(N063);
  987.     glVertex3fv(P063);
  988.     glNormal3fv(N019);
  989.     glVertex3fv(P019);
  990.     glNormal3fv(N029);
  991.     glVertex3fv(P029);
  992.     glEnd();
  993.     glBegin(GL_POLYGON);
  994.     glNormal3fv(N019);
  995.     glVertex3fv(P019);
  996.     glNormal3fv(N063);
  997.     glVertex3fv(P063);
  998.     glNormal3fv(N029);
  999.     glVertex3fv(P029);
  1000.     glEnd();
  1001.     glBegin(GL_POLYGON);
  1002.     glNormal3fv(N063);
  1003.     glVertex3fv(P063);
  1004.     glNormal3fv(N029);
  1005.     glVertex3fv(P029);
  1006.     glNormal3fv(N065);
  1007.     glVertex3fv(P065);
  1008.     glEnd();
  1009.     glBegin(GL_POLYGON);
  1010.     glNormal3fv(N063);
  1011.     glVertex3fv(P063);
  1012.     glNormal3fv(N065);
  1013.     glVertex3fv(P065);
  1014.     glNormal3fv(N029);
  1015.     glVertex3fv(P029);
  1016.     glEnd();
  1017. }
  1018. void
  1019. Fish009(void)
  1020. {
  1021.     glBegin(GL_POLYGON);
  1022.     glVertex3fv(P059);
  1023.     glVertex3fv(P012);
  1024.     glVertex3fv(P009);
  1025.     glVertex3fv(P060);
  1026.     glEnd();
  1027.     glBegin(GL_POLYGON);
  1028.     glVertex3fv(P012);
  1029.     glVertex3fv(P004);
  1030.     glVertex3fv(P007);
  1031.     glVertex3fv(P009);
  1032.     glEnd();
  1033. }
  1034. void
  1035. Fish_1(void)
  1036. {
  1037.     Fish004();
  1038.     Fish005();
  1039.     Fish003();
  1040.     Fish007();
  1041.     Fish006();
  1042.     Fish002();
  1043.     Fish008();
  1044.     Fish009();
  1045.     Fish001();
  1046. }
  1047. void
  1048. Fish_2(void)
  1049. {
  1050.     Fish005();
  1051.     Fish004();
  1052.     Fish003();
  1053.     Fish008();
  1054.     Fish006();
  1055.     Fish002();
  1056.     Fish007();
  1057.     Fish009();
  1058.     Fish001();
  1059. }
  1060. void
  1061. Fish_3(void)
  1062. {
  1063.     Fish005();
  1064.     Fish004();
  1065.     Fish007();
  1066.     Fish003();
  1067.     Fish002();
  1068.     Fish008();
  1069.     Fish009();
  1070.     Fish001();
  1071.     Fish006();
  1072. }
  1073. void
  1074. Fish_4(void)
  1075. {
  1076.     Fish005();
  1077.     Fish004();
  1078.     Fish008();
  1079.     Fish003();
  1080.     Fish002();
  1081.     Fish007();
  1082.     Fish009();
  1083.     Fish001();
  1084.     Fish006();
  1085. }
  1086. void
  1087. Fish_5(void)
  1088. {
  1089.     Fish009();
  1090.     Fish006();
  1091.     Fish007();
  1092.     Fish001();
  1093.     Fish002();
  1094.     Fish003();
  1095.     Fish008();
  1096.     Fish004();
  1097.     Fish005();
  1098. }
  1099. void
  1100. Fish_6(void)
  1101. {
  1102.     Fish009();
  1103.     Fish006();
  1104.     Fish008();
  1105.     Fish001();
  1106.     Fish002();
  1107.     Fish007();
  1108.     Fish003();
  1109.     Fish004();
  1110.     Fish005();
  1111. }
  1112. void
  1113. Fish_7(void)
  1114. {
  1115.     Fish009();
  1116.     Fish001();
  1117.     Fish007();
  1118.     Fish005();
  1119.     Fish002();
  1120.     Fish008();
  1121.     Fish003();
  1122.     Fish004();
  1123.     Fish006();
  1124. }
  1125. void
  1126. Fish_8(void)
  1127. {
  1128.     Fish009();
  1129.     Fish008();
  1130.     Fish001();
  1131.     Fish002();
  1132.     Fish007();
  1133.     Fish003();
  1134.     Fish005();
  1135.     Fish004();
  1136.     Fish006();
  1137. }
  1138. void
  1139. DrawShark(fishRec * fish)
  1140. {
  1141.     float mat[4][4];
  1142.     int n;
  1143.     float seg1, seg2, seg3, seg4, segup;
  1144.     float thrash, chomp;
  1145.     fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
  1146.     thrash = 50.0 * fish->v;
  1147.     seg1 = 0.6 * thrash * sin(fish->htail * RRAD);
  1148.     seg2 = 1.8 * thrash * sin((fish->htail + 45.0) * RRAD);
  1149.     seg3 = 3.0 * thrash * sin((fish->htail + 90.0) * RRAD);
  1150.     seg4 = 4.0 * thrash * sin((fish->htail + 110.0) * RRAD);
  1151.     chomp = 0.0;
  1152.     if (fish->v > 2.0) {
  1153.         chomp = -(fish->v - 2.0) * 200.0;
  1154.     }
  1155.     P004[1] = iP004[1] + chomp;
  1156.     P007[1] = iP007[1] + chomp;
  1157.     P010[1] = iP010[1] + chomp;
  1158.     P011[1] = iP011[1] + chomp;
  1159.     P023[0] = iP023[0] + seg1;
  1160.     P024[0] = iP024[0] + seg1;
  1161.     P025[0] = iP025[0] + seg1;
  1162.     P026[0] = iP026[0] + seg1;
  1163.     P027[0] = iP027[0] + seg1;
  1164.     P028[0] = iP028[0] + seg1;
  1165.     P029[0] = iP029[0] + seg1;
  1166.     P030[0] = iP030[0] + seg1;
  1167.     P031[0] = iP031[0] + seg1;
  1168.     P032[0] = iP032[0] + seg1;
  1169.     P033[0] = iP033[0] + seg2;
  1170.     P034[0] = iP034[0] + seg2;
  1171.     P035[0] = iP035[0] + seg2;
  1172.     P036[0] = iP036[0] + seg2;
  1173.     P037[0] = iP037[0] + seg2;
  1174.     P038[0] = iP038[0] + seg2;
  1175.     P039[0] = iP039[0] + seg2;
  1176.     P040[0] = iP040[0] + seg2;
  1177.     P041[0] = iP041[0] + seg2;
  1178.     P042[0] = iP042[0] + seg2;
  1179.     P043[0] = iP043[0] + seg3;
  1180.     P044[0] = iP044[0] + seg3;
  1181.     P045[0] = iP045[0] + seg3;
  1182.     P046[0] = iP046[0] + seg3;
  1183.     P047[0] = iP047[0] + seg3;
  1184.     P048[0] = iP048[0] + seg3;
  1185.     P049[0] = iP049[0] + seg3;
  1186.     P050[0] = iP050[0] + seg3;
  1187.     P051[0] = iP051[0] + seg3;
  1188.     P052[0] = iP052[0] + seg3;
  1189.     P002[0] = iP002[0] + seg4;
  1190.     P061[0] = iP061[0] + seg4;
  1191.     P069[0] = iP069[0] + seg4;
  1192.     P070[0] = iP070[0] + seg4;
  1193.     fish->vtail += ((fish->dtheta - fish->vtail) * 0.1);
  1194.     if (fish->vtail > 0.5) {
  1195.         fish->vtail = 0.5;
  1196.     } else if (fish->vtail < -0.5) {
  1197.         fish->vtail = -0.5;
  1198.     }
  1199.     segup = thrash * fish->vtail;
  1200.     P023[1] = iP023[1] + segup;
  1201.     P024[1] = iP024[1] + segup;
  1202.     P025[1] = iP025[1] + segup;
  1203.     P026[1] = iP026[1] + segup;
  1204.     P027[1] = iP027[1] + segup;
  1205.     P028[1] = iP028[1] + segup;
  1206.     P029[1] = iP029[1] + segup;
  1207.     P030[1] = iP030[1] + segup;
  1208.     P031[1] = iP031[1] + segup;
  1209.     P032[1] = iP032[1] + segup;
  1210.     P033[1] = iP033[1] + segup * 5.0;
  1211.     P034[1] = iP034[1] + segup * 5.0;
  1212.     P035[1] = iP035[1] + segup * 5.0;
  1213.     P036[1] = iP036[1] + segup * 5.0;
  1214.     P037[1] = iP037[1] + segup * 5.0;
  1215.     P038[1] = iP038[1] + segup * 5.0;
  1216.     P039[1] = iP039[1] + segup * 5.0;
  1217.     P040[1] = iP040[1] + segup * 5.0;
  1218.     P041[1] = iP041[1] + segup * 5.0;
  1219.     P042[1] = iP042[1] + segup * 5.0;
  1220.     P043[1] = iP043[1] + segup * 12.0;
  1221.     P044[1] = iP044[1] + segup * 12.0;
  1222.     P045[1] = iP045[1] + segup * 12.0;
  1223.     P046[1] = iP046[1] + segup * 12.0;
  1224.     P047[1] = iP047[1] + segup * 12.0;
  1225.     P048[1] = iP048[1] + segup * 12.0;
  1226.     P049[1] = iP049[1] + segup * 12.0;
  1227.     P050[1] = iP050[1] + segup * 12.0;
  1228.     P051[1] = iP051[1] + segup * 12.0;
  1229.     P052[1] = iP052[1] + segup * 12.0;
  1230.     P002[1] = iP002[1] + segup * 17.0;
  1231.     P061[1] = iP061[1] + segup * 17.0;
  1232.     P069[1] = iP069[1] + segup * 17.0;
  1233.     P070[1] = iP070[1] + segup * 17.0;
  1234.     glPushMatrix();
  1235.     glTranslatef(0.0, 0.0, -3000.0);
  1236.     glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]);
  1237.     n = 0;
  1238.     if (mat[0][2] >= 0.0) {
  1239.         n += 1;
  1240.     }
  1241.     if (mat[1][2] >= 0.0) {
  1242.         n += 2;
  1243.     }
  1244.     if (mat[2][2] >= 0.0) {
  1245.         n += 4;
  1246.     }
  1247.     glScalef(2.0, 1.0, 1.0);
  1248.     glEnable(GL_CULL_FACE);
  1249.     switch (n) {
  1250.     case 0:
  1251.         Fish_1();
  1252.         break;
  1253.     case 1:
  1254.         Fish_2();
  1255.         break;
  1256.     case 2:
  1257.         Fish_3();
  1258.         break;
  1259.     case 3:
  1260.         Fish_4();
  1261.         break;
  1262.     case 4:
  1263.         Fish_5();
  1264.         break;
  1265.     case 5:
  1266.         Fish_6();
  1267.         break;
  1268.     case 6:
  1269.         Fish_7();
  1270.         break;
  1271.     case 7:
  1272.         Fish_8();
  1273.         break;
  1274.     }
  1275.     glDisable(GL_CULL_FACE);
  1276.     glPopMatrix();
  1277. }