/* atlantis --- Shows moving 3D sea animals */
#if !defined( lint ) && !defined( SABER )
static const char sccsid[] = "@(#)whale.c 1.4 2000/01/28 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
* both that copyright notice and this permission notice appear in
* supporting documentation.
*
* This file is provided AS IS with no warranties of any kind. The author
* shall have no liability with respect to the infringement of copyrights,
* trade secrets or any patents by this file or any part thereof. In no
* event will the author be liable for any lost revenue or profits or
* other special, indirect and consequential damages.
*
* The original code for this mode was written by Mark J. Kilgard
* as a demo for openGL programming.
*
* Porting it to xlock was possible by comparing the original Mesa's morph3d
* demo with it's ported version to xlock, so thanks for Marcelo F. Vianna
* (look at morph3d.c) for his indirect help.
*
* Thanks goes also to Brian Paul for making it possible and inexpensive
* to use OpenGL at home.
*
* My e-mail address is lassauge@mail.dotcom.fr
*
* Eric Lassauge (May-13-1998)
*
*/
/*-
* (c) Copyright 1993, 1994, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
* GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
* SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
* KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
* clause at DFARS 252.227-7013 and/or in similar or successor
* clauses in the FAR or the DOD or NASA FAR Supplement.
* Unpublished-- rights reserved under the copyright laws of the
* United States. Contractor/manufacturer is Silicon Graphics,
* Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
*
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
#ifndef STANDALONE
#include "xlock.h"
#endif
#ifdef MODE_atlantis
#ifdef STANDALONE
#include <GL/glx.h>
#endif
#include "atlantis.h"
/* *INDENT-OFF* */
static float N001[3] = {0.019249 ,0.011340 ,-0.999750};
static float N002[3] = {-0.132579 ,0.954547 ,0.266952};
static float N003[3] = {-0.196061 ,0.980392 ,-0.019778};
static float N004[3] = {0.695461 ,0.604704 ,0.388158};
static float N005[3] = {0.870600 ,0.425754 ,0.246557};
static float N006[3] = {-0.881191 ,0.392012 ,0.264251};
#if 0
static float N007[3] = {0.000000 ,1.000000 ,0.000000};
#endif
static float N008[3] = {-0.341437 ,0.887477 ,0.309523};
static float N009[3] = {0.124035 ,-0.992278 ,0.000000};
static float N010[3] = {0.242536 ,0.000000 ,-0.970143};
static float N011[3] = {0.588172 ,0.000000 ,0.808736};
static float N012[3] = {0.929824 ,-0.340623 ,-0.139298};
static float N013[3] = {0.954183 ,0.267108 ,-0.134865};
static float N014[3] = {0.495127 ,0.855436 ,-0.151914};
static float N015[3] = {-0.390199 ,0.906569 ,-0.160867};
static float N016[3] = {-0.923605 ,0.354581 ,-0.145692};
static float N017[3] = {-0.955796 ,-0.260667 ,-0.136036};
static float N018[3] = {-0.501283 ,-0.853462 ,-0.142540};
static float N019[3] = {0.405300 ,-0.901974 ,-0.148913};
static float N020[3] = {0.909913 ,-0.392746 ,-0.133451};
static float N021[3] = {0.936494 ,0.331147 ,-0.115414};
static float N022[3] = {0.600131 ,0.793724 ,-0.099222};
static float N023[3] = {-0.231556 ,0.968361 ,-0.093053};
static float N024[3] = {-0.844369 ,0.525330 ,-0.105211};
static float N025[3] = {-0.982725 ,-0.136329 ,-0.125164};
static float N026[3] = {-0.560844 ,-0.822654 ,-0.093241};
static float N027[3] = {0.263884 ,-0.959981 ,-0.093817};
static float N028[3] = {0.842057 ,-0.525192 ,-0.122938};
static float N029[3] = {0.921620 ,0.367565 ,-0.124546};
static float N030[3] = {0.613927 ,0.784109 ,-0.090918};
static float N031[3] = {-0.448754 ,0.888261 ,-0.098037};
static float N032[3] = {-0.891865 ,0.434376 ,-0.126077};
static float N033[3] = {-0.881447 ,-0.448017 ,-0.149437};
static float N034[3] = {-0.345647 ,-0.922057 ,-0.174183};
static float N035[3] = {0.307998 ,-0.941371 ,-0.137688};
static float N036[3] = {0.806316 ,-0.574647 ,-0.140124};
static float N037[3] = {0.961346 ,0.233646 ,-0.145681};
static float N038[3] = {0.488451 ,0.865586 ,-0.110351};
static float N039[3] = {-0.374290 ,0.921953 ,-0.099553};
static float N040[3] = {-0.928504 ,0.344533 ,-0.138485};
static float N041[3] = {-0.918419 ,-0.371792 ,-0.135189};
static float N042[3] = {-0.520666 ,-0.833704 ,-0.183968};
static float N043[3] = {0.339204 ,-0.920273 ,-0.195036};
static float N044[3] = {0.921475 ,-0.387382 ,-0.028636};
static float N045[3] = {0.842465 ,0.533335 ,-0.076204};
static float N046[3] = {0.380110 ,0.924939 ,0.002073};
static float N047[3] = {-0.276128 ,0.961073 ,-0.009579};
static float N048[3] = {-0.879684 ,0.473001 ,-0.049250};
static float N049[3] = {-0.947184 ,-0.317614 ,-0.044321};
static float N050[3] = {-0.642059 ,-0.764933 ,-0.051363};
static float N051[3] = {0.466794 ,-0.880921 ,-0.077990};
static float N052[3] = {0.898509 ,-0.432277 ,0.076279};
static float N053[3] = {0.938985 ,0.328141 ,0.103109};
static float N054[3] = {0.442420 ,0.895745 ,0.043647};
static float N055[3] = {-0.255163 ,0.966723 ,0.018407};
static float N056[3] = {-0.833769 ,0.540650 ,0.111924};
static float N057[3] = {-0.953653 ,-0.289939 ,0.080507};
static float N058[3] = {-0.672357 ,-0.730524 ,0.119461};
static float N059[3] = {0.522249 ,-0.846652 ,0.102157};
static float N060[3] = {0.885868 ,-0.427631 ,0.179914};
#if 0
static float N061[3] = {0.000000 ,1.000000 ,0.000000};
#endif
static float N062[3] = {0.648942 ,0.743116 ,0.163255};
static float N063[3] = {-0.578967 ,0.807730 ,0.111219};
#if 0
static float N064[3] = {0.000000 ,1.000000 ,0.000000};
#endif
static float N065[3] = {-0.909864 ,-0.352202 ,0.219321};
static float N066[3] = {-0.502541 ,-0.818090 ,0.279610};
static float N067[3] = {0.322919 ,-0.915358 ,0.240504};
static float N068[3] = {0.242536 ,0.000000 ,-0.970143};
static float N069[3] = {0.000000 ,1.000000 ,0.000000};
static float N070[3] = {0.000000 ,1.000000 ,0.000000};
static float N071[3] = {0.000000 ,1.000000 ,0.000000};
static float N072[3] = {0.000000 ,1.000000 ,0.000000};
static float N073[3] = {0.000000 ,1.000000 ,0.000000};
static float N074[3] = {0.000000 ,1.000000 ,0.000000};
static float N075[3] = {0.031220 ,0.999025 ,-0.031220};
static float N076[3] = {0.000000 ,1.000000 ,0.000000};
static float N077[3] = {0.446821 ,0.893642 ,0.041889};
static float N078[3] = {0.863035 ,-0.100980 ,0.494949};
static float N079[3] = {0.585597 ,-0.808215 ,0.062174};
static float N080[3] = {0.000000 ,1.000000 ,0.000000};
static float N081[3] = {1.000000 ,0.000000 ,0.000000};
static float N082[3] = {0.000000 ,1.000000 ,0.000000};
static float N083[3] = {-1.000000 ,0.000000 ,0.000000};
static float N084[3] = {-0.478893 ,0.837129 ,-0.264343};
static float N085[3] = {0.000000 ,1.000000 ,0.000000};
static float N086[3] = {0.763909 ,0.539455 ,-0.354163};
static float N087[3] = {0.446821 ,0.893642 ,0.041889};
static float N088[3] = {0.385134 ,-0.908288 ,0.163352};
static float N089[3] = {-0.605952 ,0.779253 ,-0.159961};
static float N090[3] = {0.000000 ,1.000000 ,0.000000};
static float N091[3] = {0.000000 ,1.000000 ,0.000000};
static float N092[3] = {0.000000 ,1.000000 ,0.000000};
static float N093[3] = {0.000000 ,1.000000 ,0.000000};
static float N094[3] = {1.000000 ,0.000000 ,0.000000};
static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
static float N096[3] = {0.644444 ,-0.621516 ,0.445433};
static float N097[3] = {-0.760896 ,-0.474416 ,0.442681};
static float N098[3] = {0.636888 ,-0.464314 ,0.615456};
static float N099[3] = {-0.710295 ,0.647038 ,0.277168};
static float N100[3] = {0.009604 ,0.993655 ,0.112063};
#if 0
static float N101[3] = {0.000000 ,1.000000 ,0.000000};
static float N102[3] = {0.000000 ,1.000000 ,0.000000};
static float N103[3] = {0.000000 ,1.000000 ,0.000000};
static float N104[3] = {0.031837 ,0.999285 ,0.020415};
static float N105[3] = {0.031837 ,0.999285 ,0.020415};
static float N106[3] = {0.031837 ,0.999285 ,0.020415};
static float N107[3] = {0.014647 ,0.999648 ,0.022115};
static float N108[3] = {0.014647 ,0.999648 ,0.022115};
static float N109[3] = {0.014647 ,0.999648 ,0.022115};
static float N110[3] = {-0.985141 ,0.039475 ,0.167149};
static float N111[3] = {-0.985141 ,0.039475 ,0.167149};
static float N112[3] = {-0.985141 ,0.039475 ,0.167149};
static float N113[3] = {0.000000 ,1.000000 ,0.000000};
static float N114[3] = {0.000000 ,1.000000 ,0.000000};
static float N115[3] = {0.000000 ,1.000000 ,0.000000};
static float N116[3] = {0.000000 ,1.000000 ,0.000000};
static float N117[3] = {0.000000 ,1.000000 ,0.000000};
static float N118[3] = {0.000000 ,1.000000 ,0.000000};
static float N119[3] = {0.000000 ,1.000000 ,0.000000};
static float N120[3] = {0.000000 ,1.000000 ,0.000000};
static float N121[3] = {0.000000 ,1.000000 ,0.000000};
#endif
static float iP001[3] = {18.74, 13.19, 3.76};
static float P001[3] = {18.74, 13.19, 3.76};
static float P002[3] = {0.00, 390.42, 10292.57};
static float P003[3] = {55.80, 622.31, 8254.35};
static float P004[3] = {20.80, 247.66, 10652.13};
static float P005[3] = {487.51, 198.05, 9350.78};
static float P006[3] = {-457.61, 199.04, 9353.01};
#if 0
static float P007[3] = {0.00, 259.00, 10276.27};
#endif
static float P008[3] = {-34.67, 247.64, 10663.71};
static float iP009[3] = {97.46, 67.63, 593.82};
static float iP010[3] = {-84.33, 67.63, 588.18};
static float iP011[3] = {118.69, 8.98, -66.91};
static float P009[3] = {97.46, 67.63, 593.82};
static float P010[3] = {-84.33, 67.63, 588.18};
static float P011[3] = {118.69, 8.98, -66.91};
static float iP012[3] = {156.48, -31.95, 924.54};
static float iP013[3] = {162.00, 110.22, 924.54};
static float iP014[3] = {88.16, 221.65, 924.54};
static float iP015[3] = {-65.21, 231.16, 924.54};
static float iP016[3] = {-156.48, 121.97, 924.54};
static float iP017[3] = {-162.00, -23.93, 924.54};
static float iP018[3] = {-88.16, -139.10, 924.54};
static float iP019[3] = {65.21, -148.61, 924.54};
static float iP020[3] = {246.87, -98.73, 1783.04};
static float iP021[3] = {253.17, 127.76, 1783.04};
static float iP022[3] = {132.34, 270.77, 1783.04};
static float iP023[3] = {-97.88, 285.04, 1783.04};
static float iP024[3] = {-222.97, 139.80, 1783.04};
static float iP025[3] = {-225.29, -86.68, 1783.04};
static float iP026[3] = {-108.44, -224.15, 1783.04};
static float iP027[3] = {97.88, -221.56, 1783.04};
static float iP028[3] = {410.55, -200.66, 3213.87};
static float iP029[3] = {432.19, 148.42, 3213.87};
static float iP030[3] = {200.66, 410.55, 3213.87};
static float iP031[3] = {-148.42, 432.19, 3213.87};
static float iP032[3] = {-407.48, 171.88, 3213.87};
static float iP033[3] = {-432.19, -148.42, 3213.87};
static float iP034[3] = {-148.88, -309.74, 3213.87};
static float iP035[3] = {156.38, -320.17, 3213.87};
static float iP036[3] = {523.39, -303.81, 4424.57};
static float iP037[3] = {574.66, 276.84, 4424.57};
static float iP038[3] = {243.05, 492.50, 4424.57};
static float iP039[3] = {-191.23, 520.13, 4424.57};
static float iP040[3] = {-523.39, 304.01, 4424.57};
static float iP041[3] = {-574.66, -231.83, 4424.57};
static float iP042[3] = {-266.95, -578.17, 4424.57};
static float iP043[3] = {211.14, -579.67, 4424.57};
static float iP044[3] = {680.57, -370.27, 5943.46};
static float iP045[3] = {834.01, 363.09, 5943.46};
static float iP046[3] = {371.29, 614.13, 5943.46};
static float iP047[3] = {-291.43, 621.86, 5943.46};
static float iP048[3] = {-784.13, 362.60, 5943.46};
static float iP049[3] = {-743.29, -325.82, 5943.46};
static float iP050[3] = {-383.24, -804.77, 5943.46};
static float iP051[3] = {283.47, -846.09, 5943.46};
static float P012[3] = {156.48, -31.95, 924.54};
static float P013[3] = {162.00, 110.22, 924.54};
static float P014[3] = {88.16, 221.65, 924.54};
static float P015[3] = {-65.21, 231.16, 924.54};
static float P016[3] = {-156.48, 121.97, 924.54};
static float P017[3] = {-162.00, -23.93, 924.54};
static float P018[3] = {-88.16, -139.10, 924.54};
static float P019[3] = {65.21, -148.61, 924.54};
static float P020[3] = {246.87, -98.73, 1783.04};
static float P021[3] = {253.17, 127.76, 1783.04};
static float P022[3] = {132.34, 270.77, 1783.04};
static float P023[3] = {-97.88, 285.04, 1783.04};
static float P024[3] = {-222.97, 139.80, 1783.04};
static float P025[3] = {-225.29, -86.68, 1783.04};
static float P026[3] = {-108.44, -224.15, 1783.04};
static float P027[3] = {97.88, -221.56, 1783.04};
static float P028[3] = {410.55, -200.66, 3213.87};
static float P029[3] = {432.19, 148.42, 3213.87};
static float P030[3] = {200.66, 410.55, 3213.87};
static float P031