From c8c44fa0297afaa3ef4bfac13d6600436f34d93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 10 Jun 2005 09:07:17 +0000 Subject: [PATCH] added GLTeapot sample app we still need opengl headers and libGL.so git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13041 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/Jamfile | 1 + src/apps/glteapot/FPS.cpp | 135 ++ src/apps/glteapot/FPS.h | 19 + src/apps/glteapot/GLObject.cpp | 353 +++++ src/apps/glteapot/GLObject.h | 54 + src/apps/glteapot/GLTeapot.rdef | 67 + src/apps/glteapot/Jamfile | 15 + src/apps/glteapot/LICENSE | 31 + src/apps/glteapot/ObjectView.cpp | 692 ++++++++ src/apps/glteapot/ObjectView.h | 79 + src/apps/glteapot/README.GLTeapot | 28 + src/apps/glteapot/ResScroll.h | 23 + src/apps/glteapot/error.cpp | 11 + src/apps/glteapot/error.h | 31 + src/apps/glteapot/glob.h | 16 + src/apps/glteapot/teapot.data | 2425 +++++++++++++++++++++++++++++ src/apps/glteapot/teapot.h | 9 + src/apps/glteapot/teapot_main.cpp | 206 +++ src/apps/glteapot/util.h | 381 +++++ 19 files changed, 4576 insertions(+) create mode 100644 src/apps/glteapot/FPS.cpp create mode 100644 src/apps/glteapot/FPS.h create mode 100644 src/apps/glteapot/GLObject.cpp create mode 100644 src/apps/glteapot/GLObject.h create mode 100644 src/apps/glteapot/GLTeapot.rdef create mode 100644 src/apps/glteapot/Jamfile create mode 100644 src/apps/glteapot/LICENSE create mode 100644 src/apps/glteapot/ObjectView.cpp create mode 100644 src/apps/glteapot/ObjectView.h create mode 100644 src/apps/glteapot/README.GLTeapot create mode 100644 src/apps/glteapot/ResScroll.h create mode 100644 src/apps/glteapot/error.cpp create mode 100644 src/apps/glteapot/error.h create mode 100644 src/apps/glteapot/glob.h create mode 100644 src/apps/glteapot/teapot.data create mode 100644 src/apps/glteapot/teapot.h create mode 100644 src/apps/glteapot/teapot_main.cpp create mode 100644 src/apps/glteapot/util.h diff --git a/src/apps/Jamfile b/src/apps/Jamfile index 93947c1ef4..828c94707b 100644 --- a/src/apps/Jamfile +++ b/src/apps/Jamfile @@ -7,6 +7,7 @@ SubInclude OBOS_TOP src apps codycam ; SubInclude OBOS_TOP src apps deskbar ; SubInclude OBOS_TOP src apps diskprobe ; SubInclude OBOS_TOP src apps expander ; +SubInclude OBOS_TOP src apps glteapot ; SubInclude OBOS_TOP src apps magnify ; #SubInclude OBOS_TOP src apps mediaplayer ; SubInclude OBOS_TOP src apps midiplayer ; diff --git a/src/apps/glteapot/FPS.cpp b/src/apps/glteapot/FPS.cpp new file mode 100644 index 0000000000..3b3c4ef104 --- /dev/null +++ b/src/apps/glteapot/FPS.cpp @@ -0,0 +1,135 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + + +#include "FPS.h" + + +FPS::FPS() +{ +} + +FPS::~FPS() +{ +} + +void FPS::drawChar( GLfloat x, GLfloat y, GLint number ) +{ + static bool numbers[13][7] = { + {true,true,true,true,true,true,false}, /* 0 */ + {false,true,true,false,false,false,false}, /* 1 */ + {true,true,false,true,true,false,true}, /* 2 */ + {true,true,true,true,false,false,true}, /* 3 */ + {false,true,true,false,false,true,true}, /* 4 */ + {true,false,true,true,false,true,true}, /* 5 */ + {true,false,true,true,true,true,true}, /* 6 */ + {true,true,true,false,false,false,false}, /* 7 */ + {true,true,true,true,true,true,true}, /* 8 */ + {true,true,true,false,false,true,true}, /* 9 */ + + {true,false,false,false,true,true,true}, /* F */ + {true,true,false,false,true,true,true}, /* P */ + {true,false,true,true,false,true,true}, /* S */ + + }; + + static GLfloat gap = 0.03; + static GLfloat size = 1.0; + + static GLfloat x0 = -size / 4; + static GLfloat x1 = -size / 4 + gap; + static GLfloat x2 = -x1; + static GLfloat x3 = -x0; + + static GLfloat y0 = size / 2; + static GLfloat y1 = size / 2 - gap; + static GLfloat y2 = 0 + gap; + static GLfloat y3 = 0; + static GLfloat y4 = -y2; + static GLfloat y5 = -y1; + static GLfloat y6 = -y0; + + glBegin( GL_LINES ); + if( numbers[number][0] ) + { + glVertex2f( x1 + x, y0 + y ); + glVertex2f( x2 + x, y0 + y ); + } + if( numbers[number][1] ) + { + glVertex2f( x3 + x, y1 + y ); + glVertex2f( x3 + x, y2 + y ); + } + if( numbers[number][2] ) + { + glVertex2f( x3 + x, y4 + y ); + glVertex2f( x3 + x, y5 + y ); + } + if( numbers[number][3] ) + { + glVertex2f( x1 + x, y6 + y ); + glVertex2f( x2 + x, y6 + y ); + } + if( numbers[number][4] ) + { + glVertex2f( x0 + x, y5 + y ); + glVertex2f( x0 + x, y4 + y ); + } + if( numbers[number][5] ) + { + glVertex2f( x0 + x, y2 + y ); + glVertex2f( x0 + x, y1 + y ); + } + if( numbers[number][6] ) + { + glVertex2f( x1 + x, y3 + y ); + glVertex2f( x2 + x, y3 + y ); + } + glEnd(); + +} + +void FPS::drawCounter( GLfloat frameRate ) +{ + GLfloat pos = 0; + int ifps = (int) (frameRate * 10 +0.5); + int c100,c10,c1,c_1; + + c100 = ifps / 1000; + c10 = (ifps / 100) % 10; + c1 = (ifps / 10) % 10; + c_1 = ifps % 10; + + if( c100 ) + { + drawChar( pos, 0, c100 ); + pos += 1; + } + if( c100 || c10 ) + { + drawChar( pos, 0, c10 ); + pos += 1; + } + drawChar( pos, 0, c1 ); + pos += 0.5; + + glBegin( GL_POINTS ); + glVertex2f( pos, -0.5 ); + glEnd(); + pos += 0.5; + + drawChar( pos, 0, c_1 ); + pos += 1.5; + + + drawChar( pos, 0, 10 ); + pos += 1; + drawChar( pos, 0, 11 ); + pos += 1; + drawChar( pos, 0, 12 ); + pos += 1; + +} + diff --git a/src/apps/glteapot/FPS.h b/src/apps/glteapot/FPS.h new file mode 100644 index 0000000000..df79b21f79 --- /dev/null +++ b/src/apps/glteapot/FPS.h @@ -0,0 +1,19 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include + +class FPS +{ +public: + FPS(); + ~FPS(); + + static void drawCounter( GLfloat frameRate ); + +private: + static void drawChar( GLfloat x, GLfloat y, GLint number ); + +}; \ No newline at end of file diff --git a/src/apps/glteapot/GLObject.cpp b/src/apps/glteapot/GLObject.cpp new file mode 100644 index 0000000000..d6a2beb9e7 --- /dev/null +++ b/src/apps/glteapot/GLObject.cpp @@ -0,0 +1,353 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include +#include + +#include + +#include "GLObject.h" +#include "glob.h" + +struct material { + float ambient[3],diffuse[3],specular[3]; +}; + +float *colors[] = +{ + NULL,white,yellow,blue,red,green +}; + +material materials[] = { + // Null + { + {0.1745, 0.03175, 0.03175}, + {0.61424, 0.10136, 0.10136}, + {0.727811, 0.626959, 0.626959} + }, + // White + { + {0.1745, 0.1745, 0.1745}, + {0.61424, 0.61424, 0.61424}, + {0.727811, 0.727811, 0.727811} + }, + // Yellow + { + {0.1745, 0.1745, 0.03175}, + {0.61424, 0.61424, 0.10136}, + {0.727811, 0.727811, 0.626959} + }, + // Blue + { + {0.03175, 0.03175, 0.1745}, + {0.10136, 0.10136, 0.61424}, + {0.626959, 0.626959, 0.727811} + }, + // Red + { + {0.1745, 0.03175, 0.03175}, + {0.61424, 0.10136, 0.10136}, + {0.727811, 0.626959, 0.626959} + }, + // Green + { + {0.03175, 0.1745, 0.03175}, + {0.10136, 0.61424, 0.10136}, + {0.626959, 0.727811, 0.626959} + }, +}; + +#define USE_QUAD_STRIPS 1 + +extern long setEvent(sem_id event); + +GLObject::GLObject(ObjectView *ov) +{ + rotX = rotY = lastRotX = lastRotY = 0; + spinX = spinY = 2; + x = y = 0; + z = -2.0; + color = 4; + solidity = 0; + changed = false; + objView = ov; +}; + +GLObject::~GLObject() +{ +}; + +void GLObject::MenuInvoked(BPoint point) +{ + BPopUpMenu *m = new BPopUpMenu("Object",false,false); + BMenuItem *i; + + int c = 1; + m->AddItem(i = new BMenuItem("White",NULL)); + if (color == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Yellow",NULL)); + if (color == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Blue",NULL)); + if (color == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Red",NULL)); + if (color == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Green",NULL)); + if (color == c++) + i->SetMarked(true); + m->AddSeparatorItem(); + + c = 0; + m->AddItem(i = new BMenuItem("Solid",NULL)); + if (solidity == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Translucent",NULL)); + if (solidity == c++) + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Transparent",NULL)); + if (solidity == c++) + i->SetMarked(true); + + i = m->Go(point); + int32 index = m->IndexOf(i); + delete m; + + if (index < 5) { + color = index+1; + } else if (index > 5) { + solidity = index-6; + }; + changed = true; + setEvent(objView->drawEvent); +}; + +bool GLObject::SpinIt() +{ + rotX += spinX; + rotY += spinY; + bool c = changed; + c = c || ((rotX != lastRotX) || (rotY != lastRotY)); + lastRotX = rotX; + lastRotY = rotY; + + return c; +}; + +void GLObject::Draw(bool forID, float IDcolor[]) +{ + glPushMatrix(); + glTranslatef(x, y, z); + glRotatef(rotY, 0.0,1.0,0.0); + glRotatef(rotX, 1.0,0.0,0.0); + + if (forID) { + glColor3fv(IDcolor); + }; + + DoDrawing(forID); + + glPopMatrix(); + + changed = false; +}; + +TriangleObject::TriangleObject(ObjectView *ov, char *filename) + : GLObject(ov), + points(100,100), + triangles(100,100), + qs(50,50) +{ + float maxp=0; + int numPt,numTri; + + FILE *f = fopen(filename,"r"); + fscanf(f,"%d",&numPt); +// printf("Points: %d\n",numPt); + for (int i=0;i maxp) + maxp = fabs(p.x); + if (fabs(p.y) > maxp) + maxp = fabs(p.y); + if (fabs(p.z) > maxp) + maxp = fabs(p.z); + points.add(p); + }; + for (int i=0;i points; +BufferArray triangles; +BufferArray qs; + + TriangleObject(ObjectView *ov, char *filename); +virtual ~TriangleObject(); + +virtual void DoDrawing(bool forID); +}; diff --git a/src/apps/glteapot/GLTeapot.rdef b/src/apps/glteapot/GLTeapot.rdef new file mode 100644 index 0000000000..a28bc627e0 --- /dev/null +++ b/src/apps/glteapot/GLTeapot.rdef @@ -0,0 +1,67 @@ + +resource app_signature "application/x-vnd.Haiku-teapot"; + +resource app_flags B_SINGLE_LAUNCH; + +resource app_version +{ + short_info = "GLTeapot", + long_info = "Haiku GLTeapot" +}; + + +resource large_icon array +{ + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF002B5AEB00FFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000FFFFFF002B5AEBEBEB00FF" + $"FFFFFFFFFFFFFFFFFFFFFFFF00002B2A2B2B2A2B2F0000002B9CEBEB00EB00FF" + $"FFFFFFFFFFFFFFFFFFFF00002B2A9C9C9C9C9C9C2B2BEB309CEBEB0000EB00FF" + $"FFFFFFFFFFFFFFFFFF002F2B9C9C313131F131315ADA2BEB300000FF00EB00FF" + $"FFFFFFFFFFFFFFFF002F2B9C313131F1313131F13131DA2B2F2F00FF00EB00FF" + $"FFFFFFFFFFFFFF002F2B9C313131F1302F2F302F302FDA2BEB302F0000EB00FF" + $"FFFFFFFFFFFFFF002F2B9C3131312F2F30EB2F2FEB30DA2B2EEB3000002E00FF" + $"FFFFFFFFFFFF002F2B2A9C31312F2F2F2FEB2F2FEB30DA2BEBEB2F2F00EB00FF" + $"FFFFFFFFFFFF00302A2B9C31312F2F2F2FEB302F30DA2B2E2E2EEB30002E00FF" + $"FFFFFFFFFF002F2B2A2B2A5ADA302F302F2F9CDADA2C2C2D2DEBEB2F2F000F0F" + $"FFFFFFFFFF002F2B2A2B2A2B2BDADADADADA5A2B2C2C2D2D2E2EEB2F2F000F0F" + $"FFFFFFFFFF000000002B2A2B2B2A2B2B2B2C2B2B2B2C2C2E2DEBEB2F2F000E0F" + $"FF000000002B2C2B2B00002A2B2B2B2B2B2B2C2C2C2C2D2D2E2EEB2F2F000EFF" + $"002B305A5A5A5A5A5A2B2A002B2A2C2B3F2B2C2B2C2C2D2D2F2D2F2F2F000EFF" + $"002B305A2B2C2E2C2B302F00302B2B2B2C2C2B2C2C2D2D2DEBEB2F2F2F000F0E" + $"002B5A302F2F302F302F2F01302C2C2C2B2C2C2C2C2D2D2F2D2F302F2F000E0F" + $"FF00000000000000000000302F2B2C2C2C2C2C2D2D2D2E2E2E2EEB30000F0F0F" + $"FFFFFFFFFFFF00302F2F302F2F2D2C2D2C2D2D2C2D2D2D2E2FEB302F000E0F0F" + $"FFFFFFFFFFFFFF00302F2F2D2C2D2D2D2D2D2D2D2DEB2FEBEB2F30000F0E0F0F" + $"FFFFFFFFFFFFFF0030EB2FEB2D2D2D2D2E2D2DEBEBEB2F2FEB2F2F000E0F0FFF" + $"FFFFFFFFFFFFFFFF00302FEBEB2F2D2F2D2F2D2E2E2FEB2F2F30000F0F0F0FFF" + $"FFFFFFFFFFFFFFFFFF002F2F2F2FEB2F2FEBEB2F2E2F2F2F30000F0F0F0FFFFF" + $"FFFFFFFFFFFFFFFFFFFF0000302F2FEB302F2FEB302F3000000F0F0F0FFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFF0000302F2F302F2F3000000E0F0F0F0FFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000E0F0F0FFFFFFFFFFFFFFF" +}; + +resource mini_icon array +{ + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF0000FF" + $"FFFFFFFFFFFF000000000000002B2E00" + $"FFFFFFFF00002B9C9C9C9C30002E2E00" + $"FFFFFF00302A9C313131F15A30002E00" + $"FFFFFF002B9C313131F1315A2F2F0000" + $"FFFF00302A2B5A3131315A2D2E2F0000" + $"FFFF0000002B2A5A5A5A2D2D2EEB000F" + $"0000005A5A002B2B2B2B2D2D2E2F000F" + $"00305A2B2C002F2B3F2C2D2D2F2F00FF" + $"000000000000302C2D2C2E2D2F2F000E" + $"FFFFFF00302F2D2E2D2D2D2F30000F0F" + $"FFFFFFFF0030EB2F2FEB302F2F000E0F" + $"FFFFFFFFFF0000302F2F3000000F0FFF" + $"FFFFFFFFFFFFFF000000000E0F0FFFFF" +}; diff --git a/src/apps/glteapot/Jamfile b/src/apps/glteapot/Jamfile new file mode 100644 index 0000000000..d465a437bd --- /dev/null +++ b/src/apps/glteapot/Jamfile @@ -0,0 +1,15 @@ +SubDir OBOS_TOP src apps glteapot ; + +#TODO we should have our own opengl headers +SubDirHdrs [ FDirName / boot develop headers be opengl ] ; + +#TODO we should have our own libGL.so +App GLTeapot : + FPS.cpp + GLObject.cpp + ObjectView.cpp + error.cpp + teapot_main.cpp + : libbe.so GL libgame.so + : GLTeapot.rdef +; diff --git a/src/apps/glteapot/LICENSE b/src/apps/glteapot/LICENSE new file mode 100644 index 0000000000..86a4268fa9 --- /dev/null +++ b/src/apps/glteapot/LICENSE @@ -0,0 +1,31 @@ +---------------------- +Be Sample Code License +---------------------- + +Copyright 1991-1999, Be Incorporated. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/apps/glteapot/ObjectView.cpp b/src/apps/glteapot/ObjectView.cpp new file mode 100644 index 0000000000..881064c310 --- /dev/null +++ b/src/apps/glteapot/ObjectView.cpp @@ -0,0 +1,692 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include +#include + +#include +#include + +#include "ObjectView.h" +#include "ResScroll.h" +#include "GLObject.h" +#include "FPS.h" + +#define teapotData "teapot.data" +char teapotPath[PATH_MAX]; + +float displayScale = 1.0; +float depthOfView = 30.0; +float zRatio = 10.0; + +float white[3] = {1.0,1.0,1.0}; +float dimWhite[3] = {0.25,0.25,0.25}; +float black[3] = {0.0,0.0,0.0}; +float foggy[3] = {0.4,0.4,0.4}; +float blue[3] = {0.0,0.0,1.0}; +float dimBlue[3] = {0.0,0.0,0.5}; +float yellow[3] = {1.0,1.0,0.0}; +float dimYellow[3] = {0.5,0.5,0.0}; +float green[3] = {0.0,1.0,0.0}; +float dimGreen[3] = {0.0,0.5,0.0}; +float red[3] = {1.0,0.0,0.0}; + +float *bgColor = black; + +struct light { + float *ambient; + float *diffuse; + float *specular; +}; + +light lights[] = { + {NULL,NULL,NULL}, + {dimWhite,white,white}, + {dimWhite,yellow,yellow}, + {dimWhite,red,red}, + {dimWhite,blue,blue}, + {dimWhite,green,green} +}; + +long signalEvent(sem_id event) +{ + long c; + get_sem_count(event,&c); + if (c<0) + release_sem_etc(event,-c,0); + + return 0; +}; + +long setEvent(sem_id event) +{ + long c; + get_sem_count(event,&c); + if (c<0) + release_sem_etc(event,-c,0); + + return 0; +}; + + +long waitEvent(sem_id event) +{ + acquire_sem(event); + + long c; + get_sem_count(event,&c); + if (c>0) + acquire_sem_etc(event,c,0,0); + + return 0; +}; + +long simonThread(ObjectView *ov) +{ + int noPause=0; + while (acquire_sem_etc(ov->quittingSem,1,B_TIMEOUT,0) == B_NO_ERROR) { + if (ov->SpinIt()) { + ov->DrawFrame(noPause); + release_sem(ov->quittingSem); + noPause = 1; + } else { + release_sem(ov->quittingSem); + noPause = 0; + waitEvent(ov->drawEvent); + }; + }; + + return 0; +}; + +ObjectView::ObjectView(BRect r, char *name, ulong resizingMode, ulong options) + : BGLView(r,name,resizingMode,0,options) +{ + histEntries = 0; + oldestEntry = 0; + lastGouraud = gouraud = true; + lastZbuf = zbuf = true; + lastCulling = culling = true; + lastLighting = lighting = true; + lastFilled = filled = true; + lastPersp = persp = false; + lastFog = fog = false; + lastTextured = textured = false; + lastObjectDistance = objectDistance = depthOfView/8; + fps = true; + forceRedraw = false; + lastYXRatio = yxRatio = 1; + + quittingSem = create_sem(1,"quitting sem"); + drawEvent = create_sem(0,"draw event"); + + char findDir[PATH_MAX]; + find_directory(B_BEOS_ETC_DIRECTORY,-1, TRUE,findDir,PATH_MAX); + sprintf(teapotPath,"%s/%s",findDir,teapotData); + objListLock.Lock(); + objects.AddItem(new TriangleObject(this,teapotPath)); + objListLock.Unlock(); +}; + +ObjectView::~ObjectView() +{ + delete_sem(quittingSem); + delete_sem(drawEvent); +}; + +void ObjectView::AttachedToWindow() +{ + float position[] = {0.0, 3.0, 3.0, 0.0}; + float position1[] = {-3.0, -3.0, 3.0, 0.0}; + float position2[] = {3.0, 0.0, 0.0, 0.0}; + float local_view[] = {0.0,0.0}; +// float ambient[] = {0.1745, 0.03175, 0.03175}; +// float diffuse[] = {0.61424, 0.10136, 0.10136}; +// float specular[] = {0.727811, 0.626959, 0.626959}; +// rgb_color black = {0,0,0,255}; + BRect r = Bounds(); + + BGLView::AttachedToWindow(); + Window()->SetPulseRate(100000); + + LockGL(); + + glEnable(GL_DITHER); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + glDepthFunc(GL_LESS); + + glShadeModel(GL_SMOOTH); + + glLightfv(GL_LIGHT0, GL_POSITION, position); + glLightfv(GL_LIGHT0+1, GL_POSITION, position1); + glLightfv(GL_LIGHT0+2, GL_POSITION, position2); + glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view); + + glEnable(GL_LIGHT0); + glLightfv(GL_LIGHT0, GL_SPECULAR, lights[lightWhite].specular); + glLightfv(GL_LIGHT0, GL_DIFFUSE,lights[lightWhite].diffuse); + glLightfv(GL_LIGHT0, GL_AMBIENT,lights[lightWhite].ambient); + glEnable(GL_LIGHT1); + glLightfv(GL_LIGHT1, GL_SPECULAR, lights[lightBlue].specular); + glLightfv(GL_LIGHT1, GL_DIFFUSE,lights[lightBlue].diffuse); + glLightfv(GL_LIGHT1, GL_AMBIENT,lights[lightBlue].ambient); + + glFrontFace(GL_CW); + glEnable(GL_LIGHTING); + glEnable(GL_AUTO_NORMAL); + glEnable(GL_NORMALIZE); + + glMaterialf(GL_FRONT, GL_SHININESS, 0.6*128.0); + + glClearColor(bgColor[0],bgColor[1],bgColor[2], 1.0); + glColor3f(1.0, 1.0, 1.0); + + glViewport(0, 0, (GLint)r.IntegerWidth()+1, (GLint)r.IntegerHeight()+1); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + float scale=displayScale; + // glOrtho (0.0, 16.0, 0, 16.0*(GLfloat)300/(GLfloat)300, + // -10.0, 10.0); + glOrtho(-scale, scale, -scale, scale, -scale*depthOfView, + scale*depthOfView); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + UnlockGL(); + + drawThread = spawn_thread((thread_entry)simonThread, + "Simon",B_NORMAL_PRIORITY,(void*)this); + resume_thread(drawThread); + forceRedraw = true; + setEvent(drawEvent); +}; + +void ObjectView::DetachedFromWindow() +{ + BGLView::DetachedFromWindow(); + + long dummy; + long locks=0; + + while (Window()->IsLocked()) { + locks++; + Window()->Unlock(); + }; + + acquire_sem(quittingSem); + release_sem(drawEvent); + wait_for_thread(drawThread,&dummy); + release_sem(quittingSem); + + while (locks--) Window()->Lock(); +}; + +void ObjectView::Pulse() +{ + Window()->Lock(); + BRect p = Parent()->Bounds(); + BRect b = Bounds(); + p.OffsetTo(0,0); + b.OffsetTo(0,0); + if (b != p) { + ResizeTo(p.right-p.left,p.bottom-p.top); + }; + Window()->Unlock(); +}; + +void ObjectView::MessageReceived(BMessage *msg) +{ + BMenuItem *i; + bool *b; + + switch (msg->what) { + case bmsgFPS: + fps = (fps)?false:true; + msg->FindPointer("source", (void **)&i); + i->SetMarked(fps); + forceRedraw = true; + setEvent(drawEvent); + break; + case bmsgAddModel: + objListLock.Lock(); + objects.AddItem(new TriangleObject(this,teapotPath)); + objListLock.Unlock(); + setEvent(drawEvent); + break; + case bmsgLights: + { + msg->FindPointer("source",(void **)&i); + long lightNum = msg->FindInt32("num"); + long color = msg->FindInt32("color"); + BMenu *m = i->Menu(); + long index = m->IndexOf(i); + m->ItemAt(index)->SetMarked(true); + for (int i=0;iCountItems();i++) { + if (i != index) + m->ItemAt(i)->SetMarked(false); + }; + + LockGL(); + if (color != lightNone) { + glEnable(GL_LIGHT0+lightNum-1); + glLightfv(GL_LIGHT0+lightNum-1, GL_SPECULAR, lights[color].specular); + glLightfv(GL_LIGHT0+lightNum-1, GL_DIFFUSE,lights[color].diffuse); + glLightfv(GL_LIGHT0+lightNum-1, GL_AMBIENT,lights[color].ambient); + } else { + glDisable(GL_LIGHT0+lightNum-1); + }; + UnlockGL(); + forceRedraw = true; + setEvent(drawEvent); + break; + } + case bmsgGouraud: + b = &gouraud; + goto stateChange; + case bmsgZBuffer: + b = &zbuf; + goto stateChange; + case bmsgCulling: + b = &culling; + goto stateChange; + case bmsgLighting: + b = &lighting; + goto stateChange; + case bmsgFilled: + b = &filled; + goto stateChange; + case bmsgPerspective: + b = &persp; + goto stateChange; + case bmsgFog: + b = &fog; + goto stateChange; + stateChange: + msg->FindPointer("source",(void **)&i); + if (!i) return; + + if (*b) { + i->SetMarked(*b = false); + } else { + i->SetMarked(*b = true); + }; + setEvent(drawEvent); + break; + default: + BGLView::MessageReceived(msg); + }; +}; + +int ObjectView::ObjectAtPoint(BPoint p) +{ + LockGL(); + glShadeModel(GL_FLAT); + glDisable(GL_LIGHTING); + glDisable(GL_FOG); + glClearColor(black[0],black[1],black[2],1.0); + glClear(GL_COLOR_BUFFER_BIT|(zbuf?GL_DEPTH_BUFFER_BIT:0)); + + float f[3]; + f[1] = f[2] = 0; + for (int i=0;iDraw(true, f); + }; + glReadBuffer(GL_BACK); + uchar pixel[256]; + glReadPixels((GLint)p.x,(GLint)(Bounds().bottom-p.y),1,1,GL_RGB,GL_UNSIGNED_BYTE,pixel); + int objNum = pixel[0]; + objNum = 255-objNum; + + EnforceState(); + UnlockGL(); + + return objNum; +}; + +void ObjectView::MouseDown(BPoint p) +{ + BPoint op=p,np=p; + BRect bounds = Bounds(); + float lastDx=0,lastDy=0; + GLObject *o = NULL; + uint32 mods; + + BMessage *m = Window()->CurrentMessage(); + uint32 buttons = m->FindInt32("buttons"); + o = ((GLObject*)objects.ItemAt(ObjectAtPoint(p))); + + long locks=0; + + while (Window()->IsLocked()) { + locks++; + Window()->Unlock(); + }; + + if (buttons == B_SECONDARY_MOUSE_BUTTON) { + if (o) { + while (buttons) { + lastDx = np.x-op.x; + lastDy = np.y-op.y; + if (lastDx || lastDy) { + float xinc = (lastDx*2*displayScale/bounds.Width()); + float yinc = (-lastDy*2*displayScale/bounds.Height()); + float zinc = 0; + if (persp) { + zinc = yinc*(o->z/(displayScale)); + xinc *= -(o->z*4/zRatio); + yinc *= -(o->z*4/zRatio); + }; + o->x += xinc; + mods = modifiers(); + if (mods & B_SHIFT_KEY) + o->z += zinc; + else + o->y += yinc; + op = np; + forceRedraw = true; + setEvent(drawEvent); + }; + + snooze(25000); + + Window()->Lock(); + GetMouse(&np, &buttons, true); + Window()->Unlock(); + }; + }; + } else if (buttons == B_PRIMARY_MOUSE_BUTTON) { + float llx=0,lly=0; + lastDx = lastDy = 0; + if (o) { + o->spinX = 0; + o->spinY = 0; + while (buttons) { + llx = lastDx; + lly = lastDy; + lastDx = np.x-op.x; + lastDy = np.y-op.y; + if (lastDx || lastDy) { + o->rotY += lastDx; + o->rotX += lastDy; + op = np; + setEvent(drawEvent); + }; + + snooze(25000); + + Window()->Lock(); + GetMouse(&np, &buttons, true); + Window()->Unlock(); + }; + o->spinY = lastDx+llx; + o->spinX = lastDy+lly; + }; + } else { + if (o) { + BPoint point = p; + Window()->Lock(); + ConvertToScreen(&point); + Window()->Unlock(); + o->MenuInvoked(point); + }; + }; + + while (locks--) + Window()->Lock(); + + setEvent(drawEvent); +}; + +void ObjectView::FrameResized(float w, float h) +{ + LockGL(); + + BGLView::FrameResized(w,h); + + BRect b = Bounds(); + w = b.Width(); + h = b.Height(); + yxRatio = h/w; + glViewport(0, 0, (GLint)w+1, (GLint)h+1); + + // To prevent weird buffer contents + glClear(GL_COLOR_BUFFER_BIT); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + float scale=displayScale; + if (persp) { + gluPerspective(60,1.0/yxRatio,0.15,120); + } else { + if (yxRatio < 1) { + glOrtho(-scale/yxRatio, scale/yxRatio, -scale, scale, + -1.0, depthOfView*4); + } else { + glOrtho(-scale, scale, -scale*yxRatio, scale*yxRatio, + -1.0, depthOfView*4); + }; + }; + + lastYXRatio = yxRatio; + + glMatrixMode(GL_MODELVIEW); + + UnlockGL(); + + forceRedraw = true; + setEvent(drawEvent); +} + +bool ObjectView::RepositionView() +{ + if (!(persp != lastPersp) && + !(lastObjectDistance != objectDistance) && + !(lastYXRatio != yxRatio)) { + return false; + }; + + LockGL(); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + float scale=displayScale; + if (persp) { + gluPerspective(60,1.0/yxRatio,0.15,120); + } else { + if (yxRatio < 1) { + glOrtho(-scale/yxRatio, scale/yxRatio, -scale, scale, + -1.0, depthOfView*4); + } else { + glOrtho(-scale, scale, -scale*yxRatio, scale*yxRatio, + -1.0, depthOfView*4); + }; + }; + + glMatrixMode(GL_MODELVIEW); + + UnlockGL(); + + lastObjectDistance = objectDistance; + lastPersp = persp; + lastYXRatio = yxRatio; + return true; +}; + +void ObjectView::EnforceState() +{ + glShadeModel(gouraud?GL_SMOOTH:GL_FLAT); + if (zbuf) glEnable(GL_DEPTH_TEST); else glDisable(GL_DEPTH_TEST); + if (culling) glEnable(GL_CULL_FACE); else glDisable(GL_CULL_FACE); + if (lighting) glEnable(GL_LIGHTING); else glDisable(GL_LIGHTING); + if (filled) { + glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); + } else { + glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + }; + if (fog) { + glFogf(GL_FOG_START,10.0); + glFogf(GL_FOG_DENSITY,0.2); + glFogf(GL_FOG_END,depthOfView); + glFogfv(GL_FOG_COLOR,foggy); + glEnable(GL_FOG); + bgColor = foggy; + glClearColor(bgColor[0],bgColor[1],bgColor[2], 1.0); + } else { + glDisable(GL_FOG); + bgColor = black; + glClearColor(bgColor[0],bgColor[1],bgColor[2], 1.0); + }; +}; + +bool ObjectView::SpinIt() +{ + bool changed = false; + + if (gouraud != lastGouraud) { + LockGL(); + glShadeModel(gouraud?GL_SMOOTH:GL_FLAT); + UnlockGL(); + lastGouraud = gouraud; + changed = true; + }; + if (zbuf != lastZbuf) { + LockGL(); + if (zbuf) glEnable(GL_DEPTH_TEST); else glDisable(GL_DEPTH_TEST); + UnlockGL(); + lastZbuf = zbuf; + changed = true; + }; + if (culling != lastCulling) { + LockGL(); + if (culling) glEnable(GL_CULL_FACE); else glDisable(GL_CULL_FACE); + UnlockGL(); + lastCulling = culling; + changed = true; + }; + if (lighting != lastLighting) { + LockGL(); + if (lighting) glEnable(GL_LIGHTING); else glDisable(GL_LIGHTING); + UnlockGL(); + lastLighting = lighting; + changed = true; + }; + if (filled != lastFilled) { + LockGL(); + if (filled) { + glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); + } else { + glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + }; + UnlockGL(); + lastFilled = filled; + changed = true; + }; + if (fog != lastFog) { + if (fog) { + glFogf(GL_FOG_START,1.0); + glFogf(GL_FOG_DENSITY,0.2); + glFogf(GL_FOG_END,depthOfView); + glFogfv(GL_FOG_COLOR,foggy); + glEnable(GL_FOG); + bgColor = foggy; + glClearColor(bgColor[0],bgColor[1],bgColor[2], 1.0); + } else { + glDisable(GL_FOG); + bgColor = black; + glClearColor(bgColor[0],bgColor[1],bgColor[2], 1.0); + }; + lastFog = fog; + changed = true; + }; + + changed = changed || RepositionView(); + changed = changed || forceRedraw; + forceRedraw = false; + + for (int i=0;iSpinIt(); + changed = changed || hack; + }; + + return changed; +}; + +void ObjectView::DrawFrame(bool noPause) +{ + LockGL(); + glClear(GL_COLOR_BUFFER_BIT|(zbuf?GL_DEPTH_BUFFER_BIT:0)); + + objListLock.Lock(); + for (int i=0;isolidity==0) + o->Draw(false, NULL); + }; + EnforceState(); + for (int i=0;isolidity!=0) + o->Draw(false, NULL); + }; + objListLock.Unlock(); + + glDisable(GL_BLEND); + glDepthMask(GL_TRUE); + + if (noPause) { + uint64 now = system_time(); + float f = 1.0/((now - lastFrame)/1000000.0); + lastFrame = now; + int e; + if (histEntries < HISTSIZE) { + e = (oldestEntry + histEntries)%HISTSIZE; + histEntries++; + } else { + e = oldestEntry; + oldestEntry = (oldestEntry+1)%HISTSIZE; + }; + + fpsHistory[e] = f; + + if (histEntries > 5) { + f = 0; + for (int i=0;i +#include + +#define bmsgFPS 'fps ' +#define bmsgAddModel 'addm' +#define bmsgGouraud 'gour' +#define bmsgZBuffer 'zbuf' +#define bmsgCulling 'cull' +#define bmsgTextured 'txtr' +#define bmsgFog 'fog ' +#define bmsgLighting 'lite' +#define bmsgLights 'lits' +#define bmsgFilled 'fill' +#define bmsgPerspective 'prsp' + +enum lights { + lightNone = 0, + lightWhite, + lightYellow, + lightRed, + lightBlue, + lightGreen +}; + +#define HISTSIZE 10 + +class ResScroll; +class ObjectView : public BGLView { +public: +sem_id drawEvent; +sem_id quittingSem; +thread_id drawThread; +ResScroll * resScroll; + +BList objects; +BLocker objListLock; + +float yxRatio,lastYXRatio; +uint64 lastFrame; +float fpsHistory[HISTSIZE]; +int32 histEntries,oldestEntry; +bool fps; +bool gouraud, lastGouraud; +bool zbuf,lastZbuf; +bool culling,lastCulling; +bool lighting,lastLighting; +bool filled,lastFilled; +bool persp,lastPersp; +bool lastTextured,textured; +bool lastFog,fog; +bool forceRedraw; +float objectDistance,lastObjectDistance; + + ObjectView(BRect r, char *name, + ulong resizingMode, ulong options); + ~ObjectView(); + +virtual void MouseDown(BPoint p); +virtual void MessageReceived(BMessage *msg); +virtual void AttachedToWindow(); +virtual void DetachedFromWindow(); +virtual void FrameResized(float width, float height); + bool SpinIt(); + int ObjectAtPoint(BPoint p); +virtual void DrawFrame(bool noPause); +virtual void Pulse(); + void EnforceState(); + bool RepositionView(); +}; + +#endif diff --git a/src/apps/glteapot/README.GLTeapot b/src/apps/glteapot/README.GLTeapot new file mode 100644 index 0000000000..ca751a4d76 --- /dev/null +++ b/src/apps/glteapot/README.GLTeapot @@ -0,0 +1,28 @@ +GLTeapot Project README +======================= + +This is a sample application using Be's OpenGL implementation. It uses a +generic object viewer class, ObjectView, to view OpenGL objects created +using a generic OpenGL object class, GLObject. + +Files +===== + +The archive should contain the following files: + +README.GLTeapot -- This file +GLTeapot.proj -- Metrowerks project file +teapot.data -- Teapot vertex data file +Teapot.rsrc -- Application resource file + +GLObject.cpp -- Source files +GLObject.h +ObjectView.cpp +ObjectView.h +ResScroll.h +error.cpp +error..h +glob.h +teapot_main.cpp +util.h + diff --git a/src/apps/glteapot/ResScroll.h b/src/apps/glteapot/ResScroll.h new file mode 100644 index 0000000000..d072b8072a --- /dev/null +++ b/src/apps/glteapot/ResScroll.h @@ -0,0 +1,23 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#ifndef ResScroll_h +#define ResScroll_h + +#include + +class ObjectView; + +class ResScroll : public BScrollBar { +public: + ObjectView * objectView; + + ResScroll(BRect r, const char *name, + ObjectView *target, orientation posture); +virtual void ValueChanged(float value); + +}; + +#endif diff --git a/src/apps/glteapot/error.cpp b/src/apps/glteapot/error.cpp new file mode 100644 index 0000000000..59e628aec9 --- /dev/null +++ b/src/apps/glteapot/error.cpp @@ -0,0 +1,11 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include "error.h" + +void fatalerror(char *s) +{ + printf("FATAL ERROR: %s\n",s); +}; diff --git a/src/apps/glteapot/error.h b/src/apps/glteapot/error.h new file mode 100644 index 0000000000..36c09913a2 --- /dev/null +++ b/src/apps/glteapot/error.h @@ -0,0 +1,31 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#ifndef error_h +#define error_h + +#include + +extern void fatalerror(char *); + +#define DEBUGGING 1 + +#ifdef DEBUGGING + +#define assert(a) if (!(a)) { \ + printf("%s:%d: Failed assertion `"#a"'\n",__FILE__,__LINE__); \ + fatalerror("Failed assertion!"); }; + +#define checkpoint printf("%s:%d: Checkpoint...\n",__FILE__,__LINE__);\ + fflush(stdout); + +#else //DEBUGGING + +#define assert(a) +#define checkpoint + +#endif //DEBUGGING + +#endif diff --git a/src/apps/glteapot/glob.h b/src/apps/glteapot/glob.h new file mode 100644 index 0000000000..8cfc7e9049 --- /dev/null +++ b/src/apps/glteapot/glob.h @@ -0,0 +1,16 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +extern float white[3]; +extern float dimWhite[3]; +extern float black[3]; +extern float foggy[3]; +extern float blue[3]; +extern float dimBlue[3]; +extern float yellow[3]; +extern float dimYellow[3]; +extern float green[3]; +extern float dimGreen[3]; +extern float red[3]; diff --git a/src/apps/glteapot/teapot.data b/src/apps/glteapot/teapot.data new file mode 100644 index 0000000000..208cd788c8 --- /dev/null +++ b/src/apps/glteapot/teapot.data @@ -0,0 +1,2425 @@ +821 +1.459600 0.000000 2.463000 0.749768 0.000000 0.661700 +1.500000 0.000000 2.400000 0.902857 0.000000 0.429932 +1.424640 -0.478560 2.400000 0.857866 -0.280456 0.430593 +1.386270 -0.465671 2.463000 0.712062 -0.232790 0.662397 +1.419800 0.000000 2.494500 0.398032 0.000000 0.917368 +1.348469 -0.452973 2.494500 0.377729 -0.123488 0.917640 +1.390200 0.000000 2.494500 -0.594549 0.000000 0.804060 +1.320357 -0.443530 2.494501 -0.564429 0.184525 0.804593 +1.380400 0.000000 2.463000 -0.997566 0.000000 -0.069671 +1.311049 -0.440403 2.463001 -0.948177 0.309981 -0.069801 +1.400000 0.000000 2.400000 -0.902860 0.000000 -0.429934 +1.329664 -0.446656 2.400000 -0.857865 0.280456 -0.430592 +1.213920 -0.890880 2.400000 0.729170 -0.531333 0.431273 +1.181225 -0.866886 2.463000 0.604942 -0.440810 0.663117 +1.149016 -0.843248 2.494500 0.320655 -0.233655 0.917921 +1.125061 -0.825668 2.494500 -0.479323 0.349274 0.805140 +1.117130 -0.819847 2.463001 -0.806215 0.587474 -0.069936 +1.132992 -0.831488 2.400000 -0.729168 0.531331 -0.431271 +0.890880 -1.213920 2.400000 0.531333 -0.729170 0.431273 +0.866886 -1.181225 2.463000 0.440810 -0.604942 0.663117 +0.843248 -1.149016 2.494500 0.233655 -0.320655 0.917921 +0.825668 -1.125061 2.494500 -0.349274 0.479323 0.805140 +0.819847 -1.117130 2.463000 -0.587474 0.806215 -0.069936 +0.831488 -1.132992 2.400000 -0.531331 0.729168 -0.431271 +0.478560 -1.424640 2.400000 0.280456 -0.857866 0.430593 +0.465671 -1.386270 2.463000 0.232790 -0.712062 0.662397 +0.452973 -1.348469 2.494500 0.123488 -0.377729 0.917640 +0.443529 -1.320356 2.494500 -0.184525 0.564429 0.804593 +0.440403 -1.311049 2.463000 -0.309981 0.948177 -0.069801 +0.446656 -1.329664 2.400000 -0.280456 0.857865 -0.430592 +0.000000 -1.500000 2.400000 0.000000 -0.902857 0.429932 +0.000000 -1.459600 2.463000 0.000000 -0.749768 0.661700 +0.000000 -1.419800 2.494500 0.000000 -0.398032 0.917368 +0.000000 -1.390200 2.494500 0.000000 0.594549 0.804060 +0.000000 -1.380400 2.463000 0.000000 0.997566 -0.069671 +0.000000 -1.400000 2.400000 0.000000 0.902860 -0.429934 +0.000000 1.459600 2.463000 0.000000 0.749768 0.661700 +0.000000 1.500000 2.400000 0.000000 0.902857 0.429932 +0.478560 1.424640 2.400000 0.280456 0.857866 0.430593 +0.465671 1.386270 2.463000 0.232790 0.712062 0.662397 +0.000000 1.419800 2.494500 0.000000 0.398032 0.917368 +0.452973 1.348469 2.494500 0.123488 0.377729 0.917640 +0.000000 1.390200 2.494500 0.000000 -0.594549 0.804060 +0.443530 1.320357 2.494501 -0.184525 -0.564429 0.804593 +0.000000 1.380400 2.463000 0.000000 -0.997566 -0.069671 +0.440403 1.311049 2.463001 -0.309981 -0.948177 -0.069801 +0.000000 1.400000 2.400000 0.000000 -0.902860 -0.429934 +0.446656 1.329664 2.400000 -0.280456 -0.857865 -0.430592 +0.890880 1.213920 2.400000 0.531333 0.729170 0.431273 +0.866886 1.181225 2.463000 0.440810 0.604942 0.663117 +0.843248 1.149016 2.494500 0.233655 0.320655 0.917921 +0.825668 1.125061 2.494500 -0.349274 -0.479323 0.805140 +0.819847 1.117130 2.463001 -0.587474 -0.806215 -0.069936 +0.831488 1.132992 2.400000 -0.531331 -0.729168 -0.431271 +1.213920 0.890880 2.400000 0.729170 0.531333 0.431273 +1.181225 0.866886 2.463000 0.604942 0.440810 0.663117 +1.149016 0.843248 2.494500 0.320655 0.233655 0.917921 +1.125061 0.825668 2.494500 -0.479323 -0.349274 0.805140 +1.117130 0.819847 2.463000 -0.806215 -0.587474 -0.069936 +1.132992 0.831488 2.400000 -0.729168 -0.531331 -0.431271 +1.424640 0.478560 2.400000 0.857866 0.280456 0.430593 +1.386270 0.465671 2.463000 0.712062 0.232790 0.662397 +1.348469 0.452973 2.494500 0.377729 0.123488 0.917640 +1.320356 0.443529 2.494500 -0.564429 -0.184525 0.804593 +1.311049 0.440403 2.463000 -0.948177 -0.309981 -0.069801 +1.329664 0.446656 2.400000 -0.857865 -0.280456 -0.430592 +-0.478560 -1.424640 2.400000 -0.280456 -0.857866 0.430593 +-0.465671 -1.386270 2.463000 -0.232790 -0.712062 0.662397 +-0.452973 -1.348469 2.494500 -0.123488 -0.377729 0.917640 +-0.443530 -1.320357 2.494501 0.184525 0.564429 0.804593 +-0.440403 -1.311049 2.463001 0.309981 0.948177 -0.069801 +-0.446656 -1.329664 2.400000 0.280456 0.857865 -0.430592 +-0.890880 -1.213920 2.400000 -0.531333 -0.729170 0.431273 +-0.866886 -1.181225 2.463000 -0.440810 -0.604942 0.663117 +-0.843248 -1.149016 2.494500 -0.233655 -0.320655 0.917921 +-0.825668 -1.125061 2.494500 0.349274 0.479323 0.805140 +-0.819847 -1.117130 2.463001 0.587474 0.806215 -0.069936 +-0.831488 -1.132992 2.400000 0.531331 0.729168 -0.431271 +-1.213920 -0.890880 2.400000 -0.729170 -0.531333 0.431273 +-1.181225 -0.866886 2.463000 -0.604942 -0.440810 0.663117 +-1.149016 -0.843248 2.494500 -0.320655 -0.233655 0.917921 +-1.125061 -0.825668 2.494500 0.479323 0.349274 0.805140 +-1.117130 -0.819847 2.463000 0.806215 0.587474 -0.069936 +-1.132992 -0.831488 2.400000 0.729168 0.531331 -0.431271 +-1.424640 -0.478560 2.400000 -0.857866 -0.280456 0.430593 +-1.386270 -0.465671 2.463000 -0.712062 -0.232790 0.662397 +-1.348469 -0.452973 2.494500 -0.377729 -0.123488 0.917640 +-1.320356 -0.443529 2.494500 0.564429 0.184525 0.804593 +-1.311049 -0.440403 2.463000 0.948177 0.309981 -0.069801 +-1.329664 -0.446656 2.400000 0.857865 0.280456 -0.430592 +-1.500000 0.000000 2.400000 -0.902857 0.000000 0.429932 +-1.459600 0.000000 2.463000 -0.749768 0.000000 0.661700 +-1.419800 0.000000 2.494500 -0.398032 0.000000 0.917368 +-1.390200 0.000000 2.494500 0.594549 0.000000 0.804060 +-1.380400 0.000000 2.463000 0.997566 0.000000 -0.069671 +-1.400000 0.000000 2.400000 0.902860 0.000000 -0.429934 +-1.424640 0.478560 2.400000 -0.857866 0.280456 0.430593 +-1.386270 0.465671 2.463000 -0.712062 0.232790 0.662397 +-1.348469 0.452973 2.494500 -0.377729 0.123488 0.917640 +-1.320357 0.443530 2.494501 0.564429 -0.184525 0.804593 +-1.311049 0.440403 2.463001 0.948177 -0.309981 -0.069801 +-1.329664 0.446656 2.400000 0.857865 -0.280456 -0.430592 +-1.213920 0.890880 2.400000 -0.729170 0.531333 0.431273 +-1.181225 0.866886 2.463000 -0.604942 0.440810 0.663117 +-1.149016 0.843248 2.494500 -0.320655 0.233655 0.917921 +-1.125061 0.825668 2.494500 0.479323 -0.349274 0.805140 +-1.117130 0.819847 2.463001 0.806215 -0.587474 -0.069936 +-1.132992 0.831488 2.400000 0.729168 -0.531331 -0.431271 +-0.890880 1.213920 2.400000 -0.531333 0.729170 0.431273 +-0.866886 1.181225 2.463000 -0.440810 0.604942 0.663117 +-0.843248 1.149016 2.494500 -0.233655 0.320655 0.917921 +-0.825668 1.125061 2.494500 0.349274 -0.479323 0.805140 +-0.819847 1.117130 2.463000 0.587474 -0.806215 -0.069936 +-0.831488 1.132992 2.400000 0.531331 -0.729168 -0.431271 +-0.478560 1.424640 2.400000 -0.280456 0.857866 0.430593 +-0.465671 1.386270 2.463000 -0.232790 0.712062 0.662397 +-0.452973 1.348469 2.494500 -0.123488 0.377729 0.917640 +-0.443529 1.320356 2.494500 0.184525 -0.564429 0.804593 +-0.440403 1.311049 2.463000 0.309981 -0.948177 -0.069801 +-0.446656 1.329664 2.400000 0.280456 -0.857865 -0.430592 +1.972000 0.000000 1.178400 0.982662 0.000000 0.185408 +2.000000 0.000000 0.900000 0.999997 0.000000 0.000000 +1.899520 -0.638080 0.900000 0.950495 -0.310739 0.000000 +1.872927 -0.629147 1.178400 0.933952 -0.305330 0.185744 +1.896000 0.000000 1.471200 0.952068 0.000000 0.305886 +1.800745 -0.604900 1.471200 0.904777 -0.295792 0.306407 +1.784000 0.000000 1.774800 0.925461 0.000000 0.378844 +1.694372 -0.569167 1.774800 0.879408 -0.287499 0.379453 +1.648000 0.000000 2.085600 0.908570 0.000000 0.417733 +1.565205 -0.525778 2.085600 0.863304 -0.282234 0.418380 +1.618560 -1.187840 0.900000 0.808194 -0.588917 0.000000 +1.595900 -1.171210 1.178400 0.794073 -0.578627 0.186092 +1.534395 -1.126072 1.471200 0.769179 -0.560487 0.306945 +1.443756 -1.059553 1.774800 0.747539 -0.544718 0.380083 +1.333694 -0.978780 2.085600 0.733807 -0.534712 0.419049 +1.187840 -1.618560 0.900000 0.588917 -0.808194 0.000000 +1.171210 -1.595900 1.178400 0.578627 -0.794073 0.186092 +1.126072 -1.534395 1.471200 0.560487 -0.769179 0.306945 +1.059553 -1.443756 1.774800 0.544718 -0.747539 0.380083 +0.978780 -1.333694 2.085600 0.534712 -0.733807 0.419049 +0.638080 -1.899520 0.900000 0.310739 -0.950495 0.000000 +0.629147 -1.872927 1.178400 0.305331 -0.933952 0.185744 +0.604900 -1.800745 1.471200 0.295792 -0.904777 0.306407 +0.569167 -1.694372 1.774800 0.287499 -0.879408 0.379453 +0.525778 -1.565205 2.085600 0.282234 -0.863304 0.418380 +0.000000 -2.000000 0.900000 0.000000 -0.999997 0.000000 +0.000000 -1.972000 1.178400 0.000000 -0.982662 0.185408 +0.000000 -1.896000 1.471200 0.000000 -0.952068 0.305886 +0.000000 -1.784000 1.774800 0.000000 -0.925461 0.378844 +0.000000 -1.648000 2.085600 0.000000 -0.908570 0.417733 +0.000000 1.972000 1.178400 0.000000 0.982662 0.185408 +0.000000 2.000000 0.900000 0.000000 0.999997 0.000000 +0.638080 1.899520 0.900000 0.310739 0.950495 0.000000 +0.629147 1.872927 1.178400 0.305330 0.933952 0.185744 +0.000000 1.896000 1.471200 0.000000 0.952068 0.305886 +0.604900 1.800745 1.471200 0.295792 0.904777 0.306407 +0.000000 1.784000 1.774800 0.000000 0.925461 0.378844 +0.569167 1.694372 1.774800 0.287499 0.879408 0.379453 +0.000000 1.648000 2.085600 0.000000 0.908570 0.417733 +0.525778 1.565205 2.085600 0.282234 0.863304 0.418380 +1.187840 1.618560 0.900000 0.588917 0.808194 0.000000 +1.171210 1.595900 1.178400 0.578627 0.794073 0.186092 +1.126072 1.534395 1.471200 0.560487 0.769179 0.306945 +1.059553 1.443756 1.774800 0.544718 0.747539 0.380083 +0.978780 1.333694 2.085600 0.534712 0.733807 0.419049 +1.618560 1.187840 0.900000 0.808194 0.588917 0.000000 +1.595900 1.171210 1.178400 0.794073 0.578627 0.186092 +1.534395 1.126072 1.471200 0.769179 0.560487 0.306945 +1.443756 1.059553 1.774800 0.747539 0.544718 0.380083 +1.333694 0.978780 2.085600 0.733807 0.534712 0.419049 +1.899520 0.638080 0.900000 0.950495 0.310739 0.000000 +1.872927 0.629147 1.178400 0.933952 0.305330 0.185744 +1.800745 0.604900 1.471200 0.904777 0.295792 0.306407 +1.694372 0.569167 1.774800 0.879408 0.287499 0.379453 +1.565205 0.525778 2.085600 0.863304 0.282234 0.418380 +-0.638080 -1.899520 0.900000 -0.310739 -0.950495 0.000000 +-0.629147 -1.872927 1.178400 -0.305330 -0.933952 0.185744 +-0.604900 -1.800745 1.471200 -0.295792 -0.904777 0.306407 +-0.569167 -1.694372 1.774800 -0.287499 -0.879408 0.379453 +-0.525778 -1.565205 2.085600 -0.282234 -0.863304 0.418380 +-1.187840 -1.618560 0.900000 -0.588917 -0.808194 0.000000 +-1.171210 -1.595900 1.178400 -0.578627 -0.794073 0.186092 +-1.126072 -1.534395 1.471200 -0.560487 -0.769179 0.306945 +-1.059553 -1.443756 1.774800 -0.544718 -0.747539 0.380083 +-0.978780 -1.333694 2.085600 -0.534712 -0.733807 0.419049 +-1.618560 -1.187840 0.900000 -0.808194 -0.588917 0.000000 +-1.595900 -1.171210 1.178400 -0.794073 -0.578627 0.186092 +-1.534395 -1.126072 1.471200 -0.769179 -0.560487 0.306945 +-1.443756 -1.059553 1.774800 -0.747539 -0.544718 0.380083 +-1.333694 -0.978780 2.085600 -0.733807 -0.534712 0.419049 +-1.899520 -0.638080 0.900000 -0.950495 -0.310739 0.000000 +-1.872927 -0.629147 1.178400 -0.933952 -0.305330 0.185744 +-1.800745 -0.604900 1.471200 -0.904777 -0.295792 0.306407 +-1.694372 -0.569167 1.774800 -0.879408 -0.287499 0.379453 +-1.565205 -0.525778 2.085600 -0.863304 -0.282234 0.418380 +-2.000000 0.000000 0.900000 -0.999997 0.000000 0.000000 +-1.972000 0.000000 1.178400 -0.982662 0.000000 0.185408 +-1.896000 0.000000 1.471200 -0.952068 0.000000 0.305886 +-1.784000 0.000000 1.774800 -0.925461 0.000000 0.378844 +-1.648000 0.000000 2.085600 -0.908570 0.000000 0.417733 +-1.899520 0.638080 0.900000 -0.950495 0.310739 0.000000 +-1.872927 0.629147 1.178400 -0.933952 0.305330 0.185744 +-1.800745 0.604900 1.471200 -0.904777 0.295792 0.306407 +-1.694372 0.569167 1.774800 -0.879408 0.287499 0.379453 +-1.565205 0.525778 2.085600 -0.863304 0.282234 0.418380 +-1.618560 1.187840 0.900000 -0.808194 0.588917 0.000000 +-1.595900 1.171210 1.178400 -0.794073 0.578627 0.186092 +-1.534395 1.126072 1.471200 -0.769179 0.560487 0.306945 +-1.443756 1.059553 1.774800 -0.747539 0.544718 0.380083 +-1.333694 0.978780 2.085600 -0.733807 0.534712 0.419049 +-1.187840 1.618560 0.900000 -0.588917 0.808194 0.000000 +-1.171210 1.595900 1.178400 -0.578627 0.794073 0.186092 +-1.126072 1.534395 1.471200 -0.560487 0.769179 0.306945 +-1.059553 1.443756 1.774800 -0.544718 0.747539 0.380083 +-0.978780 1.333694 2.085600 -0.534712 0.733807 0.419049 +-0.638080 1.899520 0.900000 -0.310739 0.950495 0.000000 +-0.629147 1.872927 1.178400 -0.305331 0.933952 0.185744 +-0.604900 1.800745 1.471200 -0.295792 0.904777 0.306407 +-0.569167 1.694372 1.774800 -0.287499 0.879408 0.379453 +-0.525778 1.565205 2.085600 -0.282234 0.863304 0.418380 +1.552000 0.000000 0.213600 0.653126 0.000000 -0.757248 +1.500000 0.000000 0.150000 0.999997 0.000000 0.000000 +1.424640 -0.478560 0.150000 0.950495 -0.310739 0.000000 +1.474028 -0.495150 0.213600 0.620124 -0.202733 -0.757855 +1.676000 0.000000 0.316800 0.653126 0.000000 -0.757247 +1.591798 -0.534711 0.316800 0.620125 -0.202733 -0.757855 +1.824000 0.000000 0.463200 0.761538 0.000000 -0.648117 +1.732362 -0.581929 0.463200 0.723268 -0.236453 -0.648825 +1.948000 0.000000 0.656400 0.915054 0.000000 -0.403329 +1.850133 -0.621490 0.656400 0.869485 -0.284255 -0.403963 +1.213920 -0.890880 0.150000 0.808194 -0.588917 0.000000 +1.256003 -0.921764 0.213600 0.526696 -0.383794 -0.758479 +1.356353 -0.995410 0.316800 0.526697 -0.383795 -0.758480 +1.476127 -1.083310 0.463200 0.614483 -0.447763 -0.649552 +1.576478 -1.156956 0.656400 0.739078 -0.538553 -0.404618 +0.890880 -1.213920 0.150000 0.588917 -0.808194 0.000000 +0.921764 -1.256003 0.213600 0.383794 -0.526696 -0.758479 +0.995410 -1.356353 0.316800 0.383795 -0.526697 -0.758480 +1.083310 -1.476127 0.463200 0.447763 -0.614483 -0.649552 +1.156956 -1.576478 0.656400 0.538553 -0.739078 -0.404619 +0.478560 -1.424640 0.150000 0.310739 -0.950495 0.000000 +0.495150 -1.474028 0.213600 0.202733 -0.620124 -0.757855 +0.534711 -1.591798 0.316800 0.202733 -0.620125 -0.757855 +0.581929 -1.732362 0.463200 0.236453 -0.723268 -0.648825 +0.621490 -1.850133 0.656400 0.284255 -0.869485 -0.403963 +0.000000 -1.500000 0.150000 0.000000 -0.999997 0.000000 +0.000000 -1.552000 0.213600 0.000000 -0.653126 -0.757248 +0.000000 -1.676000 0.316800 0.000000 -0.653126 -0.757247 +0.000000 -1.824000 0.463200 0.000000 -0.761538 -0.648117 +0.000000 -1.948000 0.656400 0.000000 -0.915054 -0.403329 +0.000000 1.552000 0.213600 0.000000 0.653126 -0.757248 +0.000000 1.500000 0.150000 0.000000 0.999997 0.000000 +0.478560 1.424640 0.150000 0.310739 0.950495 0.000000 +0.495150 1.474028 0.213600 0.202733 0.620124 -0.757855 +0.000000 1.676000 0.316800 0.000000 0.653126 -0.757247 +0.534711 1.591798 0.316800 0.202733 0.620125 -0.757855 +0.000000 1.824000 0.463200 0.000000 0.761538 -0.648117 +0.581929 1.732362 0.463200 0.236453 0.723268 -0.648825 +0.000000 1.948000 0.656400 0.000000 0.915054 -0.403329 +0.621490 1.850133 0.656400 0.284255 0.869485 -0.403963 +0.890880 1.213920 0.150000 0.588917 0.808194 0.000000 +0.921764 1.256003 0.213600 0.383794 0.526696 -0.758479 +0.995410 1.356353 0.316800 0.383795 0.526697 -0.758480 +1.083310 1.476127 0.463200 0.447763 0.614483 -0.649552 +1.156956 1.576478 0.656400 0.538553 0.739078 -0.404618 +1.213920 0.890880 0.150000 0.808194 0.588917 0.000000 +1.256003 0.921764 0.213600 0.526696 0.383794 -0.758479 +1.356353 0.995410 0.316800 0.526697 0.383795 -0.758480 +1.476127 1.083310 0.463200 0.614483 0.447763 -0.649552 +1.576478 1.156956 0.656400 0.739078 0.538553 -0.404619 +1.424640 0.478560 0.150000 0.950495 0.310739 0.000000 +1.474028 0.495150 0.213600 0.620124 0.202733 -0.757855 +1.591798 0.534711 0.316800 0.620125 0.202733 -0.757855 +1.732362 0.581929 0.463200 0.723268 0.236453 -0.648825 +1.850133 0.621490 0.656400 0.869485 0.284255 -0.403963 +-0.478560 -1.424640 0.150000 -0.310739 -0.950495 0.000000 +-0.495150 -1.474028 0.213600 -0.202733 -0.620124 -0.757855 +-0.534711 -1.591798 0.316800 -0.202733 -0.620125 -0.757855 +-0.581929 -1.732362 0.463200 -0.236453 -0.723268 -0.648825 +-0.621490 -1.850133 0.656400 -0.284255 -0.869485 -0.403963 +-0.890880 -1.213920 0.150000 -0.588917 -0.808194 0.000000 +-0.921764 -1.256003 0.213600 -0.383794 -0.526696 -0.758479 +-0.995410 -1.356353 0.316800 -0.383795 -0.526697 -0.758480 +-1.083310 -1.476127 0.463200 -0.447763 -0.614483 -0.649552 +-1.156956 -1.576478 0.656400 -0.538553 -0.739078 -0.404618 +-1.213920 -0.890880 0.150000 -0.808194 -0.588917 0.000000 +-1.256003 -0.921764 0.213600 -0.526696 -0.383794 -0.758479 +-1.356353 -0.995410 0.316800 -0.526697 -0.383795 -0.758480 +-1.476127 -1.083310 0.463200 -0.614483 -0.447763 -0.649552 +-1.576478 -1.156956 0.656400 -0.739078 -0.538553 -0.404619 +-1.424640 -0.478560 0.150000 -0.950495 -0.310739 0.000000 +-1.474028 -0.495150 0.213600 -0.620124 -0.202733 -0.757855 +-1.591798 -0.534711 0.316800 -0.620125 -0.202733 -0.757855 +-1.732362 -0.581929 0.463200 -0.723268 -0.236453 -0.648825 +-1.850133 -0.621490 0.656400 -0.869485 -0.284255 -0.403963 +-1.500000 0.000000 0.150000 -0.999997 0.000000 0.000000 +-1.552000 0.000000 0.213600 -0.653126 0.000000 -0.757248 +-1.676000 0.000000 0.316800 -0.653126 0.000000 -0.757247 +-1.824000 0.000000 0.463200 -0.761538 0.000000 -0.648117 +-1.948000 0.000000 0.656400 -0.915054 0.000000 -0.403329 +-1.424640 0.478560 0.150000 -0.950495 0.310739 0.000000 +-1.474028 0.495150 0.213600 -0.620124 0.202733 -0.757855 +-1.591798 0.534711 0.316800 -0.620125 0.202733 -0.757855 +-1.732362 0.581929 0.463200 -0.723268 0.236453 -0.648825 +-1.850133 0.621490 0.656400 -0.869485 0.284255 -0.403963 +-1.213920 0.890880 0.150000 -0.808194 0.588917 0.000000 +-1.256003 0.921764 0.213600 -0.526696 0.383794 -0.758479 +-1.356353 0.995410 0.316800 -0.526697 0.383795 -0.758480 +-1.476127 1.083310 0.463200 -0.614483 0.447763 -0.649552 +-1.576478 1.156956 0.656400 -0.739078 0.538553 -0.404618 +-0.890880 1.213920 0.150000 -0.588917 0.808194 0.000000 +-0.921764 1.256003 0.213600 -0.383794 0.526696 -0.758479 +-0.995410 1.356353 0.316800 -0.383795 0.526697 -0.758480 +-1.083310 1.476127 0.463200 -0.447763 0.614483 -0.649552 +-1.156956 1.576478 0.656400 -0.538553 0.739078 -0.404619 +-0.478560 1.424640 0.150000 -0.310739 0.950495 0.000000 +-0.495150 1.474028 0.213600 -0.202733 0.620124 -0.757855 +-0.534711 1.591798 0.316800 -0.202733 0.620125 -0.757855 +-0.581929 1.732362 0.463200 -0.236453 0.723268 -0.648825 +-0.621490 1.850133 0.656400 -0.284255 0.869485 -0.403963 +0.179200 0.000000 2.804400 0.894427 0.000000 -0.447213 +0.200000 0.000000 2.700000 0.600000 0.000000 0.800000 +0.189952 -0.063808 2.700000 0.569610 -0.186218 0.800539 +0.170215 -0.057246 2.804400 0.849825 -0.277126 -0.448321 +0.273600 0.000000 2.923200 0.732528 0.000000 -0.680733 +0.259910 -0.087511 2.923200 0.695758 -0.226333 -0.681680 +0.358400 0.000000 3.034800 0.934487 0.000000 -0.355995 +0.340477 -0.114676 3.034801 0.888413 -0.288795 -0.356820 +0.308800 0.000000 3.117600 0.360398 0.000000 0.932794 +0.293360 -0.098815 3.117601 0.342044 -0.111168 0.933084 +0.000000 0.000000 3.150000 0.000000 0.000000 1.000000 +0.161856 -0.118784 2.700000 0.483729 -0.352485 0.801094 +0.145078 -0.106513 2.804400 0.722111 -0.525753 -0.449592 +0.221585 -0.162745 2.923200 0.590847 -0.429839 -0.682740 +0.290295 -0.213234 3.034801 0.755194 -0.549270 -0.357749 +0.250127 -0.183734 3.117601 0.290204 -0.211059 0.933400 +0.118784 -0.161856 2.700000 0.352485 -0.483729 0.801094 +0.106513 -0.145078 2.804400 0.525753 -0.722111 -0.449592 +0.162745 -0.221585 2.923200 0.429838 -0.590847 -0.682740 +0.213234 -0.290295 3.034800 0.549270 -0.755194 -0.357749 +0.183734 -0.250127 3.117600 0.211060 -0.290203 0.933400 +0.063808 -0.189952 2.700000 0.186218 -0.569610 0.800539 +0.057246 -0.170215 2.804400 0.277127 -0.849825 -0.448321 +0.087511 -0.259910 2.923200 0.226332 -0.695758 -0.681680 +0.114676 -0.340477 3.034800 0.288795 -0.888413 -0.356820 +0.098815 -0.293360 3.117600 0.111168 -0.342044 0.933084 +0.000000 -0.200000 2.700000 0.000000 -0.600000 0.800000 +0.000000 -0.179200 2.804400 0.000000 -0.894427 -0.447213 +0.000000 -0.273600 2.923200 0.000000 -0.732528 -0.680733 +0.000000 -0.358400 3.034800 0.000000 -0.934487 -0.355995 +0.000000 -0.308800 3.117600 0.000000 -0.360398 0.932794 +0.000000 0.179200 2.804400 0.000000 0.894427 -0.447213 +0.000000 0.200000 2.700000 0.000000 0.600000 0.800000 +0.063808 0.189952 2.700000 0.186218 0.569610 0.800539 +0.057246 0.170215 2.804400 0.277126 0.849825 -0.448321 +0.000000 0.273600 2.923200 0.000000 0.732528 -0.680733 +0.087511 0.259910 2.923200 0.226333 0.695758 -0.681680 +0.000000 0.358400 3.034800 0.000000 0.934487 -0.355995 +0.114676 0.340477 3.034801 0.288795 0.888413 -0.356820 +0.000000 0.308800 3.117600 0.000000 0.360398 0.932794 +0.098815 0.293360 3.117601 0.111168 0.342044 0.933084 +0.118784 0.161856 2.700000 0.352485 0.483729 0.801094 +0.106513 0.145078 2.804400 0.525753 0.722111 -0.449592 +0.162745 0.221585 2.923200 0.429839 0.590847 -0.682740 +0.213234 0.290295 3.034801 0.549270 0.755194 -0.357749 +0.183734 0.250127 3.117601 0.211059 0.290204 0.933400 +0.161856 0.118784 2.700000 0.483729 0.352485 0.801094 +0.145078 0.106513 2.804400 0.722111 0.525753 -0.449592 +0.221585 0.162745 2.923200 0.590847 0.429838 -0.682740 +0.290295 0.213234 3.034800 0.755194 0.549270 -0.357749 +0.250127 0.183734 3.117600 0.290203 0.211060 0.933400 +0.189952 0.063808 2.700000 0.569610 0.186218 0.800539 +0.170215 0.057246 2.804400 0.849825 0.277126 -0.448321 +0.259910 0.087511 2.923200 0.695758 0.226332 -0.681680 +0.340477 0.114676 3.034800 0.888413 0.288795 -0.356820 +0.293360 0.098815 3.117600 0.342044 0.111168 0.933084 +-0.063808 -0.189952 2.700000 -0.186218 -0.569610 0.800539 +-0.057246 -0.170215 2.804400 -0.277126 -0.849825 -0.448321 +-0.087511 -0.259910 2.923200 -0.226333 -0.695758 -0.681680 +-0.114676 -0.340477 3.034801 -0.288795 -0.888413 -0.356820 +-0.098815 -0.293360 3.117601 -0.111168 -0.342044 0.933084 +-0.118784 -0.161856 2.700000 -0.352485 -0.483729 0.801094 +-0.106513 -0.145078 2.804400 -0.525753 -0.722111 -0.449592 +-0.162745 -0.221585 2.923200 -0.429839 -0.590847 -0.682740 +-0.213234 -0.290295 3.034801 -0.549270 -0.755194 -0.357749 +-0.183734 -0.250127 3.117601 -0.211059 -0.290204 0.933400 +-0.161856 -0.118784 2.700000 -0.483729 -0.352485 0.801094 +-0.145078 -0.106513 2.804400 -0.722111 -0.525753 -0.449592 +-0.221585 -0.162745 2.923200 -0.590847 -0.429838 -0.682740 +-0.290295 -0.213234 3.034800 -0.755194 -0.549270 -0.357749 +-0.250127 -0.183734 3.117600 -0.290203 -0.211060 0.933400 +-0.189952 -0.063808 2.700000 -0.569610 -0.186218 0.800539 +-0.170215 -0.057246 2.804400 -0.849825 -0.277126 -0.448321 +-0.259910 -0.087511 2.923200 -0.695758 -0.226332 -0.681680 +-0.340477 -0.114676 3.034800 -0.888413 -0.288795 -0.356820 +-0.293360 -0.098815 3.117600 -0.342044 -0.111168 0.933084 +-0.200000 0.000000 2.700000 -0.600000 0.000000 0.800000 +-0.179200 0.000000 2.804400 -0.894427 0.000000 -0.447213 +-0.273600 0.000000 2.923200 -0.732528 0.000000 -0.680733 +-0.358400 0.000000 3.034800 -0.934487 0.000000 -0.355995 +-0.308800 0.000000 3.117600 -0.360398 0.000000 0.932794 +-0.189952 0.063808 2.700000 -0.569610 0.186218 0.800539 +-0.170215 0.057246 2.804400 -0.849825 0.277126 -0.448321 +-0.259910 0.087511 2.923200 -0.695758 0.226333 -0.681680 +-0.340477 0.114676 3.034801 -0.888413 0.288795 -0.356820 +-0.293360 0.098815 3.117601 -0.342044 0.111168 0.933084 +-0.161856 0.118784 2.700000 -0.483729 0.352485 0.801094 +-0.145078 0.106513 2.804400 -0.722111 0.525753 -0.449592 +-0.221585 0.162745 2.923200 -0.590847 0.429839 -0.682740 +-0.290295 0.213234 3.034801 -0.755194 0.549270 -0.357749 +-0.250127 0.183734 3.117601 -0.290204 0.211059 0.933400 +-0.118784 0.161856 2.700000 -0.352485 0.483729 0.801094 +-0.106513 0.145078 2.804400 -0.525753 0.722111 -0.449592 +-0.162745 0.221585 2.923200 -0.429838 0.590847 -0.682740 +-0.213234 0.290295 3.034800 -0.549270 0.755194 -0.357749 +-0.183734 0.250127 3.117600 -0.211060 0.290203 0.933400 +-0.063808 0.189952 2.700000 -0.186218 0.569610 0.800539 +-0.057246 0.170215 2.804400 -0.277127 0.849825 -0.448321 +-0.087511 0.259910 2.923200 -0.226332 0.695758 -0.681680 +-0.114676 0.340477 3.034800 -0.288795 0.888413 -0.356820 +-0.098815 0.293360 3.117600 -0.111168 0.342044 0.933084 +1.204800 0.000000 2.474400 0.325793 0.000000 0.945439 +1.300000 0.000000 2.400000 0.999999 0.000000 0.000000 +1.234688 -0.414752 2.400000 0.950491 -0.310738 0.000000 +1.144271 -0.384380 2.474400 0.309144 -0.101066 0.945625 +0.970400 0.000000 2.527200 0.165777 0.000000 0.986162 +0.921647 -0.309597 2.527200 0.157282 -0.051419 0.986211 +0.673600 0.000000 2.572800 0.152941 0.000000 0.988232 +0.639758 -0.214905 2.572800 0.145104 -0.047438 0.988278 +0.391200 0.000000 2.625600 0.238138 0.000000 0.971229 +0.371546 -0.124809 2.625601 0.225949 -0.073868 0.971335 +1.052064 -0.772096 2.400000 0.808190 -0.588914 0.000000 +0.975021 -0.715555 2.474400 0.262406 -0.191211 0.945819 +0.785325 -0.576340 2.527200 0.133484 -0.097267 0.986266 +0.545131 -0.400065 2.572800 0.123146 -0.089735 0.988323 +0.316590 -0.232342 2.625601 0.191770 -0.139740 0.971440 +0.772096 -1.052064 2.400000 0.588914 -0.808190 0.000000 +0.715555 -0.975021 2.474400 0.191211 -0.262406 0.945819 +0.576340 -0.785325 2.527200 0.097267 -0.133484 0.986266 +0.400065 -0.545131 2.572800 0.089735 -0.123146 0.988323 +0.232342 -0.316590 2.625600 0.139740 -0.191770 0.971440 +0.414752 -1.234688 2.400000 0.310738 -0.950491 0.000000 +0.384379 -1.144271 2.474400 0.101066 -0.309144 0.945625 +0.309596 -0.921647 2.527200 0.051419 -0.157282 0.986211 +0.214905 -0.639758 2.572800 0.047438 -0.145104 0.988278 +0.124809 -0.371546 2.625600 0.073868 -0.225949 0.971335 +0.000000 -1.300000 2.400000 0.000000 -0.999999 0.000000 +0.000000 -1.204800 2.474400 0.000000 -0.325793 0.945439 +0.000000 -0.970400 2.527200 0.000000 -0.165777 0.986162 +0.000000 -0.673600 2.572800 0.000000 -0.152941 0.988232 +0.000000 -0.391200 2.625600 0.000000 -0.238138 0.971229 +0.000000 1.204800 2.474400 0.000000 0.325793 0.945439 +0.000000 1.300000 2.400000 0.000000 0.999999 0.000000 +0.414752 1.234688 2.400000 0.310738 0.950491 0.000000 +0.384380 1.144271 2.474400 0.101066 0.309144 0.945625 +0.000000 0.970400 2.527200 0.000000 0.165777 0.986162 +0.309597 0.921647 2.527200 0.051419 0.157282 0.986211 +0.000000 0.673600 2.572800 0.000000 0.152941 0.988232 +0.214905 0.639758 2.572800 0.047438 0.145104 0.988278 +0.000000 0.391200 2.625600 0.000000 0.238138 0.971229 +0.124809 0.371546 2.625601 0.073868 0.225949 0.971335 +0.772096 1.052064 2.400000 0.588914 0.808190 0.000000 +0.715555 0.975021 2.474400 0.191211 0.262406 0.945819 +0.576340 0.785325 2.527200 0.097267 0.133484 0.986266 +0.400065 0.545131 2.572800 0.089735 0.123146 0.988323 +0.232342 0.316590 2.625601 0.139740 0.191770 0.971440 +1.052064 0.772096 2.400000 0.808190 0.588914 0.000000 +0.975021 0.715555 2.474400 0.262406 0.191211 0.945819 +0.785325 0.576340 2.527200 0.133484 0.097267 0.986266 +0.545131 0.400065 2.572800 0.123146 0.089735 0.988323 +0.316590 0.232342 2.625600 0.191770 0.139740 0.971440 +1.234688 0.414752 2.400000 0.950491 0.310738 0.000000 +1.144271 0.384379 2.474400 0.309144 0.101066 0.945625 +0.921647 0.309596 2.527200 0.157282 0.051419 0.986211 +0.639758 0.214905 2.572800 0.145104 0.047438 0.988278 +0.371546 0.124809 2.625600 0.225949 0.073868 0.971335 +-0.414752 -1.234688 2.400000 -0.310738 -0.950491 0.000000 +-0.384380 -1.144271 2.474400 -0.101066 -0.309144 0.945625 +-0.309597 -0.921647 2.527200 -0.051419 -0.157282 0.986211 +-0.214905 -0.639758 2.572800 -0.047438 -0.145104 0.988278 +-0.124809 -0.371546 2.625601 -0.073868 -0.225949 0.971335 +-0.772096 -1.052064 2.400000 -0.588914 -0.808190 0.000000 +-0.715555 -0.975021 2.474400 -0.191211 -0.262406 0.945819 +-0.576340 -0.785325 2.527200 -0.097267 -0.133484 0.986266 +-0.400065 -0.545131 2.572800 -0.089735 -0.123146 0.988323 +-0.232342 -0.316590 2.625601 -0.139740 -0.191770 0.971440 +-1.052064 -0.772096 2.400000 -0.808190 -0.588914 0.000000 +-0.975021 -0.715555 2.474400 -0.262406 -0.191211 0.945819 +-0.785325 -0.576340 2.527200 -0.133484 -0.097267 0.986266 +-0.545131 -0.400065 2.572800 -0.123146 -0.089735 0.988323 +-0.316590 -0.232342 2.625600 -0.191770 -0.139740 0.971440 +-1.234688 -0.414752 2.400000 -0.950491 -0.310738 0.000000 +-1.144271 -0.384379 2.474400 -0.309144 -0.101066 0.945625 +-0.921647 -0.309596 2.527200 -0.157282 -0.051419 0.986211 +-0.639758 -0.214905 2.572800 -0.145104 -0.047438 0.988278 +-0.371546 -0.124809 2.625600 -0.225949 -0.073868 0.971335 +-1.300000 0.000000 2.400000 -0.999999 0.000000 0.000000 +-1.204800 0.000000 2.474400 -0.325793 0.000000 0.945439 +-0.970400 0.000000 2.527200 -0.165777 0.000000 0.986162 +-0.673600 0.000000 2.572800 -0.152941 0.000000 0.988232 +-0.391200 0.000000 2.625600 -0.238138 0.000000 0.971229 +-1.234688 0.414752 2.400000 -0.950491 0.310738 0.000000 +-1.144271 0.384380 2.474400 -0.309144 0.101066 0.945625 +-0.921647 0.309597 2.527200 -0.157282 0.051419 0.986211 +-0.639758 0.214905 2.572800 -0.145104 0.047438 0.988278 +-0.371546 0.124809 2.625601 -0.225949 0.073868 0.971335 +-1.052064 0.772096 2.400000 -0.808190 0.588914 0.000000 +-0.975021 0.715555 2.474400 -0.262406 0.191211 0.945819 +-0.785325 0.576340 2.527200 -0.133484 0.097267 0.986266 +-0.545131 0.400065 2.572800 -0.123146 0.089735 0.988323 +-0.316590 0.232342 2.625601 -0.191770 0.139740 0.971440 +-0.772096 1.052064 2.400000 -0.588914 0.808190 0.000000 +-0.715555 0.975021 2.474400 -0.191211 0.262406 0.945819 +-0.576340 0.785325 2.527200 -0.097267 0.133484 0.986266 +-0.400065 0.545131 2.572800 -0.089735 0.123146 0.988323 +-0.232342 0.316590 2.625600 -0.139740 0.191770 0.971440 +-0.414752 1.234688 2.400000 -0.310738 0.950491 0.000000 +-0.384379 1.144271 2.474400 -0.101066 0.309144 0.945625 +-0.309596 0.921647 2.527200 -0.051419 0.157282 0.986211 +-0.214905 0.639758 2.572800 -0.047438 0.145104 0.988278 +-0.124809 0.371546 2.625600 -0.073868 0.225949 0.971335 +0.000000 -1.480800 0.105600 0.000000 -0.664364 -0.747409 +0.472435 -1.406405 0.105600 0.206227 -0.630811 -0.748027 +0.000000 -1.382400 0.064800 0.000000 -0.232118 -0.972685 +0.441041 -1.312948 0.064800 0.072000 -0.220235 -0.972782 +0.000000 -1.143600 0.031200 0.000000 -0.087099 -0.996200 +0.364854 -1.086146 0.031200 0.027015 -0.082633 -0.996211 +0.000000 -0.703200 0.008400 0.000000 -0.028834 -0.999583 +0.224349 -0.667871 0.008400 0.008943 -0.027355 -0.999585 +0.000000 0.000000 0.000000 0.000000 0.000000 -1.000000 +0.879477 -1.198382 0.105600 0.390419 -0.535788 -0.748665 +0.821035 -1.118749 0.064800 0.136205 -0.186920 -0.972884 +0.679207 -0.925493 0.031200 0.051100 -0.070127 -0.996225 +0.417645 -0.569086 0.008400 0.016916 -0.023215 -0.999586 +1.198382 -0.879477 0.105600 0.535788 -0.390419 -0.748665 +1.118749 -0.821035 0.064800 0.186920 -0.136205 -0.972884 +0.925493 -0.679207 0.031200 0.070127 -0.051100 -0.996225 +0.569086 -0.417645 0.008400 0.023215 -0.016916 -0.999586 +1.406405 -0.472434 0.105600 0.630811 -0.206227 -0.748027 +1.312948 -0.441041 0.064800 0.220235 -0.072000 -0.972782 +1.086146 -0.364854 0.031200 0.082633 -0.027015 -0.996211 +0.667871 -0.224349 0.008400 0.027355 -0.008943 -0.999585 +1.480800 0.000000 0.105600 0.664364 0.000000 -0.747409 +1.382400 0.000000 0.064800 0.232118 0.000000 -0.972685 +1.143600 0.000000 0.031200 0.087099 0.000000 -0.996200 +0.703200 0.000000 0.008400 0.028834 0.000000 -0.999583 +1.406405 0.472435 0.105600 0.630811 0.206227 -0.748027 +1.312948 0.441041 0.064800 0.220235 0.072000 -0.972782 +1.086146 0.364854 0.031200 0.082633 0.027015 -0.996211 +0.667871 0.224349 0.008400 0.027355 0.008943 -0.999585 +1.198382 0.879477 0.105600 0.535788 0.390419 -0.748665 +1.118749 0.821035 0.064800 0.186920 0.136205 -0.972884 +0.925493 0.679207 0.031200 0.070127 0.051100 -0.996225 +0.569086 0.417645 0.008400 0.023215 0.016916 -0.999586 +0.879477 1.198382 0.105600 0.390419 0.535788 -0.748665 +0.821035 1.118749 0.064800 0.136205 0.186920 -0.972884 +0.679207 0.925493 0.031200 0.051100 0.070127 -0.996225 +0.417645 0.569086 0.008400 0.016916 0.023215 -0.999586 +0.472434 1.406405 0.105600 0.206227 0.630811 -0.748027 +0.441041 1.312948 0.064800 0.072000 0.220235 -0.972782 +0.364854 1.086146 0.031200 0.027015 0.082633 -0.996211 +0.224349 0.667871 0.008400 0.008943 0.027355 -0.999585 +0.000000 1.480800 0.105600 0.000000 0.664364 -0.747409 +0.000000 1.382400 0.064800 0.000000 0.232118 -0.972685 +0.000000 1.143600 0.031200 0.000000 0.087099 -0.996200 +0.000000 0.703200 0.008400 0.000000 0.028834 -0.999583 +-1.480800 0.000000 0.105600 -0.664364 0.000000 -0.747409 +-1.406405 -0.472435 0.105600 -0.630811 -0.206227 -0.748027 +-1.382400 0.000000 0.064800 -0.232118 0.000000 -0.972685 +-1.312948 -0.441041 0.064800 -0.220235 -0.072000 -0.972782 +-1.143600 0.000000 0.031200 -0.087099 0.000000 -0.996200 +-1.086146 -0.364854 0.031200 -0.082633 -0.027015 -0.996211 +-0.703200 0.000000 0.008400 -0.028834 0.000000 -0.999583 +-0.667871 -0.224349 0.008400 -0.027355 -0.008943 -0.999585 +-1.198382 -0.879477 0.105600 -0.535788 -0.390419 -0.748665 +-1.118749 -0.821035 0.064800 -0.186920 -0.136205 -0.972884 +-0.925493 -0.679207 0.031200 -0.070127 -0.051100 -0.996225 +-0.569086 -0.417645 0.008400 -0.023215 -0.016916 -0.999586 +-0.879477 -1.198382 0.105600 -0.390419 -0.535788 -0.748665 +-0.821035 -1.118749 0.064800 -0.136205 -0.186920 -0.972884 +-0.679207 -0.925493 0.031200 -0.051100 -0.070127 -0.996225 +-0.417645 -0.569086 0.008400 -0.016916 -0.023215 -0.999586 +-0.472434 -1.406405 0.105600 -0.206227 -0.630811 -0.748027 +-0.441041 -1.312948 0.064800 -0.072000 -0.220235 -0.972782 +-0.364854 -1.086146 0.031200 -0.027015 -0.082633 -0.996211 +-0.224349 -0.667871 0.008400 -0.008943 -0.027355 -0.999585 +-0.472435 1.406405 0.105600 -0.206227 0.630811 -0.748027 +-0.441041 1.312948 0.064800 -0.072000 0.220235 -0.972782 +-0.364854 1.086146 0.031200 -0.027015 0.082633 -0.996211 +-0.224349 0.667871 0.008400 -0.008943 0.027355 -0.999585 +-0.879477 1.198382 0.105600 -0.390419 0.535788 -0.748665 +-0.821035 1.118749 0.064800 -0.136205 0.186920 -0.972884 +-0.679207 0.925493 0.031200 -0.051100 0.070127 -0.996225 +-0.417645 0.569086 0.008400 -0.016916 0.023215 -0.999586 +-1.198382 0.879477 0.105600 -0.535788 0.390419 -0.748665 +-1.118749 0.821035 0.064800 -0.186920 0.136205 -0.972884 +-0.925493 0.679207 0.031200 -0.070127 0.051100 -0.996225 +-0.569086 0.417645 0.008400 -0.023215 0.016916 -0.999586 +-1.406405 0.472434 0.105600 -0.630811 0.206227 -0.748027 +-1.312948 0.441041 0.064800 -0.220235 0.072000 -0.972782 +-1.086146 0.364854 0.031200 -0.082633 0.027015 -0.996211 +-0.667871 0.224349 0.008400 -0.027355 0.008943 -0.999585 +-2.652800 0.000000 1.909800 0.678279 0.000000 -0.734802 +-2.700000 0.000000 1.800000 1.000000 0.000000 0.000000 +-2.731200 -0.144000 1.800000 0.882349 -0.470586 0.000000 +-2.682669 -0.144000 1.921219 0.629799 -0.445736 -0.636138 +-2.514400 0.000000 1.976400 0.257464 0.000000 -0.966285 +-2.539943 -0.144000 1.994746 0.252433 -0.388174 -0.886339 +-2.289600 0.000000 2.010600 0.080816 0.000000 -0.996729 +-2.307322 -0.144000 2.032503 0.079910 -0.370650 -0.925328 +-1.983200 0.000000 2.023200 0.015623 0.000000 -0.999877 +-1.989107 -0.144000 2.046413 0.015400 -0.370124 -0.928855 +-1.600000 0.000000 2.025000 0.000000 0.000000 -0.999997 +-1.589600 -0.144000 2.048400 0.000000 -0.371391 -0.928477 +-2.805600 -0.216000 1.800000 0.384615 -0.923074 0.000000 +-2.753895 -0.216000 1.948450 0.298688 -0.917366 -0.263094 +-2.600852 -0.216000 2.038493 0.140821 -0.889659 -0.434364 +-2.349581 -0.216000 2.084732 0.046970 -0.875201 -0.481465 +-2.003194 -0.216000 2.101767 0.009046 -0.873433 -0.486852 +-1.564800 -0.216000 2.104200 0.000000 -0.874153 -0.485641 +-2.894400 -0.216000 1.800000 -0.384616 -0.923077 0.000000 +-2.838906 -0.216000 1.980951 -0.308779 -0.920335 0.240078 +-2.673549 -0.216000 2.090707 -0.153234 -0.894313 0.420379 +-2.400019 -0.216000 2.147069 -0.052052 -0.876688 0.478236 +-2.020006 -0.216000 2.167834 -0.010009 -0.873532 0.486663 +-1.535200 -0.216000 2.170800 0.000000 -0.874157 0.485643 +-2.968800 -0.144000 1.800000 -0.882353 -0.470588 0.000000 +-2.910131 -0.144000 2.008181 -0.718844 -0.467462 0.514531 +-2.734458 -0.144000 2.134455 -0.333894 -0.411701 0.847945 +-2.442279 -0.144000 2.199298 -0.107561 -0.377010 0.919942 +-2.034093 -0.144000 2.223188 -0.020401 -0.370527 0.928596 +-1.510400 -0.144000 2.226600 0.000000 -0.371390 0.928475 +-3.000000 0.000000 1.800000 -1.000000 0.000000 0.000000 +-2.940000 0.000000 2.019600 -0.821368 0.000000 0.570394 +-2.760000 0.000000 2.152800 -0.375382 0.000000 0.926870 +-2.460000 0.000000 2.221200 -0.119145 0.000000 0.992876 +-2.040000 0.000000 2.246400 -0.022494 0.000000 0.999744 +-1.500000 0.000000 2.250000 0.000000 0.000000 0.999998 +-2.968800 0.144000 1.800000 -0.882353 0.470588 0.000000 +-2.910131 0.144000 2.008181 -0.718844 0.467462 0.514531 +-2.734458 0.144000 2.134455 -0.333894 0.411701 0.847945 +-2.442279 0.144000 2.199298 -0.107561 0.377010 0.919942 +-2.034093 0.144000 2.223187 -0.020401 0.370527 0.928596 +-1.510400 0.144000 2.226600 0.000000 0.371390 0.928475 +-2.894400 0.216000 1.800000 -0.384615 0.923077 0.000000 +-2.838906 0.216000 1.980951 -0.308779 0.920335 0.240078 +-2.673549 0.216000 2.090708 -0.153234 0.894313 0.420378 +-2.400019 0.216000 2.147069 -0.052052 0.876688 0.478235 +-2.020007 0.216000 2.167834 -0.010009 0.873533 0.486663 +-1.535200 0.216000 2.170800 0.000000 0.874157 0.485643 +-2.805600 0.216000 1.800000 0.384614 0.923074 0.000000 +-2.753895 0.216000 1.948450 0.298687 0.917366 -0.263094 +-2.600851 0.216000 2.038493 0.140821 0.889659 -0.434364 +-2.349581 0.216000 2.084732 0.046970 0.875201 -0.481465 +-2.003194 0.216000 2.101767 0.009046 0.873433 -0.486852 +-1.564800 0.216000 2.104200 0.000000 0.874153 -0.485641 +-2.731200 0.144000 1.800000 0.882349 0.470586 0.000000 +-2.682669 0.144000 1.921219 0.629799 0.445736 -0.636138 +-2.539943 0.144000 1.994746 0.252433 0.388174 -0.886339 +-2.307322 0.144000 2.032503 0.079910 0.370650 -0.925328 +-1.989107 0.144000 2.046413 0.015400 0.370124 -0.928855 +-1.589600 0.144000 2.048400 0.000000 0.371391 -0.928477 +-2.264800 0.000000 1.058400 0.611799 0.000000 0.791013 +-1.989600 -0.144000 0.868800 0.379236 -0.382045 0.842747 +-2.268711 -0.144000 1.032691 0.558613 -0.364714 0.744934 +-2.462400 0.000000 1.249200 0.769924 0.000000 0.638135 +-2.477875 -0.144000 1.227298 0.691468 -0.406502 0.597183 +-2.597600 0.000000 1.450800 0.884111 0.000000 0.467278 +-2.621646 -0.144000 1.433079 0.781918 -0.451570 0.429746 +-2.675200 0.000000 1.641600 0.962253 0.000000 0.272152 +-2.704570 -0.144000 1.630493 0.846995 -0.471755 0.245044 +-1.964800 -0.216000 0.794400 0.194296 -0.880806 0.431768 +-2.278035 -0.216000 0.971386 0.280289 -0.873120 0.398872 +-2.514778 -0.216000 1.175069 0.322750 -0.896343 0.303976 +-2.678983 -0.216000 1.390820 0.344194 -0.916219 0.205104 +-2.774605 -0.216000 1.604007 0.366848 -0.923633 0.111013 +-1.935200 -0.216000 0.705600 -0.194296 -0.880808 -0.431769 +-2.289165 -0.216000 0.898215 -0.265223 -0.876079 -0.402660 +-2.558823 -0.216000 1.112731 -0.307337 -0.897713 -0.315680 +-2.747418 -0.216000 1.340381 -0.335932 -0.916638 -0.216621 +-2.858195 -0.216000 1.572394 -0.365298 -0.923730 -0.115227 +-1.910400 -0.144000 0.631200 -0.379235 -0.382044 -0.842744 +-2.298490 -0.144000 0.836909 -0.493114 -0.377428 -0.783828 +-2.595725 -0.144000 1.060502 -0.614546 -0.413988 -0.671527 +-2.804756 -0.144000 1.298122 -0.736106 -0.454498 -0.501569 +-2.928231 -0.144000 1.545907 -0.838352 -0.472505 -0.271853 +-1.900000 0.000000 0.600000 -0.410363 0.000000 -0.911918 +-2.302400 0.000000 0.811200 -0.525858 0.000000 -0.850568 +-2.611200 0.000000 1.038600 -0.666422 0.000000 -0.745575 +-2.828800 0.000000 1.280400 -0.820903 0.000000 -0.571063 +-2.957600 0.000000 1.534800 -0.950315 0.000000 -0.311291 +-1.910400 0.144000 0.631200 -0.379235 0.382044 -0.842744 +-2.298490 0.144000 0.836909 -0.493114 0.377428 -0.783828 +-2.595725 0.144000 1.060502 -0.614546 0.413988 -0.671527 +-2.804756 0.144000 1.298122 -0.736106 0.454498 -0.501569 +-2.928231 0.144000 1.545907 -0.838352 0.472506 -0.271853 +-1.935200 0.216000 0.705600 -0.194296 0.880808 -0.431769 +-2.289165 0.216000 0.898215 -0.265223 0.876079 -0.402660 +-2.558823 0.216000 1.112731 -0.307337 0.897713 -0.315680 +-2.747418 0.216000 1.340381 -0.335932 0.916638 -0.216621 +-2.858196 0.216000 1.572394 -0.365297 0.923730 -0.115227 +-1.964800 0.216000 0.794400 0.194296 0.880806 0.431768 +-2.278035 0.216000 0.971386 0.280289 0.873120 0.398872 +-2.514778 0.216000 1.175069 0.322750 0.896343 0.303976 +-2.678983 0.216000 1.390819 0.344194 0.916219 0.205104 +-2.774605 0.216000 1.604007 0.366849 0.923633 0.111013 +-1.989600 0.144000 0.868800 0.379236 0.382045 0.842747 +-2.268710 0.144000 1.032691 0.558613 0.364714 0.744935 +-2.477875 0.144000 1.227298 0.691468 0.406502 0.597183 +-2.621645 0.144000 1.433079 0.781918 0.451570 0.429746 +-2.704570 0.144000 1.630493 0.846995 0.471755 0.245044 +2.528800 0.000000 2.183400 -0.901385 0.000000 0.433018 +2.700000 0.000000 2.400000 -0.599998 0.000000 0.799997 +2.762400 -0.120000 2.400000 -0.456679 -0.584548 0.670626 +2.569735 -0.140467 2.173728 -0.695153 -0.572370 0.434915 +2.434400 0.000000 1.927200 -0.948683 0.000000 0.316228 +2.467347 -0.189274 1.900368 -0.806605 -0.470480 0.357817 +2.325600 0.000000 1.681800 -0.836177 0.000000 0.548460 +2.355053 -0.247526 1.634064 -0.703305 -0.462338 0.539998 +2.111200 0.000000 1.497600 -0.417663 0.000000 0.908600 +2.132666 -0.296333 1.428960 -0.336099 -0.511011 0.791137 +1.700000 0.000000 1.425000 0.000000 0.000000 0.999999 +1.700000 -0.316800 1.339200 -0.020447 -0.554584 0.831876 +2.911200 -0.180000 2.400000 -0.163754 -0.943222 0.288977 +2.667347 -0.210701 2.150665 -0.216744 -0.928832 0.300487 +2.545914 -0.283910 1.836384 -0.225716 -0.923283 0.310808 +2.425287 -0.371290 1.520232 -0.144680 -0.927429 0.344881 +2.183853 -0.444499 1.265280 -0.052027 -0.935870 0.348483 +1.700000 -0.475200 1.134600 -0.023270 -0.948426 0.316142 +3.088800 -0.180000 2.400000 0.161183 -0.928415 -0.334758 +2.783853 -0.210701 2.123136 0.293016 -0.956011 -0.013319 +2.639686 -0.283910 1.760016 0.490797 -0.869914 0.048673 +2.509114 -0.371290 1.384368 0.538925 -0.840157 -0.060780 +2.244947 -0.444499 1.069920 0.312657 -0.914026 -0.258463 +1.700000 -0.475200 0.890400 0.037642 -0.948010 -0.316003 +3.237600 -0.120000 2.400000 0.354182 -0.453353 -0.817936 +2.881466 -0.140467 2.100072 0.714527 -0.579088 -0.392560 +2.718253 -0.189274 1.696032 0.875791 -0.442525 -0.192752 +2.579347 -0.247526 1.270536 0.854131 -0.405027 -0.326210 +2.296135 -0.296333 0.906240 0.550028 -0.485514 -0.679517 +1.700000 -0.316800 0.685800 0.123484 -0.550453 -0.825679 +3.300000 0.000000 2.400000 0.384614 0.000000 -0.923073 +2.922400 0.000000 2.090400 0.840531 0.000000 -0.541764 +2.751200 0.000000 1.669200 0.962006 0.000000 -0.273019 +2.608800 0.000000 1.222800 0.916944 0.000000 -0.399005 +2.317600 0.000000 0.837600 0.608573 0.000000 -0.793498 +1.700000 0.000000 0.600000 0.158678 0.000000 -0.987330 +3.237600 0.120000 2.400000 0.354182 0.453353 -0.817936 +2.881466 0.140467 2.100072 0.714527 0.579088 -0.392560 +2.718253 0.189274 1.696032 0.875791 0.442525 -0.192752 +2.579347 0.247526 1.270536 0.854131 0.405027 -0.326210 +2.296135 0.296333 0.906240 0.550028 0.485514 -0.679517 +1.700000 0.316800 0.685800 0.123484 0.550453 -0.825679 +3.088800 0.180000 2.400000 0.161183 0.928415 -0.334758 +2.783853 0.210701 2.123136 0.293015 0.956010 -0.013319 +2.639687 0.283910 1.760016 0.490797 0.869914 0.048673 +2.509114 0.371290 1.384368 0.538925 0.840157 -0.060780 +2.244947 0.444499 1.069920 0.312657 0.914026 -0.258463 +1.700000 0.475200 0.890400 0.037642 0.948010 -0.316003 +2.911200 0.180000 2.400000 -0.163754 0.943222 0.288977 +2.667347 0.210701 2.150664 -0.216744 0.928832 0.300487 +2.545914 0.283910 1.836384 -0.225716 0.923282 0.310808 +2.425287 0.371290 1.520232 -0.144680 0.927429 0.344881 +2.183853 0.444499 1.265280 -0.052027 0.935870 0.348483 +1.700000 0.475200 1.134600 -0.023270 0.948426 0.316142 +2.762400 0.120000 2.400000 -0.456678 0.584549 0.670626 +2.569734 0.140467 2.173728 -0.695153 0.572369 0.434915 +2.467347 0.189274 1.900368 -0.806605 0.470480 0.357817 +2.355053 0.247526 1.634064 -0.703305 0.462338 0.539998 +2.132666 0.296333 1.428960 -0.336099 0.511011 0.791137 +1.700000 0.316800 1.339200 -0.020447 0.554584 0.831877 +2.837600 0.000000 2.436000 0.849056 0.000000 -0.528304 +2.800000 0.000000 2.400000 0.599997 0.000000 -0.800000 +2.841600 -0.072000 2.400000 0.439826 0.625530 -0.644411 +2.888602 -0.076992 2.437685 0.516600 0.831320 -0.205017 +2.836800 0.000000 2.454000 0.472217 0.000000 0.881480 +2.896205 -0.088896 2.456246 0.224528 0.423910 0.877431 +2.807200 0.000000 2.454000 -0.215408 0.000000 0.976522 +2.872388 -0.103104 2.455966 -0.168884 -0.217723 0.961285 +2.758400 0.000000 2.436000 -0.439383 0.000000 0.898295 +2.825126 -0.115008 2.437124 -0.334755 -0.458291 0.823348 +2.940800 -0.108000 2.400000 0.149135 0.954466 -0.258366 +3.010221 -0.115488 2.441703 0.123177 0.962458 0.241862 +3.037863 -0.133344 2.461603 0.021956 0.416878 0.908693 +3.027834 -0.154656 2.460653 -0.082283 -0.381857 0.920550 +2.984244 -0.172512 2.439802 -0.131880 -0.781597 0.609678 +3.059200 -0.108000 2.400000 -0.147596 0.944613 0.293111 +3.155379 -0.115488 2.446498 -0.127286 0.787953 0.602428 +3.206938 -0.133344 2.467997 -0.079448 0.324229 0.942633 +3.213367 -0.154656 2.466247 0.054175 -0.554736 0.830261 +3.174157 -0.172512 2.442999 0.150468 -0.980604 0.125601 +3.158400 -0.072000 2.400000 -0.360813 0.513155 0.778771 +3.276999 -0.076992 2.450516 -0.285775 0.419575 0.861559 +3.348595 -0.088896 2.473354 -0.149331 0.185220 0.971282 +3.368813 -0.103104 2.470935 0.459685 -0.738552 0.493175 +3.333274 -0.115008 2.445677 0.445183 -0.620266 -0.645815 +3.200000 0.000000 2.400000 -0.410363 0.000000 0.911919 +3.328000 0.000000 2.452200 -0.335142 0.000000 0.942166 +3.408000 0.000000 2.475600 -0.180328 0.000000 0.983607 +3.434001 0.000000 2.472900 0.980198 0.000000 -0.198018 +3.400000 0.000000 2.446800 0.487997 0.000000 -0.872840 +3.158400 0.072000 2.400000 -0.360812 -0.513156 0.778771 +3.276999 0.076992 2.450516 -0.285775 -0.419575 0.861559 +3.348595 0.088896 2.473354 -0.149330 -0.185221 0.971282 +3.368814 0.103104 2.470935 0.459685 0.738552 0.493175 +3.333274 0.115008 2.445677 0.445183 0.620266 -0.645815 +3.059200 0.108000 2.400000 -0.147596 -0.944613 0.293111 +3.155379 0.115488 2.446498 -0.127286 -0.787953 0.602428 +3.206938 0.133344 2.467997 -0.079448 -0.324229 0.942633 +3.213367 0.154656 2.466248 0.054174 0.554736 0.830261 +3.174157 0.172512 2.442999 0.150468 0.980604 0.125601 +2.940800 0.108000 2.400000 0.149135 -0.954466 -0.258366 +3.010221 0.115488 2.441703 0.123177 -0.962458 0.241862 +3.037863 0.133344 2.461603 0.021956 -0.416878 0.908693 +3.027834 0.154656 2.460653 -0.082283 0.381857 0.920550 +2.984243 0.172512 2.439802 -0.131879 0.781597 0.609677 +2.841600 0.072000 2.400000 0.439825 -0.625530 -0.644411 +2.888602 0.076992 2.437685 0.516600 -0.831320 -0.205017 +2.896205 0.088896 2.456246 0.224528 -0.423910 0.877431 +2.872387 0.103104 2.455966 -0.168884 0.217723 0.961285 +2.825126 0.115008 2.437124 -0.334755 0.458291 0.823348 + +1600 +0 1 2 +0 2 3 +4 0 3 +4 3 5 +6 4 5 +6 5 7 +8 6 7 +8 7 9 +10 8 9 +10 9 11 +3 2 12 +3 12 13 +5 3 13 +5 13 14 +7 5 14 +7 14 15 +9 7 15 +9 15 16 +11 9 16 +11 16 17 +13 12 18 +13 18 19 +14 13 19 +14 19 20 +15 14 20 +15 20 21 +16 15 21 +16 21 22 +17 16 22 +17 22 23 +19 18 24 +19 24 25 +20 19 25 +20 25 26 +21 20 26 +21 26 27 +22 21 27 +22 27 28 +23 22 28 +23 28 29 +25 24 30 +25 30 31 +26 25 31 +26 31 32 +27 26 32 +27 32 33 +28 27 33 +28 33 34 +29 28 34 +29 34 35 +36 37 38 +36 38 39 +40 36 39 +40 39 41 +42 40 41 +42 41 43 +44 42 43 +44 43 45 +46 44 45 +46 45 47 +39 38 48 +39 48 49 +41 39 49 +41 49 50 +43 41 50 +43 50 51 +45 43 51 +45 51 52 +47 45 52 +47 52 53 +49 48 54 +49 54 55 +50 49 55 +50 55 56 +51 50 56 +51 56 57 +52 51 57 +52 57 58 +53 52 58 +53 58 59 +55 54 60 +55 60 61 +56 55 61 +56 61 62 +57 56 62 +57 62 63 +58 57 63 +58 63 64 +59 58 64 +59 64 65 +61 60 1 +61 1 0 +62 61 0 +62 0 4 +63 62 4 +63 4 6 +64 63 6 +64 6 8 +65 64 8 +65 8 10 +31 30 66 +31 66 67 +32 31 67 +32 67 68 +33 32 68 +33 68 69 +34 33 69 +34 69 70 +35 34 70 +35 70 71 +67 66 72 +67 72 73 +68 67 73 +68 73 74 +69 68 74 +69 74 75 +70 69 75 +70 75 76 +71 70 76 +71 76 77 +73 72 78 +73 78 79 +74 73 79 +74 79 80 +75 74 80 +75 80 81 +76 75 81 +76 81 82 +77 76 82 +77 82 83 +79 78 84 +79 84 85 +80 79 85 +80 85 86 +81 80 86 +81 86 87 +82 81 87 +82 87 88 +83 82 88 +83 88 89 +85 84 90 +85 90 91 +86 85 91 +86 91 92 +87 86 92 +87 92 93 +88 87 93 +88 93 94 +89 88 94 +89 94 95 +91 90 96 +91 96 97 +92 91 97 +92 97 98 +93 92 98 +93 98 99 +94 93 99 +94 99 100 +95 94 100 +95 100 101 +97 96 102 +97 102 103 +98 97 103 +98 103 104 +99 98 104 +99 104 105 +100 99 105 +100 105 106 +101 100 106 +101 106 107 +103 102 108 +103 108 109 +104 103 109 +104 109 110 +105 104 110 +105 110 111 +106 105 111 +106 111 112 +107 106 112 +107 112 113 +109 108 114 +109 114 115 +110 109 115 +110 115 116 +111 110 116 +111 116 117 +112 111 117 +112 117 118 +113 112 118 +113 118 119 +115 114 37 +115 37 36 +116 115 36 +116 36 40 +117 116 40 +117 40 42 +118 117 42 +118 42 44 +119 118 44 +119 44 46 +120 121 122 +120 122 123 +124 120 123 +124 123 125 +126 124 125 +126 125 127 +128 126 127 +128 127 129 +1 128 129 +1 129 2 +123 122 130 +123 130 131 +125 123 131 +125 131 132 +127 125 132 +127 132 133 +129 127 133 +129 133 134 +2 129 134 +2 134 12 +131 130 135 +131 135 136 +132 131 136 +132 136 137 +133 132 137 +133 137 138 +134 133 138 +134 138 139 +12 134 139 +12 139 18 +136 135 140 +136 140 141 +137 136 141 +137 141 142 +138 137 142 +138 142 143 +139 138 143 +139 143 144 +18 139 144 +18 144 24 +141 140 145 +141 145 146 +142 141 146 +142 146 147 +143 142 147 +143 147 148 +144 143 148 +144 148 149 +24 144 149 +24 149 30 +150 151 152 +150 152 153 +154 150 153 +154 153 155 +156 154 155 +156 155 157 +158 156 157 +158 157 159 +37 158 159 +37 159 38 +153 152 160 +153 160 161 +155 153 161 +155 161 162 +157 155 162 +157 162 163 +159 157 163 +159 163 164 +38 159 164 +38 164 48 +161 160 165 +161 165 166 +162 161 166 +162 166 167 +163 162 167 +163 167 168 +164 163 168 +164 168 169 +48 164 169 +48 169 54 +166 165 170 +166 170 171 +167 166 171 +167 171 172 +168 167 172 +168 172 173 +169 168 173 +169 173 174 +54 169 174 +54 174 60 +171 170 121 +171 121 120 +172 171 120 +172 120 124 +173 172 124 +173 124 126 +174 173 126 +174 126 128 +60 174 128 +60 128 1 +146 145 175 +146 175 176 +147 146 176 +147 176 177 +148 147 177 +148 177 178 +149 148 178 +149 178 179 +30 149 179 +30 179 66 +176 175 180 +176 180 181 +177 176 181 +177 181 182 +178 177 182 +178 182 183 +179 178 183 +179 183 184 +66 179 184 +66 184 72 +181 180 185 +181 185 186 +182 181 186 +182 186 187 +183 182 187 +183 187 188 +184 183 188 +184 188 189 +72 184 189 +72 189 78 +186 185 190 +186 190 191 +187 186 191 +187 191 192 +188 187 192 +188 192 193 +189 188 193 +189 193 194 +78 189 194 +78 194 84 +191 190 195 +191 195 196 +192 191 196 +192 196 197 +193 192 197 +193 197 198 +194 193 198 +194 198 199 +84 194 199 +84 199 90 +196 195 200 +196 200 201 +197 196 201 +197 201 202 +198 197 202 +198 202 203 +199 198 203 +199 203 204 +90 199 204 +90 204 96 +201 200 205 +201 205 206 +202 201 206 +202 206 207 +203 202 207 +203 207 208 +204 203 208 +204 208 209 +96 204 209 +96 209 102 +206 205 210 +206 210 211 +207 206 211 +207 211 212 +208 207 212 +208 212 213 +209 208 213 +209 213 214 +102 209 214 +102 214 108 +211 210 215 +211 215 216 +212 211 216 +212 216 217 +213 212 217 +213 217 218 +214 213 218 +214 218 219 +108 214 219 +108 219 114 +216 215 151 +216 151 150 +217 216 150 +217 150 154 +218 217 154 +218 154 156 +219 218 156 +219 156 158 +114 219 158 +114 158 37 +220 221 222 +220 222 223 +224 220 223 +224 223 225 +226 224 225 +226 225 227 +228 226 227 +228 227 229 +121 228 229 +121 229 122 +223 222 230 +223 230 231 +225 223 231 +225 231 232 +227 225 232 +227 232 233 +229 227 233 +229 233 234 +122 229 234 +122 234 130 +231 230 235 +231 235 236 +232 231 236 +232 236 237 +233 232 237 +233 237 238 +234 233 238 +234 238 239 +130 234 239 +130 239 135 +236 235 240 +236 240 241 +237 236 241 +237 241 242 +238 237 242 +238 242 243 +239 238 243 +239 243 244 +135 239 244 +135 244 140 +241 240 245 +241 245 246 +242 241 246 +242 246 247 +243 242 247 +243 247 248 +244 243 248 +244 248 249 +140 244 249 +140 249 145 +250 251 252 +250 252 253 +254 250 253 +254 253 255 +256 254 255 +256 255 257 +258 256 257 +258 257 259 +151 258 259 +151 259 152 +253 252 260 +253 260 261 +255 253 261 +255 261 262 +257 255 262 +257 262 263 +259 257 263 +259 263 264 +152 259 264 +152 264 160 +261 260 265 +261 265 266 +262 261 266 +262 266 267 +263 262 267 +263 267 268 +264 263 268 +264 268 269 +160 264 269 +160 269 165 +266 265 270 +266 270 271 +267 266 271 +267 271 272 +268 267 272 +268 272 273 +269 268 273 +269 273 274 +165 269 274 +165 274 170 +271 270 221 +271 221 220 +272 271 220 +272 220 224 +273 272 224 +273 224 226 +274 273 226 +274 226 228 +170 274 228 +170 228 121 +246 245 275 +246 275 276 +247 246 276 +247 276 277 +248 247 277 +248 277 278 +249 248 278 +249 278 279 +145 249 279 +145 279 175 +276 275 280 +276 280 281 +277 276 281 +277 281 282 +278 277 282 +278 282 283 +279 278 283 +279 283 284 +175 279 284 +175 284 180 +281 280 285 +281 285 286 +282 281 286 +282 286 287 +283 282 287 +283 287 288 +284 283 288 +284 288 289 +180 284 289 +180 289 185 +286 285 290 +286 290 291 +287 286 291 +287 291 292 +288 287 292 +288 292 293 +289 288 293 +289 293 294 +185 289 294 +185 294 190 +291 290 295 +291 295 296 +292 291 296 +292 296 297 +293 292 297 +293 297 298 +294 293 298 +294 298 299 +190 294 299 +190 299 195 +296 295 300 +296 300 301 +297 296 301 +297 301 302 +298 297 302 +298 302 303 +299 298 303 +299 303 304 +195 299 304 +195 304 200 +301 300 305 +301 305 306 +302 301 306 +302 306 307 +303 302 307 +303 307 308 +304 303 308 +304 308 309 +200 304 309 +200 309 205 +306 305 310 +306 310 311 +307 306 311 +307 311 312 +308 307 312 +308 312 313 +309 308 313 +309 313 314 +205 309 314 +205 314 210 +311 310 315 +311 315 316 +312 311 316 +312 316 317 +313 312 317 +313 317 318 +314 313 318 +314 318 319 +210 314 319 +210 319 215 +316 315 251 +316 251 250 +317 316 250 +317 250 254 +318 317 254 +318 254 256 +319 318 256 +319 256 258 +215 319 258 +215 258 151 +320 321 322 +320 322 323 +324 320 323 +324 323 325 +326 324 325 +326 325 327 +328 326 327 +328 327 329 +330 328 329 +330 329 330 +323 322 331 +323 331 332 +325 323 332 +325 332 333 +327 325 333 +327 333 334 +329 327 334 +329 334 335 +330 329 335 +330 335 330 +332 331 336 +332 336 337 +333 332 337 +333 337 338 +334 333 338 +334 338 339 +335 334 339 +335 339 340 +330 335 340 +330 340 330 +337 336 341 +337 341 342 +338 337 342 +338 342 343 +339 338 343 +339 343 344 +340 339 344 +340 344 345 +330 340 345 +330 345 330 +342 341 346 +342 346 347 +343 342 347 +343 347 348 +344 343 348 +344 348 349 +345 344 349 +345 349 350 +330 345 350 +330 350 330 +351 352 353 +351 353 354 +355 351 354 +355 354 356 +357 355 356 +357 356 358 +359 357 358 +359 358 360 +330 359 360 +330 360 330 +354 353 361 +354 361 362 +356 354 362 +356 362 363 +358 356 363 +358 363 364 +360 358 364 +360 364 365 +330 360 365 +330 365 330 +362 361 366 +362 366 367 +363 362 367 +363 367 368 +364 363 368 +364 368 369 +365 364 369 +365 369 370 +330 365 370 +330 370 330 +367 366 371 +367 371 372 +368 367 372 +368 372 373 +369 368 373 +369 373 374 +370 369 374 +370 374 375 +330 370 375 +330 375 330 +372 371 321 +372 321 320 +373 372 320 +373 320 324 +374 373 324 +374 324 326 +375 374 326 +375 326 328 +330 375 328 +330 328 330 +347 346 376 +347 376 377 +348 347 377 +348 377 378 +349 348 378 +349 378 379 +350 349 379 +350 379 380 +330 350 380 +330 380 330 +377 376 381 +377 381 382 +378 377 382 +378 382 383 +379 378 383 +379 383 384 +380 379 384 +380 384 385 +330 380 385 +330 385 330 +382 381 386 +382 386 387 +383 382 387 +383 387 388 +384 383 388 +384 388 389 +385 384 389 +385 389 390 +330 385 390 +330 390 330 +387 386 391 +387 391 392 +388 387 392 +388 392 393 +389 388 393 +389 393 394 +390 389 394 +390 394 395 +330 390 395 +330 395 330 +392 391 396 +392 396 397 +393 392 397 +393 397 398 +394 393 398 +394 398 399 +395 394 399 +395 399 400 +330 395 400 +330 400 330 +397 396 401 +397 401 402 +398 397 402 +398 402 403 +399 398 403 +399 403 404 +400 399 404 +400 404 405 +330 400 405 +330 405 330 +402 401 406 +402 406 407 +403 402 407 +403 407 408 +404 403 408 +404 408 409 +405 404 409 +405 409 410 +330 405 410 +330 410 330 +407 406 411 +407 411 412 +408 407 412 +408 412 413 +409 408 413 +409 413 414 +410 409 414 +410 414 415 +330 410 415 +330 415 330 +412 411 416 +412 416 417 +413 412 417 +413 417 418 +414 413 418 +414 418 419 +415 414 419 +415 419 420 +330 415 420 +330 420 330 +417 416 352 +417 352 351 +418 417 351 +418 351 355 +419 418 355 +419 355 357 +420 419 357 +420 357 359 +330 420 359 +330 359 330 +421 422 423 +421 423 424 +425 421 424 +425 424 426 +427 425 426 +427 426 428 +429 427 428 +429 428 430 +321 429 430 +321 430 322 +424 423 431 +424 431 432 +426 424 432 +426 432 433 +428 426 433 +428 433 434 +430 428 434 +430 434 435 +322 430 435 +322 435 331 +432 431 436 +432 436 437 +433 432 437 +433 437 438 +434 433 438 +434 438 439 +435 434 439 +435 439 440 +331 435 440 +331 440 336 +437 436 441 +437 441 442 +438 437 442 +438 442 443 +439 438 443 +439 443 444 +440 439 444 +440 444 445 +336 440 445 +336 445 341 +442 441 446 +442 446 447 +443 442 447 +443 447 448 +444 443 448 +444 448 449 +445 444 449 +445 449 450 +341 445 450 +341 450 346 +451 452 453 +451 453 454 +455 451 454 +455 454 456 +457 455 456 +457 456 458 +459 457 458 +459 458 460 +352 459 460 +352 460 353 +454 453 461 +454 461 462 +456 454 462 +456 462 463 +458 456 463 +458 463 464 +460 458 464 +460 464 465 +353 460 465 +353 465 361 +462 461 466 +462 466 467 +463 462 467 +463 467 468 +464 463 468 +464 468 469 +465 464 469 +465 469 470 +361 465 470 +361 470 366 +467 466 471 +467 471 472 +468 467 472 +468 472 473 +469 468 473 +469 473 474 +470 469 474 +470 474 475 +366 470 475 +366 475 371 +472 471 422 +472 422 421 +473 472 421 +473 421 425 +474 473 425 +474 425 427 +475 474 427 +475 427 429 +371 475 429 +371 429 321 +447 446 476 +447 476 477 +448 447 477 +448 477 478 +449 448 478 +449 478 479 +450 449 479 +450 479 480 +346 450 480 +346 480 376 +477 476 481 +477 481 482 +478 477 482 +478 482 483 +479 478 483 +479 483 484 +480 479 484 +480 484 485 +376 480 485 +376 485 381 +482 481 486 +482 486 487 +483 482 487 +483 487 488 +484 483 488 +484 488 489 +485 484 489 +485 489 490 +381 485 490 +381 490 386 +487 486 491 +487 491 492 +488 487 492 +488 492 493 +489 488 493 +489 493 494 +490 489 494 +490 494 495 +386 490 495 +386 495 391 +492 491 496 +492 496 497 +493 492 497 +493 497 498 +494 493 498 +494 498 499 +495 494 499 +495 499 500 +391 495 500 +391 500 396 +497 496 501 +497 501 502 +498 497 502 +498 502 503 +499 498 503 +499 503 504 +500 499 504 +500 504 505 +396 500 505 +396 505 401 +502 501 506 +502 506 507 +503 502 507 +503 507 508 +504 503 508 +504 508 509 +505 504 509 +505 509 510 +401 505 510 +401 510 406 +507 506 511 +507 511 512 +508 507 512 +508 512 513 +509 508 513 +509 513 514 +510 509 514 +510 514 515 +406 510 515 +406 515 411 +512 511 516 +512 516 517 +513 512 517 +513 517 518 +514 513 518 +514 518 519 +515 514 519 +515 519 520 +411 515 520 +411 520 416 +517 516 452 +517 452 451 +518 517 451 +518 451 455 +519 518 455 +519 455 457 +520 519 457 +520 457 459 +416 520 459 +416 459 352 +521 245 240 +521 240 522 +523 521 522 +523 522 524 +525 523 524 +525 524 526 +527 525 526 +527 526 528 +529 527 528 +529 528 529 +522 240 235 +522 235 530 +524 522 530 +524 530 531 +526 524 531 +526 531 532 +528 526 532 +528 532 533 +529 528 533 +529 533 529 +530 235 230 +530 230 534 +531 530 534 +531 534 535 +532 531 535 +532 535 536 +533 532 536 +533 536 537 +529 533 537 +529 537 529 +534 230 222 +534 222 538 +535 534 538 +535 538 539 +536 535 539 +536 539 540 +537 536 540 +537 540 541 +529 537 541 +529 541 529 +538 222 221 +538 221 542 +539 538 542 +539 542 543 +540 539 543 +540 543 544 +541 540 544 +541 544 545 +529 541 545 +529 545 529 +542 221 270 +542 270 546 +543 542 546 +543 546 547 +544 543 547 +544 547 548 +545 544 548 +545 548 549 +529 545 549 +529 549 529 +546 270 265 +546 265 550 +547 546 550 +547 550 551 +548 547 551 +548 551 552 +549 548 552 +549 552 553 +529 549 553 +529 553 529 +550 265 260 +550 260 554 +551 550 554 +551 554 555 +552 551 555 +552 555 556 +553 552 556 +553 556 557 +529 553 557 +529 557 529 +554 260 252 +554 252 558 +555 554 558 +555 558 559 +556 555 559 +556 559 560 +557 556 560 +557 560 561 +529 557 561 +529 561 529 +558 252 251 +558 251 562 +559 558 562 +559 562 563 +560 559 563 +560 563 564 +561 560 564 +561 564 565 +529 561 565 +529 565 529 +566 295 290 +566 290 567 +568 566 567 +568 567 569 +570 568 569 +570 569 571 +572 570 571 +572 571 573 +529 572 573 +529 573 529 +567 290 285 +567 285 574 +569 567 574 +569 574 575 +571 569 575 +571 575 576 +573 571 576 +573 576 577 +529 573 577 +529 577 529 +574 285 280 +574 280 578 +575 574 578 +575 578 579 +576 575 579 +576 579 580 +577 576 580 +577 580 581 +529 577 581 +529 581 529 +578 280 275 +578 275 582 +579 578 582 +579 582 583 +580 579 583 +580 583 584 +581 580 584 +581 584 585 +529 581 585 +529 585 529 +582 275 245 +582 245 521 +583 582 521 +583 521 523 +584 583 523 +584 523 525 +585 584 525 +585 525 527 +529 585 527 +529 527 529 +562 251 315 +562 315 586 +563 562 586 +563 586 587 +564 563 587 +564 587 588 +565 564 588 +565 588 589 +529 565 589 +529 589 529 +586 315 310 +586 310 590 +587 586 590 +587 590 591 +588 587 591 +588 591 592 +589 588 592 +589 592 593 +529 589 593 +529 593 529 +590 310 305 +590 305 594 +591 590 594 +591 594 595 +592 591 595 +592 595 596 +593 592 596 +593 596 597 +529 593 597 +529 597 529 +594 305 300 +594 300 598 +595 594 598 +595 598 599 +596 595 599 +596 599 600 +597 596 600 +597 600 601 +529 597 601 +529 601 529 +598 300 295 +598 295 566 +599 598 566 +599 566 568 +600 599 568 +600 568 570 +601 600 570 +601 570 572 +529 601 572 +529 572 529 +602 603 604 +602 604 605 +606 602 605 +606 605 607 +608 606 607 +608 607 609 +610 608 609 +610 609 611 +612 610 611 +612 611 613 +605 604 614 +605 614 615 +607 605 615 +607 615 616 +609 607 616 +609 616 617 +611 609 617 +611 617 618 +613 611 618 +613 618 619 +615 614 620 +615 620 621 +616 615 621 +616 621 622 +617 616 622 +617 622 623 +618 617 623 +618 623 624 +619 618 624 +619 624 625 +621 620 626 +621 626 627 +622 621 627 +622 627 628 +623 622 628 +623 628 629 +624 623 629 +624 629 630 +625 624 630 +625 630 631 +627 626 632 +627 632 633 +628 627 633 +628 633 634 +629 628 634 +629 634 635 +630 629 635 +630 635 636 +631 630 636 +631 636 637 +633 632 638 +633 638 639 +634 633 639 +634 639 640 +635 634 640 +635 640 641 +636 635 641 +636 641 642 +637 636 642 +637 642 643 +639 638 644 +639 644 645 +640 639 645 +640 645 646 +641 640 646 +641 646 647 +642 641 647 +642 647 648 +643 642 648 +643 648 649 +645 644 650 +645 650 651 +646 645 651 +646 651 652 +647 646 652 +647 652 653 +648 647 653 +648 653 654 +649 648 654 +649 654 655 +651 650 656 +651 656 657 +652 651 657 +652 657 658 +653 652 658 +653 658 659 +654 653 659 +654 659 660 +655 654 660 +655 660 661 +657 656 603 +657 603 602 +658 657 602 +658 602 606 +659 658 606 +659 606 608 +660 659 608 +660 608 610 +661 660 610 +661 610 612 +662 195 663 +662 663 664 +665 662 664 +665 664 666 +667 665 666 +667 666 668 +669 667 668 +669 668 670 +603 669 670 +603 670 604 +664 663 671 +664 671 672 +666 664 672 +666 672 673 +668 666 673 +668 673 674 +670 668 674 +670 674 675 +604 670 675 +604 675 614 +672 671 676 +672 676 677 +673 672 677 +673 677 678 +674 673 678 +674 678 679 +675 674 679 +675 679 680 +614 675 680 +614 680 620 +677 676 681 +677 681 682 +678 677 682 +678 682 683 +679 678 683 +679 683 684 +680 679 684 +680 684 685 +620 680 685 +620 685 626 +682 681 686 +682 686 687 +683 682 687 +683 687 688 +684 683 688 +684 688 689 +685 684 689 +685 689 690 +626 685 690 +626 690 632 +687 686 691 +687 691 692 +688 687 692 +688 692 693 +689 688 693 +689 693 694 +690 689 694 +690 694 695 +632 690 695 +632 695 638 +692 691 696 +692 696 697 +693 692 697 +693 697 698 +694 693 698 +694 698 699 +695 694 699 +695 699 700 +638 695 700 +638 700 644 +697 696 701 +697 701 702 +698 697 702 +698 702 703 +699 698 703 +699 703 704 +700 699 704 +700 704 705 +644 700 705 +644 705 650 +702 701 706 +702 706 707 +703 702 707 +703 707 708 +704 703 708 +704 708 709 +705 704 709 +705 709 710 +650 705 710 +650 710 656 +707 706 195 +707 195 662 +708 707 662 +708 662 665 +709 708 665 +709 665 667 +710 709 667 +710 667 669 +656 710 669 +656 669 603 +711 712 713 +711 713 714 +715 711 714 +715 714 716 +717 715 716 +717 716 718 +719 717 718 +719 718 720 +721 719 720 +721 720 722 +714 713 723 +714 723 724 +716 714 724 +716 724 725 +718 716 725 +718 725 726 +720 718 726 +720 726 727 +722 720 727 +722 727 728 +724 723 729 +724 729 730 +725 724 730 +725 730 731 +726 725 731 +726 731 732 +727 726 732 +727 732 733 +728 727 733 +728 733 734 +730 729 735 +730 735 736 +731 730 736 +731 736 737 +732 731 737 +732 737 738 +733 732 738 +733 738 739 +734 733 739 +734 739 740 +736 735 741 +736 741 742 +737 736 742 +737 742 743 +738 737 743 +738 743 744 +739 738 744 +739 744 745 +740 739 745 +740 745 746 +742 741 747 +742 747 748 +743 742 748 +743 748 749 +744 743 749 +744 749 750 +745 744 750 +745 750 751 +746 745 751 +746 751 752 +748 747 753 +748 753 754 +749 748 754 +749 754 755 +750 749 755 +750 755 756 +751 750 756 +751 756 757 +752 751 757 +752 757 758 +754 753 759 +754 759 760 +755 754 760 +755 760 761 +756 755 761 +756 761 762 +757 756 762 +757 762 763 +758 757 763 +758 763 764 +760 759 765 +760 765 766 +761 760 766 +761 766 767 +762 761 767 +762 767 768 +763 762 768 +763 768 769 +764 763 769 +764 769 770 +766 765 712 +766 712 711 +767 766 711 +767 711 715 +768 767 715 +768 715 717 +769 768 717 +769 717 719 +770 769 719 +770 719 721 +771 772 773 +771 773 774 +775 771 774 +775 774 776 +777 775 776 +777 776 778 +779 777 778 +779 778 780 +712 779 780 +712 780 713 +774 773 781 +774 781 782 +776 774 782 +776 782 783 +778 776 783 +778 783 784 +780 778 784 +780 784 785 +713 780 785 +713 785 723 +782 781 786 +782 786 787 +783 782 787 +783 787 788 +784 783 788 +784 788 789 +785 784 789 +785 789 790 +723 785 790 +723 790 729 +787 786 791 +787 791 792 +788 787 792 +788 792 793 +789 788 793 +789 793 794 +790 789 794 +790 794 795 +729 790 795 +729 795 735 +792 791 796 +792 796 797 +793 792 797 +793 797 798 +794 793 798 +794 798 799 +795 794 799 +795 799 800 +735 795 800 +735 800 741 +797 796 801 +797 801 802 +798 797 802 +798 802 803 +799 798 803 +799 803 804 +800 799 804 +800 804 805 +741 800 805 +741 805 747 +802 801 806 +802 806 807 +803 802 807 +803 807 808 +804 803 808 +804 808 809 +805 804 809 +805 809 810 +747 805 810 +747 810 753 +807 806 811 +807 811 812 +808 807 812 +808 812 813 +809 808 813 +809 813 814 +810 809 814 +810 814 815 +753 810 815 +753 815 759 +812 811 816 +812 816 817 +813 812 817 +813 817 818 +814 813 818 +814 818 819 +815 814 819 +815 819 820 +759 815 820 +759 820 765 +817 816 772 +817 772 771 +818 817 771 +818 771 775 +819 818 775 +819 775 777 +820 819 777 +820 777 779 +765 820 779 +765 779 712 + diff --git a/src/apps/glteapot/teapot.h b/src/apps/glteapot/teapot.h new file mode 100644 index 0000000000..b6077ffc72 --- /dev/null +++ b/src/apps/glteapot/teapot.h @@ -0,0 +1,9 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include "GL/gl.h" + +void auxSolidTeapot(GLdouble scale); +void auxWireTeapot(GLdouble scale); diff --git a/src/apps/glteapot/teapot_main.cpp b/src/apps/glteapot/teapot_main.cpp new file mode 100644 index 0000000000..5b8ab8b71e --- /dev/null +++ b/src/apps/glteapot/teapot_main.cpp @@ -0,0 +1,206 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#include +#include +#include "ObjectView.h" + +class QuitWindow : public BDirectWindow +{ +public: + QuitWindow(BRect r, char *name, window_type wt, ulong something); + + virtual bool QuitRequested(); + virtual void DirectConnected( direct_buffer_info *info ); + ObjectView *bgl; + +}; + +QuitWindow::QuitWindow(BRect r, char *name, window_type wt, ulong something) + : BDirectWindow(r,name,wt,something) +{ +} + +bool QuitWindow::QuitRequested() +{ +printf( "closing \n" ); + bgl->EnableDirectMode( false ); + be_app->PostMessage(B_QUIT_REQUESTED); + return true; +}; + +void QuitWindow::DirectConnected( direct_buffer_info *info ) +{ + if( bgl ) + bgl->DirectConnected( info ); + bgl->EnableDirectMode( true ); +} + +int main(int argc, char **argv) +{ + GLenum type = BGL_RGB | BGL_DEPTH | BGL_DOUBLE; + //GLenum type = BGL_RGB | BGL_DEPTH | BGL_SINGLE; + BRect r(0,0,300,315); + + BApplication *app = new BApplication("application/x-vnd.Be-tpot"); + + r.OffsetTo(BPoint(100,100)); + QuitWindow *win = new QuitWindow(r,"GLTeapot",B_TITLED_WINDOW,0); + + win->Lock(); + r = win->Bounds(); + r.bottom = r.top + 14; + BMenuBar *mb = new BMenuBar(r,"main menu"); + + BMenu *m; + BMenuItem *i; + BMessage msg (bmsgAddModel); + + mb->AddItem(m = new BMenu("File")); + win->AddChild(mb); + mb->ResizeToPreferred(); + + r = win->Bounds(); + r.top = mb->Bounds().bottom+1; + BView *sv = new BView(r,"subview",B_FOLLOW_ALL,0); + win->AddChild(sv); + r = sv->Bounds(); + ObjectView *bgl = new ObjectView(r,"objectView",B_FOLLOW_NONE,type); + sv->AddChild(bgl); + win->bgl = bgl; + + msg.AddInt32("num",256); + m->AddItem(i = new BMenuItem("Add a teapot",new BMessage(msg), 'N')); + i->SetTarget(bgl); + m->AddSeparatorItem(); + m->AddItem(i = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q')); + i->SetTarget(be_app); + msg.RemoveName("num"); + mb->AddItem(m = new BMenu("Options")); + m->AddItem(i = new BMenuItem("Perspective",new BMessage(bmsgPerspective))); + i->SetTarget(bgl); + i->SetMarked(false); + m->AddItem(i = new BMenuItem("FPS Display",new BMessage(bmsgFPS))); + i->SetTarget(bgl); + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Filled polygons",new BMessage(bmsgFilled))); + i->SetTarget(bgl); + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Lighting",new BMessage(bmsgLighting))); + i->SetTarget(bgl); + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Backface culling",new BMessage(bmsgCulling))); + i->SetTarget(bgl); + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Z-buffered",new BMessage(bmsgZBuffer))); + i->SetTarget(bgl); + i->SetMarked(true); + m->AddItem(i = new BMenuItem("Gouraud shading",new BMessage(bmsgGouraud))); + i->SetTarget(bgl); + i->SetMarked(true); +// m->AddItem(i = new BMenuItem("Texture mapped",new BMessage(bmsgTextured))); +// i->SetTarget(bgl); + m->AddItem(i = new BMenuItem("Fog",new BMessage(bmsgFog))); + i->SetTarget(bgl); + + BMenu *sm; + mb->AddItem(m = new BMenu("Lights")); + msg.what = bmsgLights; + + msg.AddInt32("num",1); + m->AddItem(i = new BMenuItem(sm = new BMenu("Upper center"),NULL)); + i->SetTarget(bgl); + msg.AddInt32("color",lightNone); + sm->AddItem(i = new BMenuItem("Off",new BMessage(msg))); + i->SetTarget(bgl); + sm->AddSeparatorItem(); + msg.ReplaceInt32("color",lightWhite); + sm->AddItem(i = new BMenuItem("White",new BMessage(msg))); + i->SetTarget(bgl); + i->SetMarked(true); + msg.ReplaceInt32("color",lightYellow); + sm->AddItem(i = new BMenuItem("Yellow",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightBlue); + sm->AddItem(i = new BMenuItem("Blue",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightRed); + sm->AddItem(i = new BMenuItem("Red",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightGreen); + sm->AddItem(i = new BMenuItem("Green",new BMessage(msg))); + i->SetTarget(bgl); + + msg.RemoveName("color"); + + msg.ReplaceInt32("num",2); + m->AddItem(i = new BMenuItem(sm = new BMenu("Lower left"),NULL)); + i->SetTarget(bgl); + msg.AddInt32("color",lightNone); + sm->AddItem(i = new BMenuItem("Off",new BMessage(msg))); + i->SetTarget(bgl); + sm->AddSeparatorItem(); + msg.ReplaceInt32("color",lightWhite); + sm->AddItem(i = new BMenuItem("White",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightYellow); + sm->AddItem(i = new BMenuItem("Yellow",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightBlue); + sm->AddItem(i = new BMenuItem("Blue",new BMessage(msg))); + i->SetTarget(bgl); + i->SetMarked(true); + msg.ReplaceInt32("color",lightRed); + sm->AddItem(i = new BMenuItem("Red",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightGreen); + sm->AddItem(i = new BMenuItem("Green",new BMessage(msg))); + i->SetTarget(bgl); + + msg.RemoveName("color"); + + msg.ReplaceInt32("num",3); + m->AddItem(i = new BMenuItem(sm = new BMenu("Right"),NULL)); + i->SetTarget(bgl); + msg.AddInt32("color",lightNone); + sm->AddItem(i = new BMenuItem("Off",new BMessage(msg))); + i->SetTarget(bgl); + i->SetMarked(true); + sm->AddSeparatorItem(); + msg.ReplaceInt32("color",lightWhite); + sm->AddItem(i = new BMenuItem("White",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightYellow); + sm->AddItem(i = new BMenuItem("Yellow",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightBlue); + sm->AddItem(i = new BMenuItem("Blue",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightRed); + sm->AddItem(i = new BMenuItem("Red",new BMessage(msg))); + i->SetTarget(bgl); + msg.ReplaceInt32("color",lightGreen); + sm->AddItem(i = new BMenuItem("Green",new BMessage(msg))); + i->SetTarget(bgl); + + float f = mb->Bounds().IntegerHeight()+1; + win->SetSizeLimits(32,1024,32+f,1024+f); + + /* + r = win->Bounds(); + r.top = mb->Bounds().bottom+1; + sv->MoveTo(r.left,r.top); + sv->ResizeTo(r.right-r.left+1,r.bottom-r.top+1); + bgl->ResizeTo(r.right-r.left+1,r.bottom-r.top+1); + */ + + win->Unlock(); + win->Show(); + + app->Run(); + delete app; + + return 0; +} diff --git a/src/apps/glteapot/util.h b/src/apps/glteapot/util.h new file mode 100644 index 0000000000..ca5ca3bd2e --- /dev/null +++ b/src/apps/glteapot/util.h @@ -0,0 +1,381 @@ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ + +#ifndef list_h +#define list_h + +#include +#include "error.h" + +template +struct LispNode +{ + contents *car; + LispNode *cdr; + + /* Create a node with no next */ + inline LispNode(contents *value) + : car(value), cdr(0) { } + + /* Create a node with specified next */ + inline LispNode(contents *value, LispNode *next) + : car (value), cdr(next) { } + + /* Create a node and insert it in a list right after `prev' */ + inline LispNode(LispNode *prev, contents *value) + : car(value), cdr(prev->cdr) { prev->cdr = this; } + +}; + + +template +struct LispList +{ + LispNode *first; + + + /* -------- List creation --------------- */ + /* Create an empty list */ + inline LispList() + { first = 0; } + + /* Create a list pointing to the specified node */ + inline LispList(LispNode *_first) + { first = _first; } + + /* ?? */ + inline LispList(LispList &init) + { first = init.first; } + + /* ---------- List queries ------------- */ + inline int is_empty() + { return first == 0; } + + /* Determines if a thing is on the list */ + inline int is_present(contents *element) + { + for (LispNode *node = first; node; node = node->cdr) + if (node->car == element) + return 1; + return 0; + } + + /* Returns the length of the list */ + inline int count() + { + int n = 0; + for (LispNode *node = first; node; node = node->cdr) + n++; + return n; + } + + /* ----------- Adding "nodes" to the list ------------ */ + /* Add a specified node to the head of the list. */ + inline void add_head(LispNode *new_element) + { + new_element->cdr = first; + first = new_element; + } + + /* Add a specified node anywhere on the list */ + inline void add(LispNode *new_element) + { + add_head (new_element); + } + + inline void add_tail(LispNode *new_element) + { + LispNode** pred = &first; + while( *pred ) + pred = &(*pred)->cdr; + *pred = new_element; + new_element->cdr = 0; + } + + /* ----------- Adding "contents" to the list ------------ */ + /* ----- (Which in my opinion is far more useful) ------ */ + /* Create new node pointing to thing, & add to head of list. */ + inline void add_head_new(contents *new_element) + { + first = new LispNode(new_element, first); + } + inline void add_head(contents *new_element) + { add_head_new(new_element); } + + /* Create new node pointing to thing, & add to end of list. */ + inline void add_tail_new(contents *new_element) + { + LispNode< contents > **pred = &first; + while (*pred) + pred = &(*pred)->cdr; + *pred = new LispNode< contents >(new_element); + } + inline void add_tail(contents *new_element) + { add_tail_new(new_element); } + + /* Create new node pointing to thing, & add anywhere on list */ + inline void add_new(contents *new_element) + { add_head_new(new_element); } + inline void add(contents *new_element) + { add_new(new_element); } + + /* Create and add a new node for a specified element, + but only if it's not already on the list. */ + inline void add_new_once(contents *new_element) + { + if (!is_present(new_element)) + add_head_new(new_element); + } + inline void add_tail_once(contents *new_element) + { + if (!is_present(new_element)) + add_tail_new(new_element); + } + + /* ------- Removing things from the list ------------ */ + /* Remove and return the first node on the list j.h. */ + inline LispNode *rem_head () + { + LispNode *n = first; + if (n) + { + first = first->cdr; + } + return n; + } + + /* Remove and return any node on the list. */ + inline LispNode *remove () + { return( rem_head() ); } + + /* Remove a specified node from the list. */ + inline void remove (LispNode *node) + { + for (LispNode **pp = &first; *pp; pp = &(*pp)->cdr) + if (*pp == node) + { + *pp = (*pp)->cdr; + return; + } + } + + /* Remove & delete all nodes pointing to a particular element. */ + inline void rem_del (contents *element) + { + LispNode **pp = &first; + while (*pp) + { + if ((*pp)->car == element) + { + LispNode *o = *pp; + *pp = o->cdr; + delete o; + } + else + pp = &(*pp)->cdr; + } + } + + /* Remove and delete all nodes on the list. */ + inline void rem_del_all() + { + while (first) + { + LispNode *old = first; + first = first->cdr; + delete old; + } + } + + + /* -------- Simple list storage (by j.h.) ------------ */ + /* When you just want to hold a bunch of stuff on a list and + then pull them off later. Note that these calls do NOT check + for to see if a thing is already on the list. Use is_present() + before adding. + */ + /* Put something anywhere on the list */ + inline void put( contents *c ) + { add_tail( c ); } + + /* Put something at beginning of list */ + inline void put_head( contents *c ) + { add_head( c ); } + + /* Put something at end of the list */ + inline void put_tail( contents *c ) + { add_tail( c ); } + +#if 0 /* leaks memory */ + /* Take a specific thing off the list */ + inline contents *get(contents *element) + { + contents *c = 0; + for (LispNode *node = first; node; node = node->cdr) + { + if (node->car == element) + { + c = node->car; + remove(node); + break; + } + } + return c; + } +#endif + + /* Take the first thing off the list */ + inline contents *get_head() + { + contents *c = 0; + if(first) + { + c = first->car; + delete rem_head(); + } + return c; + } + + /* Take something off the list */ + inline contents *get() + { return(get_head()); } + + /* XXX inline contents *get_tail() { } */ + + /* -------- Stack simulation (by j.h.) ------------ */ + /* Put a thing onto the head of the list */ + inline void push( contents *c ) + { put_head( c ); } + + /* Remove a thing from the head of the list */ + inline contents *pop() + { return(get_head()); } + + /* Pop everything off the stack. Empty the stack/list. */ + inline void pop_all() + { rem_del_all(); } + + + /* ----------- list/list manipulations ------------ */ + /* Add all elements present on another list to this list also. */ + inline void add_new(LispList other) + { + for (LispNode *n = other.first; n; n = n->cdr) + add_new(n->car); + } + inline void add_new_once(LispList other) + { + for (LispNode *n = other.first; n; n = n->cdr) + add_new_once(n->car); + } + + /* Remove and delete all nodes whose contents are also present + in a different list (set disjunction). */ + inline void rem_del(LispList other) + { + for (LispNode *n = other.first; n; n = n->cdr) + rem_del(n->car); + } +}; + +template +struct DoubleLinkedNode +{ + thetype *next,*prev; + + DoubleLinkedNode() { next = prev = NULL; }; + + void insert_after(thetype *n) + { + if (next != NULL) + next->prev = n; + n->next = next; + n->prev = (thetype*)this; + next = n; + }; + + void insert_before(thetype *n) + { + prev->next = n; + n->next = (thetype*)this; + n->prev = prev; + prev = n; + }; + + void remove() + { + assert(prev != NULL); + prev->next = next; + if (next != NULL) + next->prev = prev; + }; +}; + +template +struct DoubleLinkedList : public DoubleLinkedNode +{ + DoubleLinkedList() : DoubleLinkedNode() {}; + + void insert(thetype *n) + { + insert_after(n); + }; + + void add(thetype *n) + { + insert_after(n); + }; +}; + +template +struct BufferArray +{ + T * items; + int num_items; + int num_slots; + int slot_inc; + + void resize(int i) + { + items = (T*)realloc(items,sizeof(T)*i); + num_slots = i; + }; + + T & operator [](int index) + { + assert(index < num_items); + return items[index]; + }; + + T & get(int index) + { + assert(index < num_items); + return items[index]; + }; + + void add(T &item) + { + if (num_items == num_slots) + resize(num_slots+slot_inc); + memcpy(items+num_items,&item,sizeof(item)); + num_items++; + }; + + BufferArray(int start_slots, int _slot_inc) + { + num_slots = start_slots; + slot_inc = _slot_inc; + assert(slot_inc > 0); + num_items = 0; + items = (T*)malloc(sizeof(T)*num_slots); + }; + + ~BufferArray() + { + free(items); + }; +}; + +#endif