commit a176afab7e43b43c9ec40e3c6498a4df62026bb7 Author: Kevin Jerebica Date: Tue Oct 8 00:15:42 2024 +0200 init: kick-off repository from gravity's SC source code was taken from my project gravity and modified so I can reuse the renderer in other projects. I will also upgrade it, free it from old bugs, put more effort into learning the math behind rendering, etc. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..384858a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.idea/ +cmake-build-debug/ +build/ +.ccls-cache/ +*.mtl +compile_commands.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f7ca625 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +CC=gcc +CFLAGS=-DFREEGLUT_STATIC -g3 +LFLAGS=-lglfw -L/usr/lib64 -lGLEW -lGL -lX11 -lGLU -lassimp -lm +LD=ld +OUT=build +DEV=dev.c + +all: + mkdir -p $(OUT) + $(CC) $(CFLAGS) -c rendlib.c -o $(OUT)/rendlib.o $(LFLAGS) + $(CC) $(CFLAGS) -c math.c -o $(OUT)/math.o $(LFLAGS) + $(CC) $(CFLAGS) -c object.c -o $(OUT)/object.o $(LFLAGS) + $(LD) -relocatable $(OUT)/rendlib.o $(OUT)/math.o $(OUT)/object.o -o $(OUT)/rendlib + +dev: all + $(CC) $(CFLAGS) dev.c $(OUT)/rendlib -o $(OUT)/dev $(LFLAGS) + +devall: dev + $(OUT)/dev + + +clean: + rm -rf $(OUT) diff --git a/README b/README new file mode 100644 index 0000000..e00951b --- /dev/null +++ b/README @@ -0,0 +1,8 @@ + _ _ _ _ + ___ ___ ___ _| | |_| |_ +| _| -_| | . | | | . | +|_| |___|_|_|___|_|_|___| + + A work in progress rendering library written + in C. + diff --git a/assets/models/sphere.obj b/assets/models/sphere.obj new file mode 100644 index 0000000..906c320 --- /dev/null +++ b/assets/models/sphere.obj @@ -0,0 +1,2070 @@ +# Blender 3.6.4 +# www.blender.org +mtllib sphere.mtl +o Sphere +v 0.000000 0.831470 -0.555570 +v 0.000000 0.555570 -0.831470 +v 0.000000 0.195090 -0.980785 +v 0.000000 0.000000 -1.000000 +v 0.000000 -0.195090 -0.980785 +v 0.000000 -0.555570 -0.831470 +v 0.038060 0.980785 -0.191342 +v 0.074658 0.923880 -0.375330 +v 0.108386 0.831470 -0.544895 +v 0.137950 0.707107 -0.693520 +v 0.162212 0.555570 -0.815493 +v 0.180240 0.382683 -0.906127 +v 0.191342 0.195090 -0.961940 +v 0.195090 0.000000 -0.980785 +v 0.191342 -0.195090 -0.961940 +v 0.180240 -0.382683 -0.906127 +v 0.162212 -0.555570 -0.815493 +v 0.137950 -0.707107 -0.693520 +v 0.108386 -0.831470 -0.544895 +v 0.074658 -0.923880 -0.375330 +v 0.038060 -0.980785 -0.191342 +v 0.074658 0.980785 -0.180240 +v 0.146447 0.923880 -0.353553 +v 0.212608 0.831470 -0.513280 +v 0.270598 0.707107 -0.653281 +v 0.318190 0.555570 -0.768178 +v 0.353553 0.382683 -0.853553 +v 0.375330 0.195090 -0.906127 +v 0.382683 0.000000 -0.923879 +v 0.375330 -0.195090 -0.906127 +v 0.353553 -0.382683 -0.853553 +v 0.318190 -0.555570 -0.768178 +v 0.270598 -0.707107 -0.653281 +v 0.212608 -0.831470 -0.513280 +v 0.146447 -0.923880 -0.353553 +v 0.074658 -0.980785 -0.180240 +v 0.108386 0.980785 -0.162212 +v 0.212608 0.923880 -0.318190 +v 0.308658 0.831470 -0.461940 +v 0.392847 0.707107 -0.587938 +v 0.461940 0.555570 -0.691342 +v 0.513280 0.382683 -0.768178 +v 0.544895 0.195090 -0.815493 +v 0.555570 0.000000 -0.831469 +v 0.544895 -0.195090 -0.815493 +v 0.513280 -0.382683 -0.768178 +v 0.461940 -0.555570 -0.691342 +v 0.392847 -0.707107 -0.587938 +v 0.308658 -0.831470 -0.461940 +v 0.212608 -0.923880 -0.318190 +v 0.108386 -0.980785 -0.162212 +v 0.137950 0.980785 -0.137950 +v 0.270598 0.923880 -0.270598 +v 0.392847 0.831470 -0.392847 +v 0.500000 0.707107 -0.500000 +v 0.587938 0.555570 -0.587938 +v 0.653281 0.382683 -0.653281 +v 0.693520 0.195090 -0.693520 +v 0.707107 0.000000 -0.707107 +v 0.693520 -0.195090 -0.693520 +v 0.653281 -0.382683 -0.653281 +v 0.587938 -0.555570 -0.587938 +v 0.500000 -0.707107 -0.500000 +v 0.392847 -0.831470 -0.392847 +v 0.270598 -0.923880 -0.270598 +v 0.137950 -0.980785 -0.137950 +v 0.162212 0.980785 -0.108386 +v 0.318190 0.923880 -0.212608 +v 0.461940 0.831470 -0.308658 +v 0.587938 0.707107 -0.392847 +v 0.691342 0.555570 -0.461940 +v 0.768178 0.382683 -0.513280 +v 0.815493 0.195090 -0.544895 +v 0.831470 0.000000 -0.555570 +v 0.815493 -0.195090 -0.544895 +v 0.768178 -0.382683 -0.513280 +v 0.691342 -0.555570 -0.461940 +v 0.587938 -0.707107 -0.392847 +v 0.461940 -0.831470 -0.308658 +v 0.318190 -0.923880 -0.212608 +v 0.162212 -0.980785 -0.108386 +v 0.000000 1.000000 0.000000 +v 0.180240 0.980785 -0.074658 +v 0.353553 0.923880 -0.146447 +v 0.513280 0.831470 -0.212607 +v 0.653281 0.707107 -0.270598 +v 0.768178 0.555570 -0.318190 +v 0.853553 0.382683 -0.353553 +v 0.906127 0.195090 -0.375330 +v 0.923879 0.000000 -0.382683 +v 0.906127 -0.195090 -0.375330 +v 0.853553 -0.382683 -0.353553 +v 0.768178 -0.555570 -0.318190 +v 0.653281 -0.707107 -0.270598 +v 0.513280 -0.831470 -0.212607 +v 0.353553 -0.923880 -0.146447 +v 0.180240 -0.980785 -0.074658 +v 0.191342 0.980785 -0.038060 +v 0.375330 0.923880 -0.074658 +v 0.544895 0.831470 -0.108386 +v 0.693520 0.707107 -0.137950 +v 0.815493 0.555570 -0.162212 +v 0.906127 0.382683 -0.180240 +v 0.961940 0.195090 -0.191342 +v 0.980785 0.000000 -0.195090 +v 0.961940 -0.195090 -0.191342 +v 0.906127 -0.382683 -0.180240 +v 0.815493 -0.555570 -0.162212 +v 0.693520 -0.707107 -0.137950 +v 0.544895 -0.831470 -0.108386 +v 0.375330 -0.923880 -0.074658 +v 0.191342 -0.980785 -0.038060 +v 0.195090 0.980785 0.000000 +v 0.382683 0.923880 0.000000 +v 0.555570 0.831470 0.000000 +v 0.707107 0.707107 -0.000000 +v 0.831469 0.555570 0.000000 +v 0.923879 0.382683 -0.000000 +v 0.980785 0.195090 0.000000 +v 1.000000 0.000000 0.000000 +v 0.980785 -0.195090 0.000000 +v 0.923879 -0.382683 -0.000000 +v 0.831469 -0.555570 0.000000 +v 0.707107 -0.707107 -0.000000 +v 0.555570 -0.831470 0.000000 +v 0.382683 -0.923880 0.000000 +v 0.195090 -0.980785 0.000000 +v 0.191342 0.980785 0.038060 +v 0.375330 0.923880 0.074658 +v 0.544895 0.831470 0.108386 +v 0.693520 0.707107 0.137950 +v 0.815493 0.555570 0.162212 +v 0.906127 0.382683 0.180240 +v 0.961940 0.195090 0.191342 +v 0.980785 0.000000 0.195090 +v 0.961940 -0.195090 0.191342 +v 0.906127 -0.382683 0.180240 +v 0.815493 -0.555570 0.162212 +v 0.693520 -0.707107 0.137950 +v 0.544895 -0.831470 0.108386 +v 0.375330 -0.923880 0.074658 +v 0.191342 -0.980785 0.038060 +v 0.180240 0.980785 0.074658 +v 0.353553 0.923880 0.146447 +v 0.513280 0.831470 0.212608 +v 0.653281 0.707107 0.270598 +v 0.768178 0.555570 0.318190 +v 0.853553 0.382683 0.353553 +v 0.906127 0.195090 0.375330 +v 0.923879 0.000000 0.382683 +v 0.906127 -0.195090 0.375330 +v 0.853553 -0.382683 0.353553 +v 0.768178 -0.555570 0.318190 +v 0.653281 -0.707107 0.270598 +v 0.513280 -0.831470 0.212608 +v 0.353553 -0.923880 0.146447 +v 0.180240 -0.980785 0.074658 +v 0.162212 0.980785 0.108386 +v 0.318190 0.923880 0.212608 +v 0.461940 0.831470 0.308658 +v 0.587938 0.707107 0.392847 +v 0.691341 0.555570 0.461940 +v 0.768178 0.382683 0.513280 +v 0.815493 0.195090 0.544895 +v 0.831469 0.000000 0.555570 +v 0.815493 -0.195090 0.544895 +v 0.768178 -0.382683 0.513280 +v 0.691341 -0.555570 0.461940 +v 0.587938 -0.707107 0.392847 +v 0.461940 -0.831470 0.308658 +v 0.318190 -0.923880 0.212608 +v 0.162212 -0.980785 0.108386 +v 0.137950 0.980785 0.137950 +v 0.270598 0.923880 0.270598 +v 0.392847 0.831470 0.392847 +v 0.500000 0.707107 0.500000 +v 0.587938 0.555570 0.587938 +v 0.653281 0.382683 0.653281 +v 0.693520 0.195090 0.693520 +v 0.707106 0.000000 0.707107 +v 0.693520 -0.195090 0.693520 +v 0.653281 -0.382683 0.653281 +v 0.587938 -0.555570 0.587938 +v 0.500000 -0.707107 0.500000 +v 0.392847 -0.831470 0.392847 +v 0.270598 -0.923880 0.270598 +v 0.137950 -0.980785 0.137950 +v 0.108386 0.980785 0.162212 +v 0.212607 0.923880 0.318190 +v 0.308658 0.831470 0.461940 +v 0.392847 0.707107 0.587938 +v 0.461940 0.555570 0.691342 +v 0.513280 0.382683 0.768178 +v 0.544895 0.195090 0.815493 +v 0.555570 0.000000 0.831469 +v 0.544895 -0.195090 0.815493 +v 0.513280 -0.382683 0.768178 +v 0.461940 -0.555570 0.691342 +v 0.392847 -0.707107 0.587938 +v 0.308658 -0.831470 0.461940 +v 0.212607 -0.923880 0.318190 +v 0.108386 -0.980785 0.162212 +v 0.074658 0.980785 0.180240 +v 0.146447 0.923880 0.353553 +v 0.212607 0.831470 0.513280 +v 0.270598 0.707107 0.653281 +v 0.318189 0.555570 0.768178 +v 0.353553 0.382683 0.853553 +v 0.375330 0.195090 0.906127 +v 0.382683 0.000000 0.923879 +v 0.375330 -0.195090 0.906127 +v 0.353553 -0.382683 0.853553 +v 0.318189 -0.555570 0.768178 +v 0.270598 -0.707107 0.653281 +v 0.212607 -0.831470 0.513280 +v 0.146447 -0.923880 0.353553 +v 0.074658 -0.980785 0.180240 +v 0.038060 0.980785 0.191342 +v 0.074658 0.923880 0.375330 +v 0.108386 0.831470 0.544895 +v 0.137950 0.707107 0.693520 +v 0.162212 0.555570 0.815493 +v 0.180240 0.382683 0.906127 +v 0.191342 0.195090 0.961939 +v 0.195090 0.000000 0.980785 +v 0.191342 -0.195090 0.961939 +v 0.180240 -0.382683 0.906127 +v 0.162212 -0.555570 0.815493 +v 0.137950 -0.707107 0.693520 +v 0.108386 -0.831470 0.544895 +v 0.074658 -0.923880 0.375330 +v 0.038060 -0.980785 0.191342 +v -0.000000 0.980785 0.195090 +v -0.000000 0.923880 0.382683 +v -0.000000 0.831470 0.555570 +v -0.000000 0.707107 0.707107 +v -0.000000 0.555570 0.831469 +v 0.000000 0.382683 0.923879 +v -0.000000 0.195090 0.980785 +v -0.000000 0.000000 0.999999 +v -0.000000 -0.195090 0.980785 +v 0.000000 -0.382683 0.923879 +v -0.000000 -0.555570 0.831469 +v -0.000000 -0.707107 0.707107 +v -0.000000 -0.831470 0.555570 +v -0.000000 -0.923880 0.382683 +v -0.000000 -0.980785 0.195090 +v -0.038060 0.980785 0.191342 +v -0.074658 0.923880 0.375330 +v -0.108386 0.831470 0.544895 +v -0.137950 0.707107 0.693520 +v -0.162212 0.555570 0.815493 +v -0.180240 0.382683 0.906127 +v -0.191342 0.195090 0.961939 +v -0.195091 0.000000 0.980785 +v -0.191342 -0.195090 0.961939 +v -0.180240 -0.382683 0.906127 +v -0.162212 -0.555570 0.815493 +v -0.137950 -0.707107 0.693520 +v -0.108386 -0.831470 0.544895 +v -0.074658 -0.923880 0.375330 +v -0.038060 -0.980785 0.191342 +v -0.074658 0.980785 0.180240 +v -0.146447 0.923880 0.353553 +v -0.212608 0.831470 0.513280 +v -0.270598 0.707107 0.653281 +v -0.318190 0.555570 0.768177 +v -0.353553 0.382683 0.853553 +v -0.375330 0.195090 0.906127 +v -0.382683 0.000000 0.923879 +v -0.375330 -0.195090 0.906127 +v -0.353553 -0.382683 0.853553 +v -0.318190 -0.555570 0.768177 +v -0.270598 -0.707107 0.653281 +v -0.212608 -0.831470 0.513280 +v -0.146447 -0.923880 0.353553 +v -0.074658 -0.980785 0.180240 +v -0.108386 0.980785 0.162212 +v -0.212608 0.923880 0.318190 +v -0.308658 0.831470 0.461939 +v -0.392847 0.707107 0.587938 +v -0.461940 0.555570 0.691341 +v -0.513280 0.382683 0.768178 +v -0.544895 0.195090 0.815493 +v -0.555570 0.000000 0.831469 +v -0.544895 -0.195090 0.815493 +v -0.513280 -0.382683 0.768178 +v -0.461940 -0.555570 0.691341 +v -0.392847 -0.707107 0.587938 +v -0.308658 -0.831470 0.461939 +v -0.212608 -0.923880 0.318190 +v -0.108386 -0.980785 0.162212 +v -0.137950 0.980785 0.137950 +v -0.270598 0.923880 0.270598 +v -0.392847 0.831470 0.392847 +v -0.500000 0.707107 0.500000 +v -0.587938 0.555570 0.587937 +v -0.653281 0.382683 0.653281 +v -0.693520 0.195090 0.693520 +v -0.707106 0.000000 0.707106 +v -0.693520 -0.195090 0.693520 +v -0.653281 -0.382683 0.653281 +v -0.587938 -0.555570 0.587937 +v -0.500000 -0.707107 0.500000 +v -0.392847 -0.831470 0.392847 +v -0.270598 -0.923880 0.270598 +v -0.137950 -0.980785 0.137950 +v 0.000000 -1.000000 0.000000 +v -0.162212 0.980785 0.108386 +v -0.318190 0.923880 0.212607 +v -0.461940 0.831470 0.308658 +v -0.587938 0.707107 0.392847 +v -0.691341 0.555570 0.461939 +v -0.768177 0.382683 0.513280 +v -0.815493 0.195090 0.544895 +v -0.831469 0.000000 0.555569 +v -0.815493 -0.195090 0.544895 +v -0.768177 -0.382683 0.513280 +v -0.691341 -0.555570 0.461939 +v -0.587938 -0.707107 0.392847 +v -0.461940 -0.831470 0.308658 +v -0.318190 -0.923880 0.212607 +v -0.162212 -0.980785 0.108386 +v -0.180240 0.980785 0.074658 +v -0.353553 0.923880 0.146447 +v -0.513280 0.831470 0.212607 +v -0.653281 0.707107 0.270598 +v -0.768177 0.555570 0.318189 +v -0.853553 0.382683 0.353553 +v -0.906127 0.195090 0.375330 +v -0.923879 0.000000 0.382683 +v -0.906127 -0.195090 0.375330 +v -0.853553 -0.382683 0.353553 +v -0.768177 -0.555570 0.318189 +v -0.653281 -0.707107 0.270598 +v -0.513280 -0.831470 0.212607 +v -0.353553 -0.923880 0.146447 +v -0.180240 -0.980785 0.074658 +v -0.191342 0.980785 0.038060 +v -0.375330 0.923880 0.074658 +v -0.544895 0.831470 0.108386 +v -0.693520 0.707107 0.137950 +v -0.815493 0.555570 0.162211 +v -0.906127 0.382683 0.180240 +v -0.961939 0.195090 0.191341 +v -0.980784 0.000000 0.195090 +v -0.961939 -0.195090 0.191341 +v -0.906127 -0.382683 0.180240 +v -0.815493 -0.555570 0.162211 +v -0.693520 -0.707107 0.137950 +v -0.544895 -0.831470 0.108386 +v -0.375330 -0.923880 0.074658 +v -0.191342 -0.980785 0.038060 +v -0.195090 0.980785 -0.000000 +v -0.382683 0.923880 -0.000000 +v -0.555570 0.831470 -0.000000 +v -0.707107 0.707107 -0.000000 +v -0.831469 0.555570 -0.000000 +v -0.923879 0.382683 -0.000000 +v -0.980785 0.195090 -0.000000 +v -0.999999 0.000000 -0.000000 +v -0.980785 -0.195090 -0.000000 +v -0.923879 -0.382683 -0.000000 +v -0.831469 -0.555570 -0.000000 +v -0.707107 -0.707107 -0.000000 +v -0.555570 -0.831470 -0.000000 +v -0.382683 -0.923880 -0.000000 +v -0.195090 -0.980785 -0.000000 +v -0.191342 0.980785 -0.038060 +v -0.375330 0.923880 -0.074658 +v -0.544895 0.831470 -0.108386 +v -0.693520 0.707107 -0.137950 +v -0.815493 0.555570 -0.162212 +v -0.906127 0.382683 -0.180240 +v -0.961939 0.195090 -0.191342 +v -0.980784 0.000000 -0.195091 +v -0.961939 -0.195090 -0.191342 +v -0.906127 -0.382683 -0.180240 +v -0.815493 -0.555570 -0.162212 +v -0.693520 -0.707107 -0.137950 +v -0.544895 -0.831470 -0.108386 +v -0.375330 -0.923880 -0.074658 +v -0.191342 -0.980785 -0.038060 +v -0.180240 0.980785 -0.074658 +v -0.353553 0.923880 -0.146447 +v -0.513279 0.831470 -0.212607 +v -0.653281 0.707107 -0.270598 +v -0.768177 0.555570 -0.318190 +v -0.853553 0.382683 -0.353553 +v -0.906127 0.195090 -0.375330 +v -0.923878 0.000000 -0.382683 +v -0.906127 -0.195090 -0.375330 +v -0.853553 -0.382683 -0.353553 +v -0.768177 -0.555570 -0.318190 +v -0.653281 -0.707107 -0.270598 +v -0.513279 -0.831470 -0.212607 +v -0.353553 -0.923880 -0.146447 +v -0.180240 -0.980785 -0.074658 +v -0.162212 0.980785 -0.108386 +v -0.318189 0.923880 -0.212607 +v -0.461939 0.831470 -0.308658 +v -0.587938 0.707107 -0.392847 +v -0.691341 0.555570 -0.461940 +v -0.768177 0.382683 -0.513280 +v -0.815493 0.195090 -0.544895 +v -0.831468 0.000000 -0.555570 +v -0.815493 -0.195090 -0.544895 +v -0.768177 -0.382683 -0.513280 +v -0.691341 -0.555570 -0.461940 +v -0.587938 -0.707107 -0.392847 +v -0.461939 -0.831470 -0.308658 +v -0.318189 -0.923880 -0.212607 +v -0.162212 -0.980785 -0.108386 +v -0.137950 0.980785 -0.137950 +v -0.270598 0.923880 -0.270598 +v -0.392847 0.831470 -0.392847 +v -0.500000 0.707107 -0.500000 +v -0.587937 0.555570 -0.587938 +v -0.653281 0.382683 -0.653281 +v -0.693519 0.195090 -0.693520 +v -0.707106 0.000000 -0.707106 +v -0.693519 -0.195090 -0.693520 +v -0.653281 -0.382683 -0.653281 +v -0.587937 -0.555570 -0.587938 +v -0.500000 -0.707107 -0.500000 +v -0.392847 -0.831470 -0.392847 +v -0.270598 -0.923880 -0.270598 +v -0.137950 -0.980785 -0.137950 +v -0.108386 0.980785 -0.162212 +v -0.212607 0.923880 -0.318190 +v -0.308658 0.831470 -0.461939 +v -0.392847 0.707107 -0.587938 +v -0.461939 0.555570 -0.691341 +v -0.513280 0.382683 -0.768177 +v -0.544895 0.195090 -0.815493 +v -0.555569 0.000000 -0.831469 +v -0.544895 -0.195090 -0.815493 +v -0.513280 -0.382683 -0.768177 +v -0.461939 -0.555570 -0.691341 +v -0.392847 -0.707107 -0.587938 +v -0.308658 -0.831470 -0.461939 +v -0.212607 -0.923880 -0.318190 +v -0.108386 -0.980785 -0.162212 +v -0.074658 0.980785 -0.180240 +v -0.146446 0.923880 -0.353553 +v -0.212607 0.831470 -0.513279 +v -0.270598 0.707107 -0.653281 +v -0.318189 0.555570 -0.768177 +v -0.353553 0.382683 -0.853553 +v -0.375330 0.195090 -0.906127 +v -0.382683 0.000000 -0.923879 +v -0.375330 -0.195090 -0.906127 +v -0.353553 -0.382683 -0.853553 +v -0.318189 -0.555570 -0.768177 +v -0.270598 -0.707107 -0.653281 +v -0.212607 -0.831470 -0.513279 +v -0.146446 -0.923880 -0.353553 +v -0.074658 -0.980785 -0.180240 +v -0.038060 0.980785 -0.191342 +v -0.074658 0.923880 -0.375330 +v -0.108386 0.831470 -0.544895 +v -0.137950 0.707107 -0.693520 +v -0.162211 0.555570 -0.815493 +v -0.180240 0.382683 -0.906127 +v -0.191341 0.195090 -0.961939 +v -0.195090 0.000000 -0.980784 +v -0.191341 -0.195090 -0.961939 +v -0.180240 -0.382683 -0.906127 +v -0.162211 -0.555570 -0.815493 +v -0.137950 -0.707107 -0.693520 +v -0.108386 -0.831470 -0.544895 +v -0.074658 -0.923880 -0.375330 +v -0.038060 -0.980785 -0.191342 +v 0.000000 0.980785 -0.195090 +v 0.000000 0.923880 -0.382683 +v 0.000000 0.707107 -0.707107 +v 0.000000 0.382683 -0.923879 +v 0.000000 -0.382683 -0.923879 +v 0.000000 -0.707107 -0.707107 +v 0.000000 -0.831470 -0.555570 +v 0.000000 -0.923880 -0.382683 +v 0.000000 -0.980785 -0.195090 +vn 0.0865 0.4696 -0.8786 +vn 0.0464 -0.8810 -0.4709 +vn 0.0938 0.2890 -0.9527 +vn 0.0286 -0.9565 -0.2902 +vn 0.0975 0.0975 -0.9904 +vn 0.0097 0.9951 -0.0980 +vn 0.0097 -0.9951 -0.0980 +vn 0.0975 -0.0975 -0.9904 +vn 0.0286 0.9565 -0.2902 +vn 0.0938 -0.2890 -0.9527 +vn 0.0464 0.8810 -0.4709 +vn 0.0865 -0.4696 -0.8786 +vn 0.0624 0.7715 -0.6332 +vn 0.0759 -0.6326 -0.7708 +vn 0.0759 0.6326 -0.7708 +vn 0.0624 -0.7715 -0.6332 +vn 0.2248 -0.6326 -0.7412 +vn 0.2248 0.6326 -0.7412 +vn 0.1847 -0.7715 -0.6088 +vn 0.2563 0.4696 -0.8448 +vn 0.1374 -0.8810 -0.4528 +vn 0.2779 0.2890 -0.9161 +vn 0.0846 -0.9565 -0.2790 +vn 0.2889 0.0976 -0.9524 +vn 0.0286 0.9951 -0.0942 +vn 0.0286 -0.9951 -0.0942 +vn 0.2889 -0.0976 -0.9524 +vn 0.0846 0.9565 -0.2790 +vn 0.2779 -0.2890 -0.9161 +vn 0.1374 0.8810 -0.4528 +vn 0.2563 -0.4696 -0.8448 +vn 0.1847 0.7715 -0.6088 +vn 0.0464 -0.9951 -0.0869 +vn 0.4691 -0.0975 -0.8777 +vn 0.1374 0.9565 -0.2571 +vn 0.4513 -0.2890 -0.8443 +vn 0.2230 0.8810 -0.4173 +vn 0.4162 -0.4696 -0.7786 +vn 0.2999 0.7715 -0.5611 +vn 0.3651 -0.6326 -0.6831 +vn 0.3651 0.6326 -0.6831 +vn 0.2999 -0.7715 -0.5611 +vn 0.4162 0.4696 -0.7786 +vn 0.2230 -0.8810 -0.4173 +vn 0.4513 0.2890 -0.8443 +vn 0.1374 -0.9565 -0.2571 +vn 0.4691 0.0975 -0.8777 +vn 0.0464 0.9951 -0.0869 +vn 0.4036 -0.7715 -0.4918 +vn 0.5601 0.4696 -0.6825 +vn 0.3002 -0.8810 -0.3658 +vn 0.6073 0.2890 -0.7400 +vn 0.1850 -0.9565 -0.2254 +vn 0.6314 0.0975 -0.7693 +vn 0.0625 0.9951 -0.0761 +vn 0.0625 -0.9951 -0.0761 +vn 0.6314 -0.0975 -0.7693 +vn 0.1850 0.9565 -0.2254 +vn 0.6073 -0.2890 -0.7400 +vn 0.3002 0.8810 -0.3658 +vn 0.5601 -0.4696 -0.6825 +vn 0.4036 0.7715 -0.4918 +vn 0.4913 -0.6326 -0.5987 +vn 0.4913 0.6326 -0.5987 +vn 0.2254 0.9565 -0.1850 +vn 0.7400 -0.2890 -0.6073 +vn 0.3658 0.8810 -0.3002 +vn 0.6825 -0.4696 -0.5601 +vn 0.4918 0.7715 -0.4036 +vn 0.5987 -0.6326 -0.4913 +vn 0.5987 0.6326 -0.4913 +vn 0.4918 -0.7715 -0.4036 +vn 0.6825 0.4696 -0.5601 +vn 0.3658 -0.8810 -0.3002 +vn 0.7400 0.2890 -0.6073 +vn 0.2254 -0.9565 -0.1850 +vn 0.7693 0.0975 -0.6314 +vn 0.0761 0.9951 -0.0625 +vn 0.0761 -0.9951 -0.0625 +vn 0.7693 -0.0975 -0.6314 +vn 0.7786 0.4696 -0.4162 +vn 0.4173 -0.8810 -0.2230 +vn 0.8443 0.2890 -0.4513 +vn 0.2571 -0.9565 -0.1374 +vn 0.8777 0.0975 -0.4691 +vn 0.0869 0.9951 -0.0464 +vn 0.0869 -0.9951 -0.0464 +vn 0.8777 -0.0975 -0.4691 +vn 0.2571 0.9565 -0.1374 +vn 0.8443 -0.2890 -0.4513 +vn 0.4173 0.8810 -0.2230 +vn 0.7786 -0.4696 -0.4162 +vn 0.5611 0.7715 -0.2999 +vn 0.6831 -0.6326 -0.3651 +vn 0.6831 0.6326 -0.3651 +vn 0.5611 -0.7715 -0.2999 +vn 0.9161 -0.2890 -0.2779 +vn 0.4528 0.8810 -0.1374 +vn 0.8448 -0.4696 -0.2563 +vn 0.6088 0.7715 -0.1847 +vn 0.7412 -0.6326 -0.2248 +vn 0.7412 0.6326 -0.2248 +vn 0.6088 -0.7715 -0.1847 +vn 0.8448 0.4696 -0.2563 +vn 0.4528 -0.8810 -0.1374 +vn 0.9161 0.2890 -0.2779 +vn 0.2790 -0.9565 -0.0846 +vn 0.9524 0.0975 -0.2889 +vn 0.0942 0.9951 -0.0286 +vn 0.0942 -0.9951 -0.0286 +vn 0.9524 -0.0975 -0.2889 +vn 0.2790 0.9565 -0.0846 +vn 0.4709 -0.8810 -0.0464 +vn 0.9527 0.2890 -0.0938 +vn 0.2902 -0.9565 -0.0286 +vn 0.9904 0.0975 -0.0975 +vn 0.0980 0.9951 -0.0097 +vn 0.0980 -0.9951 -0.0097 +vn 0.9904 -0.0975 -0.0975 +vn 0.2902 0.9565 -0.0286 +vn 0.9527 -0.2890 -0.0938 +vn 0.4709 0.8810 -0.0464 +vn 0.8786 -0.4696 -0.0865 +vn 0.6332 0.7715 -0.0624 +vn 0.7708 -0.6326 -0.0759 +vn 0.7708 0.6326 -0.0759 +vn 0.6332 -0.7715 -0.0624 +vn 0.8786 0.4696 -0.0865 +vn 0.4709 0.8810 0.0464 +vn 0.8786 -0.4696 0.0865 +vn 0.6332 0.7715 0.0624 +vn 0.7708 -0.6326 0.0759 +vn 0.7708 0.6326 0.0759 +vn 0.6332 -0.7715 0.0624 +vn 0.8786 0.4696 0.0865 +vn 0.4709 -0.8810 0.0464 +vn 0.9527 0.2890 0.0938 +vn 0.2902 -0.9565 0.0286 +vn 0.9904 0.0975 0.0976 +vn 0.0980 0.9951 0.0097 +vn 0.0980 -0.9951 0.0097 +vn 0.9904 -0.0975 0.0976 +vn 0.2902 0.9565 0.0286 +vn 0.9527 -0.2890 0.0938 +vn 0.9161 0.2890 0.2779 +vn 0.2790 -0.9565 0.0846 +vn 0.9524 0.0975 0.2889 +vn 0.0942 0.9951 0.0286 +vn 0.0942 -0.9951 0.0286 +vn 0.9524 -0.0975 0.2889 +vn 0.2790 0.9565 0.0846 +vn 0.9161 -0.2890 0.2779 +vn 0.4528 0.8810 0.1374 +vn 0.8448 -0.4696 0.2563 +vn 0.6088 0.7715 0.1847 +vn 0.7412 -0.6326 0.2248 +vn 0.7412 0.6326 0.2248 +vn 0.6088 -0.7715 0.1847 +vn 0.8448 0.4696 0.2563 +vn 0.4528 -0.8810 0.1374 +vn 0.7786 -0.4696 0.4162 +vn 0.5611 0.7715 0.2999 +vn 0.6831 -0.6326 0.3651 +vn 0.6831 0.6326 0.3651 +vn 0.5611 -0.7715 0.2999 +vn 0.7786 0.4696 0.4162 +vn 0.4173 -0.8810 0.2230 +vn 0.8443 0.2890 0.4513 +vn 0.2571 -0.9565 0.1374 +vn 0.8777 0.0975 0.4691 +vn 0.0869 0.9951 0.0464 +vn 0.0869 -0.9951 0.0464 +vn 0.8777 -0.0975 0.4691 +vn 0.2571 0.9565 0.1374 +vn 0.8443 -0.2890 0.4513 +vn 0.4173 0.8810 0.2230 +vn 0.2254 -0.9565 0.1850 +vn 0.7693 0.0975 0.6314 +vn 0.0761 0.9951 0.0625 +vn 0.0761 -0.9951 0.0625 +vn 0.7693 -0.0975 0.6314 +vn 0.2254 0.9565 0.1850 +vn 0.7400 -0.2890 0.6073 +vn 0.3658 0.8810 0.3002 +vn 0.6825 -0.4696 0.5601 +vn 0.4918 0.7715 0.4036 +vn 0.5987 -0.6326 0.4913 +vn 0.5987 0.6326 0.4913 +vn 0.4918 -0.7715 0.4036 +vn 0.6825 0.4696 0.5601 +vn 0.3658 -0.8810 0.3002 +vn 0.7400 0.2890 0.6073 +vn 0.4913 -0.6326 0.5987 +vn 0.4913 0.6326 0.5987 +vn 0.4036 -0.7715 0.4918 +vn 0.5601 0.4696 0.6825 +vn 0.3002 -0.8810 0.3658 +vn 0.6073 0.2890 0.7400 +vn 0.1850 -0.9565 0.2254 +vn 0.6314 0.0975 0.7693 +vn 0.0625 0.9951 0.0761 +vn 0.0625 -0.9951 0.0761 +vn 0.6314 -0.0975 0.7693 +vn 0.1850 0.9565 0.2254 +vn 0.6073 -0.2890 0.7400 +vn 0.3002 0.8810 0.3658 +vn 0.5601 -0.4696 0.6825 +vn 0.4036 0.7715 0.4918 +vn 0.0464 0.9951 0.0869 +vn 0.0464 -0.9951 0.0869 +vn 0.4691 -0.0975 0.8777 +vn 0.1374 0.9565 0.2571 +vn 0.4513 -0.2890 0.8443 +vn 0.2230 0.8810 0.4173 +vn 0.4162 -0.4696 0.7786 +vn 0.2999 0.7715 0.5611 +vn 0.3651 -0.6326 0.6831 +vn 0.3651 0.6326 0.6831 +vn 0.2999 -0.7715 0.5611 +vn 0.4162 0.4696 0.7786 +vn 0.2230 -0.8810 0.4173 +vn 0.4513 0.2890 0.8443 +vn 0.1374 -0.9565 0.2571 +vn 0.4691 0.0975 0.8777 +vn 0.2248 0.6326 0.7412 +vn 0.1847 -0.7715 0.6088 +vn 0.2563 0.4696 0.8448 +vn 0.1374 -0.8810 0.4528 +vn 0.2779 0.2890 0.9161 +vn 0.0846 -0.9565 0.2790 +vn 0.2889 0.0975 0.9524 +vn 0.0286 0.9951 0.0942 +vn 0.0286 -0.9951 0.0942 +vn 0.2889 -0.0975 0.9524 +vn 0.0846 0.9565 0.2790 +vn 0.2779 -0.2890 0.9161 +vn 0.1374 0.8810 0.4528 +vn 0.2563 -0.4696 0.8448 +vn 0.1847 0.7715 0.6088 +vn 0.2248 -0.6326 0.7412 +vn 0.0975 -0.0975 0.9904 +vn 0.0286 0.9565 0.2902 +vn 0.0938 -0.2890 0.9527 +vn 0.0464 0.8810 0.4709 +vn 0.0865 -0.4696 0.8786 +vn 0.0624 0.7715 0.6332 +vn 0.0759 -0.6326 0.7708 +vn 0.0759 0.6326 0.7708 +vn 0.0624 -0.7715 0.6332 +vn 0.0865 0.4696 0.8786 +vn 0.0464 -0.8810 0.4709 +vn 0.0938 0.2890 0.9527 +vn 0.0286 -0.9565 0.2902 +vn 0.0975 0.0975 0.9904 +vn 0.0097 0.9951 0.0980 +vn 0.0097 -0.9951 0.0980 +vn -0.0624 -0.7715 0.6332 +vn -0.0865 0.4696 0.8786 +vn -0.0464 -0.8810 0.4709 +vn -0.0938 0.2890 0.9527 +vn -0.0286 -0.9565 0.2902 +vn -0.0976 0.0975 0.9904 +vn -0.0097 0.9951 0.0980 +vn -0.0097 -0.9951 0.0980 +vn -0.0976 -0.0975 0.9904 +vn -0.0286 0.9565 0.2902 +vn -0.0938 -0.2890 0.9527 +vn -0.0464 0.8810 0.4709 +vn -0.0865 -0.4696 0.8786 +vn -0.0624 0.7715 0.6332 +vn -0.0759 -0.6326 0.7708 +vn -0.0759 0.6326 0.7708 +vn -0.0846 0.9565 0.2790 +vn -0.2779 -0.2890 0.9161 +vn -0.1374 0.8810 0.4528 +vn -0.2563 -0.4696 0.8448 +vn -0.1847 0.7715 0.6088 +vn -0.2248 -0.6326 0.7412 +vn -0.2248 0.6326 0.7412 +vn -0.1847 -0.7715 0.6088 +vn -0.2563 0.4696 0.8448 +vn -0.1374 -0.8810 0.4528 +vn -0.2779 0.2890 0.9161 +vn -0.0846 -0.9565 0.2790 +vn -0.2889 0.0975 0.9524 +vn -0.0286 0.9951 0.0942 +vn -0.0286 -0.9951 0.0942 +vn -0.2889 -0.0975 0.9524 +vn -0.4162 0.4696 0.7786 +vn -0.2230 -0.8810 0.4173 +vn -0.4513 0.2890 0.8443 +vn -0.1374 -0.9565 0.2571 +vn -0.4691 0.0975 0.8777 +vn -0.0464 0.9951 0.0869 +vn -0.0464 -0.9951 0.0869 +vn -0.4691 -0.0975 0.8777 +vn -0.1374 0.9565 0.2571 +vn -0.4513 -0.2890 0.8443 +vn -0.2230 0.8810 0.4173 +vn -0.4162 -0.4696 0.7786 +vn -0.2999 0.7715 0.5611 +vn -0.3651 -0.6326 0.6831 +vn -0.3651 0.6326 0.6831 +vn -0.2999 -0.7715 0.5611 +vn -0.6073 -0.2890 0.7400 +vn -0.3002 0.8810 0.3658 +vn -0.5601 -0.4696 0.6825 +vn -0.4036 0.7715 0.4918 +vn -0.4913 -0.6326 0.5987 +vn -0.4913 0.6326 0.5987 +vn -0.4036 -0.7715 0.4918 +vn -0.5601 0.4696 0.6825 +vn -0.3002 -0.8810 0.3658 +vn -0.6073 0.2890 0.7400 +vn -0.1850 -0.9565 0.2254 +vn -0.6314 0.0975 0.7693 +vn -0.0625 0.9951 0.0761 +vn -0.0625 -0.9951 0.0761 +vn -0.6314 -0.0975 0.7693 +vn -0.1850 0.9565 0.2254 +vn -0.3658 -0.8810 0.3002 +vn -0.7400 0.2890 0.6073 +vn -0.2254 -0.9565 0.1850 +vn -0.7693 0.0975 0.6314 +vn -0.0761 0.9951 0.0625 +vn -0.0761 -0.9951 0.0625 +vn -0.7693 -0.0975 0.6314 +vn -0.2254 0.9565 0.1850 +vn -0.7400 -0.2890 0.6073 +vn -0.3658 0.8810 0.3002 +vn -0.6825 -0.4696 0.5601 +vn -0.4918 0.7715 0.4036 +vn -0.5987 -0.6326 0.4913 +vn -0.5987 0.6326 0.4913 +vn -0.4918 -0.7715 0.4036 +vn -0.6825 0.4696 0.5601 +vn -0.7786 -0.4696 0.4162 +vn -0.5611 0.7715 0.2999 +vn -0.6831 -0.6326 0.3651 +vn -0.6831 0.6326 0.3651 +vn -0.5611 -0.7715 0.2999 +vn -0.7786 0.4696 0.4162 +vn -0.4173 -0.8810 0.2230 +vn -0.8443 0.2890 0.4513 +vn -0.2571 -0.9565 0.1374 +vn -0.8777 0.0975 0.4691 +vn -0.0869 0.9951 0.0464 +vn -0.0869 -0.9951 0.0464 +vn -0.8777 -0.0975 0.4691 +vn -0.2571 0.9565 0.1374 +vn -0.8443 -0.2890 0.4513 +vn -0.4173 0.8810 0.2230 +vn -0.2790 -0.9565 0.0846 +vn -0.9524 0.0975 0.2889 +vn -0.0942 0.9951 0.0286 +vn -0.0942 -0.9951 0.0286 +vn -0.9524 -0.0975 0.2889 +vn -0.2790 0.9565 0.0846 +vn -0.9161 -0.2890 0.2779 +vn -0.4528 0.8810 0.1374 +vn -0.8448 -0.4696 0.2563 +vn -0.6088 0.7715 0.1847 +vn -0.7412 -0.6326 0.2248 +vn -0.7412 0.6326 0.2248 +vn -0.6088 -0.7715 0.1847 +vn -0.8448 0.4696 0.2563 +vn -0.4528 -0.8810 0.1374 +vn -0.9161 0.2890 0.2779 +vn -0.6332 0.7715 0.0624 +vn -0.7708 -0.6326 0.0759 +vn -0.7708 0.6326 0.0759 +vn -0.6332 -0.7715 0.0624 +vn -0.8786 0.4696 0.0865 +vn -0.4709 -0.8810 0.0464 +vn -0.9527 0.2890 0.0938 +vn -0.2902 -0.9565 0.0286 +vn -0.9904 0.0975 0.0975 +vn -0.0980 0.9951 0.0097 +vn -0.0980 -0.9951 0.0097 +vn -0.9904 -0.0975 0.0975 +vn -0.2902 0.9565 0.0286 +vn -0.9527 -0.2890 0.0938 +vn -0.4709 0.8810 0.0464 +vn -0.8786 -0.4696 0.0865 +vn -0.9904 0.0975 -0.0976 +vn -0.0980 0.9951 -0.0097 +vn -0.0980 -0.9951 -0.0097 +vn -0.9904 -0.0975 -0.0976 +vn -0.2902 0.9565 -0.0286 +vn -0.9527 -0.2890 -0.0938 +vn -0.4709 0.8810 -0.0464 +vn -0.8786 -0.4696 -0.0865 +vn -0.6332 0.7715 -0.0624 +vn -0.7708 -0.6326 -0.0759 +vn -0.7708 0.6326 -0.0759 +vn -0.6332 -0.7715 -0.0624 +vn -0.8786 0.4696 -0.0865 +vn -0.4709 -0.8810 -0.0464 +vn -0.9527 0.2890 -0.0938 +vn -0.2902 -0.9565 -0.0286 +vn -0.7412 -0.6326 -0.2248 +vn -0.7412 0.6326 -0.2248 +vn -0.6088 -0.7715 -0.1847 +vn -0.8448 0.4696 -0.2563 +vn -0.4528 -0.8810 -0.1374 +vn -0.9161 0.2890 -0.2779 +vn -0.2790 -0.9565 -0.0846 +vn -0.9524 0.0975 -0.2889 +vn -0.0942 0.9951 -0.0286 +vn -0.0942 -0.9951 -0.0286 +vn -0.9524 -0.0975 -0.2889 +vn -0.2790 0.9565 -0.0846 +vn -0.9161 -0.2890 -0.2779 +vn -0.4528 0.8810 -0.1374 +vn -0.8448 -0.4696 -0.2563 +vn -0.6088 0.7715 -0.1847 +vn -0.0869 0.9951 -0.0464 +vn -0.0869 -0.9951 -0.0464 +vn -0.8777 -0.0975 -0.4691 +vn -0.2571 0.9565 -0.1374 +vn -0.8443 -0.2890 -0.4513 +vn -0.4173 0.8810 -0.2231 +vn -0.7786 -0.4696 -0.4162 +vn -0.5611 0.7715 -0.2999 +vn -0.6831 -0.6326 -0.3651 +vn -0.6831 0.6326 -0.3651 +vn -0.5611 -0.7715 -0.2999 +vn -0.7786 0.4696 -0.4162 +vn -0.4173 -0.8810 -0.2231 +vn -0.8443 0.2890 -0.4513 +vn -0.2571 -0.9565 -0.1374 +vn -0.8777 0.0975 -0.4691 +vn -0.5987 0.6326 -0.4913 +vn -0.4918 -0.7715 -0.4036 +vn -0.6825 0.4696 -0.5601 +vn -0.3658 -0.8810 -0.3002 +vn -0.7400 0.2890 -0.6073 +vn -0.2254 -0.9565 -0.1850 +vn -0.7693 0.0975 -0.6314 +vn -0.0761 0.9951 -0.0625 +vn -0.0761 -0.9951 -0.0625 +vn -0.7693 -0.0975 -0.6314 +vn -0.2254 0.9565 -0.1850 +vn -0.7400 -0.2890 -0.6073 +vn -0.3658 0.8810 -0.3002 +vn -0.6825 -0.4696 -0.5601 +vn -0.4918 0.7715 -0.4036 +vn -0.5987 -0.6326 -0.4913 +vn -0.6314 -0.0975 -0.7693 +vn -0.1850 0.9565 -0.2254 +vn -0.6073 -0.2890 -0.7400 +vn -0.3002 0.8810 -0.3658 +vn -0.5601 -0.4696 -0.6825 +vn -0.4036 0.7715 -0.4918 +vn -0.4913 -0.6326 -0.5987 +vn -0.4913 0.6326 -0.5987 +vn -0.4036 -0.7715 -0.4918 +vn -0.5601 0.4696 -0.6825 +vn -0.3002 -0.8810 -0.3658 +vn -0.6073 0.2890 -0.7400 +vn -0.1850 -0.9565 -0.2254 +vn -0.6314 0.0975 -0.7693 +vn -0.0625 0.9951 -0.0761 +vn -0.0625 -0.9951 -0.0761 +vn -0.2999 -0.7715 -0.5611 +vn -0.4162 0.4696 -0.7786 +vn -0.2230 -0.8810 -0.4173 +vn -0.4513 0.2890 -0.8443 +vn -0.1374 -0.9565 -0.2571 +vn -0.4691 0.0975 -0.8777 +vn -0.0464 0.9951 -0.0869 +vn -0.0464 -0.9951 -0.0869 +vn -0.4691 -0.0975 -0.8777 +vn -0.1374 0.9565 -0.2571 +vn -0.4513 -0.2890 -0.8443 +vn -0.2230 0.8810 -0.4173 +vn -0.4162 -0.4696 -0.7786 +vn -0.2999 0.7715 -0.5611 +vn -0.3651 -0.6326 -0.6831 +vn -0.3651 0.6326 -0.6831 +vn -0.2779 -0.2890 -0.9161 +vn -0.1374 0.8810 -0.4528 +vn -0.2563 -0.4696 -0.8448 +vn -0.1847 0.7715 -0.6088 +vn -0.2248 -0.6326 -0.7412 +vn -0.2248 0.6326 -0.7412 +vn -0.1847 -0.7715 -0.6088 +vn -0.2563 0.4696 -0.8448 +vn -0.1374 -0.8810 -0.4528 +vn -0.2779 0.2890 -0.9161 +vn -0.0846 -0.9565 -0.2790 +vn -0.2889 0.0975 -0.9524 +vn -0.0286 0.9951 -0.0942 +vn -0.0286 -0.9951 -0.0942 +vn -0.2889 -0.0975 -0.9524 +vn -0.0846 0.9565 -0.2790 +vn -0.0464 -0.8810 -0.4709 +vn -0.0938 0.2890 -0.9527 +vn -0.0286 -0.9565 -0.2902 +vn -0.0976 0.0975 -0.9904 +vn -0.0097 0.9951 -0.0980 +vn -0.0097 -0.9951 -0.0980 +vn -0.0976 -0.0975 -0.9904 +vn -0.0286 0.9565 -0.2902 +vn -0.0938 -0.2890 -0.9527 +vn -0.0464 0.8810 -0.4709 +vn -0.0865 -0.4696 -0.8786 +vn -0.0624 0.7715 -0.6332 +vn -0.0759 -0.6326 -0.7708 +vn -0.0759 0.6326 -0.7708 +vn -0.0624 -0.7715 -0.6332 +vn -0.0865 0.4696 -0.8786 +vt 0.750000 0.625000 +vt 0.750000 0.687500 +vt 0.718750 0.687500 +vt 0.718750 0.625000 +vt 0.750000 0.125000 +vt 0.750000 0.187500 +vt 0.718750 0.187500 +vt 0.718750 0.125000 +vt 0.750000 0.562500 +vt 0.718750 0.562500 +vt 0.750000 0.062500 +vt 0.718750 0.062500 +vt 0.750000 0.500000 +vt 0.718750 0.500000 +vt 0.750000 0.937500 +vt 0.734375 1.000000 +vt 0.718750 0.937500 +vt 0.734375 0.000000 +vt 0.750000 0.437500 +vt 0.718750 0.437500 +vt 0.750000 0.875000 +vt 0.718750 0.875000 +vt 0.750000 0.375000 +vt 0.718750 0.375000 +vt 0.750000 0.812500 +vt 0.718750 0.812500 +vt 0.750000 0.312500 +vt 0.718750 0.312500 +vt 0.750000 0.750000 +vt 0.718750 0.750000 +vt 0.750000 0.250000 +vt 0.718750 0.250000 +vt 0.687500 0.312500 +vt 0.687500 0.250000 +vt 0.687500 0.750000 +vt 0.687500 0.687500 +vt 0.687500 0.187500 +vt 0.687500 0.625000 +vt 0.687500 0.125000 +vt 0.687500 0.562500 +vt 0.687500 0.062500 +vt 0.687500 0.500000 +vt 0.703125 1.000000 +vt 0.687500 0.937500 +vt 0.703125 0.000000 +vt 0.687500 0.437500 +vt 0.687500 0.875000 +vt 0.687500 0.375000 +vt 0.687500 0.812500 +vt 0.671875 0.000000 +vt 0.656250 0.062500 +vt 0.656250 0.500000 +vt 0.656250 0.437500 +vt 0.656250 0.937500 +vt 0.656250 0.875000 +vt 0.656250 0.375000 +vt 0.656250 0.812500 +vt 0.656250 0.312500 +vt 0.656250 0.750000 +vt 0.656250 0.250000 +vt 0.656250 0.687500 +vt 0.656250 0.187500 +vt 0.656250 0.625000 +vt 0.656250 0.125000 +vt 0.656250 0.562500 +vt 0.671875 1.000000 +vt 0.625000 0.250000 +vt 0.625000 0.187500 +vt 0.625000 0.687500 +vt 0.625000 0.625000 +vt 0.625000 0.125000 +vt 0.625000 0.562500 +vt 0.625000 0.062500 +vt 0.625000 0.500000 +vt 0.640625 1.000000 +vt 0.625000 0.937500 +vt 0.640625 0.000000 +vt 0.625000 0.437500 +vt 0.625000 0.875000 +vt 0.625000 0.375000 +vt 0.625000 0.812500 +vt 0.625000 0.312500 +vt 0.625000 0.750000 +vt 0.593750 0.937500 +vt 0.593750 0.875000 +vt 0.593750 0.437500 +vt 0.593750 0.375000 +vt 0.593750 0.812500 +vt 0.593750 0.312500 +vt 0.593750 0.750000 +vt 0.593750 0.250000 +vt 0.593750 0.687500 +vt 0.593750 0.187500 +vt 0.593750 0.625000 +vt 0.593750 0.125000 +vt 0.593750 0.562500 +vt 0.593750 0.062500 +vt 0.593750 0.500000 +vt 0.609375 1.000000 +vt 0.609375 0.000000 +vt 0.562500 0.687500 +vt 0.562500 0.625000 +vt 0.562500 0.187500 +vt 0.562500 0.125000 +vt 0.562500 0.562500 +vt 0.562500 0.062500 +vt 0.562500 0.500000 +vt 0.578125 1.000000 +vt 0.562500 0.937500 +vt 0.578125 0.000000 +vt 0.562500 0.437500 +vt 0.562500 0.875000 +vt 0.562500 0.375000 +vt 0.562500 0.812500 +vt 0.562500 0.312500 +vt 0.562500 0.750000 +vt 0.562500 0.250000 +vt 0.531250 0.437500 +vt 0.531250 0.375000 +vt 0.531250 0.875000 +vt 0.531250 0.812500 +vt 0.531250 0.312500 +vt 0.531250 0.750000 +vt 0.531250 0.250000 +vt 0.531250 0.687500 +vt 0.531250 0.187500 +vt 0.531250 0.625000 +vt 0.531250 0.125000 +vt 0.531250 0.562500 +vt 0.531250 0.062500 +vt 0.531250 0.500000 +vt 0.546875 1.000000 +vt 0.531250 0.937500 +vt 0.546875 0.000000 +vt 0.500000 0.187500 +vt 0.500000 0.125000 +vt 0.500000 0.625000 +vt 0.500000 0.562500 +vt 0.500000 0.062500 +vt 0.500000 0.500000 +vt 0.515625 1.000000 +vt 0.500000 0.937500 +vt 0.515625 0.000000 +vt 0.500000 0.437500 +vt 0.500000 0.875000 +vt 0.500000 0.375000 +vt 0.500000 0.812500 +vt 0.500000 0.312500 +vt 0.500000 0.750000 +vt 0.500000 0.250000 +vt 0.500000 0.687500 +vt 0.468750 0.875000 +vt 0.468750 0.812500 +vt 0.468750 0.375000 +vt 0.468750 0.312500 +vt 0.468750 0.750000 +vt 0.468750 0.250000 +vt 0.468750 0.687500 +vt 0.468750 0.187500 +vt 0.468750 0.625000 +vt 0.468750 0.125000 +vt 0.468750 0.562500 +vt 0.468750 0.062500 +vt 0.468750 0.500000 +vt 0.484375 1.000000 +vt 0.468750 0.937500 +vt 0.484375 0.000000 +vt 0.468750 0.437500 +vt 0.437500 0.625000 +vt 0.437500 0.562500 +vt 0.437500 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.500000 +vt 0.453125 1.000000 +vt 0.437500 0.937500 +vt 0.453125 0.000000 +vt 0.437500 0.437500 +vt 0.437500 0.875000 +vt 0.437500 0.375000 +vt 0.437500 0.812500 +vt 0.437500 0.312500 +vt 0.437500 0.750000 +vt 0.437500 0.250000 +vt 0.437500 0.687500 +vt 0.437500 0.187500 +vt 0.406250 0.375000 +vt 0.406250 0.312500 +vt 0.406250 0.812500 +vt 0.406250 0.750000 +vt 0.406250 0.250000 +vt 0.406250 0.687500 +vt 0.406250 0.187500 +vt 0.406250 0.625000 +vt 0.406250 0.125000 +vt 0.406250 0.562500 +vt 0.406250 0.062500 +vt 0.406250 0.500000 +vt 0.421875 1.000000 +vt 0.406250 0.937500 +vt 0.421875 0.000000 +vt 0.406250 0.437500 +vt 0.406250 0.875000 +vt 0.375000 0.125000 +vt 0.375000 0.062500 +vt 0.375000 0.562500 +vt 0.375000 0.500000 +vt 0.390625 1.000000 +vt 0.375000 0.937500 +vt 0.390625 0.000000 +vt 0.375000 0.437500 +vt 0.375000 0.875000 +vt 0.375000 0.375000 +vt 0.375000 0.812500 +vt 0.375000 0.312500 +vt 0.375000 0.750000 +vt 0.375000 0.250000 +vt 0.375000 0.687500 +vt 0.375000 0.187500 +vt 0.375000 0.625000 +vt 0.343750 0.312500 +vt 0.343750 0.250000 +vt 0.343750 0.750000 +vt 0.343750 0.687500 +vt 0.343750 0.187500 +vt 0.343750 0.625000 +vt 0.343750 0.125000 +vt 0.343750 0.562500 +vt 0.343750 0.062500 +vt 0.343750 0.500000 +vt 0.359375 1.000000 +vt 0.343750 0.937500 +vt 0.359375 0.000000 +vt 0.343750 0.437500 +vt 0.343750 0.875000 +vt 0.343750 0.375000 +vt 0.343750 0.812500 +vt 0.328125 1.000000 +vt 0.312500 0.937500 +vt 0.328125 0.000000 +vt 0.312500 0.062500 +vt 0.312500 0.500000 +vt 0.312500 0.437500 +vt 0.312500 0.875000 +vt 0.312500 0.375000 +vt 0.312500 0.812500 +vt 0.312500 0.312500 +vt 0.312500 0.750000 +vt 0.312500 0.250000 +vt 0.312500 0.687500 +vt 0.312500 0.187500 +vt 0.312500 0.625000 +vt 0.312500 0.125000 +vt 0.312500 0.562500 +vt 0.281250 0.750000 +vt 0.281250 0.687500 +vt 0.281250 0.250000 +vt 0.281250 0.187500 +vt 0.281250 0.625000 +vt 0.281250 0.125000 +vt 0.281250 0.562500 +vt 0.281250 0.062500 +vt 0.281250 0.500000 +vt 0.296875 1.000000 +vt 0.281250 0.937500 +vt 0.296875 0.000000 +vt 0.281250 0.437500 +vt 0.281250 0.875000 +vt 0.281250 0.375000 +vt 0.281250 0.812500 +vt 0.281250 0.312500 +vt 0.250000 0.500000 +vt 0.250000 0.437500 +vt 0.250000 0.937500 +vt 0.250000 0.875000 +vt 0.250000 0.375000 +vt 0.250000 0.812500 +vt 0.250000 0.312500 +vt 0.250000 0.750000 +vt 0.250000 0.250000 +vt 0.250000 0.687500 +vt 0.250000 0.187500 +vt 0.250000 0.625000 +vt 0.250000 0.125000 +vt 0.250000 0.562500 +vt 0.250000 0.062500 +vt 0.265625 1.000000 +vt 0.265625 0.000000 +vt 0.218750 0.250000 +vt 0.218750 0.187500 +vt 0.218750 0.687500 +vt 0.218750 0.625000 +vt 0.218750 0.125000 +vt 0.218750 0.562500 +vt 0.218750 0.062500 +vt 0.218750 0.500000 +vt 0.234375 1.000000 +vt 0.218750 0.937500 +vt 0.234375 0.000000 +vt 0.218750 0.437500 +vt 0.218750 0.875000 +vt 0.218750 0.375000 +vt 0.218750 0.812500 +vt 0.218750 0.312500 +vt 0.218750 0.750000 +vt 0.187500 0.937500 +vt 0.187500 0.875000 +vt 0.187500 0.437500 +vt 0.187500 0.375000 +vt 0.187500 0.812500 +vt 0.187500 0.312500 +vt 0.187500 0.750000 +vt 0.187500 0.250000 +vt 0.187500 0.687500 +vt 0.187500 0.187500 +vt 0.187500 0.625000 +vt 0.187500 0.125000 +vt 0.187500 0.562500 +vt 0.187500 0.062500 +vt 0.187500 0.500000 +vt 0.203125 1.000000 +vt 0.203125 0.000000 +vt 0.156250 0.687500 +vt 0.156250 0.625000 +vt 0.156250 0.187500 +vt 0.156250 0.125000 +vt 0.156250 0.562500 +vt 0.156250 0.062500 +vt 0.156250 0.500000 +vt 0.171875 1.000000 +vt 0.156250 0.937500 +vt 0.171875 0.000000 +vt 0.156250 0.437500 +vt 0.156250 0.875000 +vt 0.156250 0.375000 +vt 0.156250 0.812500 +vt 0.156250 0.312500 +vt 0.156250 0.750000 +vt 0.156250 0.250000 +vt 0.125000 0.437500 +vt 0.125000 0.375000 +vt 0.125000 0.875000 +vt 0.125000 0.812500 +vt 0.125000 0.312500 +vt 0.125000 0.750000 +vt 0.125000 0.250000 +vt 0.125000 0.687500 +vt 0.125000 0.187500 +vt 0.125000 0.625000 +vt 0.125000 0.125000 +vt 0.125000 0.562500 +vt 0.125000 0.062500 +vt 0.125000 0.500000 +vt 0.140625 1.000000 +vt 0.125000 0.937500 +vt 0.140625 0.000000 +vt 0.093750 0.187500 +vt 0.093750 0.125000 +vt 0.093750 0.625000 +vt 0.093750 0.562500 +vt 0.093750 0.062500 +vt 0.093750 0.500000 +vt 0.109375 1.000000 +vt 0.093750 0.937500 +vt 0.109375 0.000000 +vt 0.093750 0.437500 +vt 0.093750 0.875000 +vt 0.093750 0.375000 +vt 0.093750 0.812500 +vt 0.093750 0.312500 +vt 0.093750 0.750000 +vt 0.093750 0.250000 +vt 0.093750 0.687500 +vt 0.062500 0.375000 +vt 0.062500 0.312500 +vt 0.062500 0.812500 +vt 0.062500 0.750000 +vt 0.062500 0.250000 +vt 0.062500 0.687500 +vt 0.062500 0.187500 +vt 0.062500 0.625000 +vt 0.062500 0.125000 +vt 0.062500 0.562500 +vt 0.062500 0.062500 +vt 0.062500 0.500000 +vt 0.078125 1.000000 +vt 0.062500 0.937500 +vt 0.078125 0.000000 +vt 0.062500 0.437500 +vt 0.062500 0.875000 +vt 0.031250 0.125000 +vt 0.031250 0.062500 +vt 0.031250 0.562500 +vt 0.031250 0.500000 +vt 0.046875 1.000000 +vt 0.031250 0.937500 +vt 0.046875 0.000000 +vt 0.031250 0.437500 +vt 0.031250 0.875000 +vt 0.031250 0.375000 +vt 0.031250 0.812500 +vt 0.031250 0.312500 +vt 0.031250 0.750000 +vt 0.031250 0.250000 +vt 0.031250 0.687500 +vt 0.031250 0.187500 +vt 0.031250 0.625000 +vt 0.000000 0.812500 +vt 0.000000 0.750000 +vt 0.000000 0.312500 +vt 0.000000 0.250000 +vt 0.000000 0.687500 +vt 0.000000 0.187500 +vt 0.000000 0.625000 +vt 0.000000 0.125000 +vt 0.000000 0.562500 +vt 0.000000 0.062500 +vt 0.000000 0.500000 +vt 0.015625 1.000000 +vt 0.000000 0.937500 +vt 0.015625 0.000000 +vt 0.000000 0.437500 +vt 0.000000 0.875000 +vt 0.000000 0.375000 +vt 1.000000 0.500000 +vt 1.000000 0.562500 +vt 0.968750 0.562500 +vt 0.968750 0.500000 +vt 1.000000 0.937500 +vt 0.984375 1.000000 +vt 0.968750 0.937500 +vt 0.984375 0.000000 +vt 1.000000 0.062500 +vt 0.968750 0.062500 +vt 1.000000 0.437500 +vt 0.968750 0.437500 +vt 1.000000 0.875000 +vt 0.968750 0.875000 +vt 1.000000 0.375000 +vt 0.968750 0.375000 +vt 1.000000 0.812500 +vt 0.968750 0.812500 +vt 1.000000 0.312500 +vt 0.968750 0.312500 +vt 1.000000 0.750000 +vt 0.968750 0.750000 +vt 1.000000 0.250000 +vt 0.968750 0.250000 +vt 1.000000 0.687500 +vt 0.968750 0.687500 +vt 1.000000 0.187500 +vt 0.968750 0.187500 +vt 1.000000 0.625000 +vt 0.968750 0.625000 +vt 1.000000 0.125000 +vt 0.968750 0.125000 +vt 0.937500 0.312500 +vt 0.937500 0.250000 +vt 0.937500 0.750000 +vt 0.937500 0.687500 +vt 0.937500 0.187500 +vt 0.937500 0.625000 +vt 0.937500 0.125000 +vt 0.937500 0.562500 +vt 0.937500 0.062500 +vt 0.937500 0.500000 +vt 0.953125 1.000000 +vt 0.937500 0.937500 +vt 0.953125 0.000000 +vt 0.937500 0.437500 +vt 0.937500 0.875000 +vt 0.937500 0.375000 +vt 0.937500 0.812500 +vt 0.921875 1.000000 +vt 0.906250 0.937500 +vt 0.921875 0.000000 +vt 0.906250 0.062500 +vt 0.906250 0.500000 +vt 0.906250 0.437500 +vt 0.906250 0.875000 +vt 0.906250 0.375000 +vt 0.906250 0.812500 +vt 0.906250 0.312500 +vt 0.906250 0.750000 +vt 0.906250 0.250000 +vt 0.906250 0.687500 +vt 0.906250 0.187500 +vt 0.906250 0.625000 +vt 0.906250 0.125000 +vt 0.906250 0.562500 +vt 0.875000 0.750000 +vt 0.875000 0.687500 +vt 0.875000 0.250000 +vt 0.875000 0.187500 +vt 0.875000 0.625000 +vt 0.875000 0.125000 +vt 0.875000 0.562500 +vt 0.875000 0.062500 +vt 0.875000 0.500000 +vt 0.890625 1.000000 +vt 0.875000 0.937500 +vt 0.890625 0.000000 +vt 0.875000 0.437500 +vt 0.875000 0.875000 +vt 0.875000 0.375000 +vt 0.875000 0.812500 +vt 0.875000 0.312500 +vt 0.843750 0.500000 +vt 0.843750 0.437500 +vt 0.843750 0.937500 +vt 0.843750 0.875000 +vt 0.843750 0.375000 +vt 0.843750 0.812500 +vt 0.843750 0.312500 +vt 0.843750 0.750000 +vt 0.843750 0.250000 +vt 0.843750 0.687500 +vt 0.843750 0.187500 +vt 0.843750 0.625000 +vt 0.843750 0.125000 +vt 0.843750 0.562500 +vt 0.843750 0.062500 +vt 0.859375 1.000000 +vt 0.859375 0.000000 +vt 0.812500 0.250000 +vt 0.812500 0.187500 +vt 0.812500 0.687500 +vt 0.812500 0.625000 +vt 0.812500 0.125000 +vt 0.812500 0.562500 +vt 0.812500 0.062500 +vt 0.812500 0.500000 +vt 0.828125 1.000000 +vt 0.812500 0.937500 +vt 0.828125 0.000000 +vt 0.812500 0.437500 +vt 0.812500 0.875000 +vt 0.812500 0.375000 +vt 0.812500 0.812500 +vt 0.812500 0.312500 +vt 0.812500 0.750000 +vt 0.781250 0.437500 +vt 0.781250 0.375000 +vt 0.781250 0.875000 +vt 0.781250 0.812500 +vt 0.781250 0.312500 +vt 0.781250 0.750000 +vt 0.781250 0.250000 +vt 0.781250 0.687500 +vt 0.781250 0.187500 +vt 0.781250 0.625000 +vt 0.781250 0.125000 +vt 0.781250 0.562500 +vt 0.781250 0.062500 +vt 0.781250 0.500000 +vt 0.796875 1.000000 +vt 0.781250 0.937500 +vt 0.796875 0.000000 +vt 0.765625 1.000000 +vt 0.765625 0.000000 +s 0 +f 477/1/1 2/2/1 11/3/1 12/4/1 +f 481/5/2 480/6/2 19/7/2 20/8/2 +f 3/9/3 477/1/3 12/4/3 13/10/3 +f 482/11/4 481/5/4 20/8/4 21/12/4 +f 4/13/5 3/9/5 13/10/5 14/14/5 +f 474/15/6 82/16/6 7/17/6 +f 308/18/7 482/11/7 21/12/7 +f 5/19/8 4/13/8 14/14/8 15/20/8 +f 475/21/9 474/15/9 7/17/9 8/22/9 +f 478/23/10 5/19/10 15/20/10 16/24/10 +f 1/25/11 475/21/11 8/22/11 9/26/11 +f 6/27/12 478/23/12 16/24/12 17/28/12 +f 476/29/13 1/25/13 9/26/13 10/30/13 +f 479/31/14 6/27/14 17/28/14 18/32/14 +f 2/2/15 476/29/15 10/30/15 11/3/15 +f 480/6/16 479/31/16 18/32/16 19/7/16 +f 18/32/17 17/28/17 32/33/17 33/34/17 +f 11/3/18 10/30/18 25/35/18 26/36/18 +f 19/7/19 18/32/19 33/34/19 34/37/19 +f 12/4/20 11/3/20 26/36/20 27/38/20 +f 20/8/21 19/7/21 34/37/21 35/39/21 +f 13/10/22 12/4/22 27/38/22 28/40/22 +f 21/12/23 20/8/23 35/39/23 36/41/23 +f 14/14/24 13/10/24 28/40/24 29/42/24 +f 7/17/25 82/43/25 22/44/25 +f 308/45/26 21/12/26 36/41/26 +f 15/20/27 14/14/27 29/42/27 30/46/27 +f 8/22/28 7/17/28 22/44/28 23/47/28 +f 16/24/29 15/20/29 30/46/29 31/48/29 +f 9/26/30 8/22/30 23/47/30 24/49/30 +f 17/28/31 16/24/31 31/48/31 32/33/31 +f 10/30/32 9/26/32 24/49/32 25/35/32 +f 308/50/33 36/41/33 51/51/33 +f 30/46/34 29/42/34 44/52/34 45/53/34 +f 23/47/35 22/44/35 37/54/35 38/55/35 +f 31/48/36 30/46/36 45/53/36 46/56/36 +f 24/49/37 23/47/37 38/55/37 39/57/37 +f 32/33/38 31/48/38 46/56/38 47/58/38 +f 25/35/39 24/49/39 39/57/39 40/59/39 +f 33/34/40 32/33/40 47/58/40 48/60/40 +f 26/36/41 25/35/41 40/59/41 41/61/41 +f 34/37/42 33/34/42 48/60/42 49/62/42 +f 27/38/43 26/36/43 41/61/43 42/63/43 +f 35/39/44 34/37/44 49/62/44 50/64/44 +f 28/40/45 27/38/45 42/63/45 43/65/45 +f 36/41/46 35/39/46 50/64/46 51/51/46 +f 29/42/47 28/40/47 43/65/47 44/52/47 +f 22/44/48 82/66/48 37/54/48 +f 49/62/49 48/60/49 63/67/49 64/68/49 +f 42/63/50 41/61/50 56/69/50 57/70/50 +f 50/64/51 49/62/51 64/68/51 65/71/51 +f 43/65/52 42/63/52 57/70/52 58/72/52 +f 51/51/53 50/64/53 65/71/53 66/73/53 +f 44/52/54 43/65/54 58/72/54 59/74/54 +f 37/54/55 82/75/55 52/76/55 +f 308/77/56 51/51/56 66/73/56 +f 45/53/57 44/52/57 59/74/57 60/78/57 +f 38/55/58 37/54/58 52/76/58 53/79/58 +f 46/56/59 45/53/59 60/78/59 61/80/59 +f 39/57/60 38/55/60 53/79/60 54/81/60 +f 47/58/61 46/56/61 61/80/61 62/82/61 +f 40/59/62 39/57/62 54/81/62 55/83/62 +f 48/60/63 47/58/63 62/82/63 63/67/63 +f 41/61/64 40/59/64 55/83/64 56/69/64 +f 53/79/65 52/76/65 67/84/65 68/85/65 +f 61/80/66 60/78/66 75/86/66 76/87/66 +f 54/81/67 53/79/67 68/85/67 69/88/67 +f 62/82/68 61/80/68 76/87/68 77/89/68 +f 55/83/69 54/81/69 69/88/69 70/90/69 +f 63/67/70 62/82/70 77/89/70 78/91/70 +f 56/69/71 55/83/71 70/90/71 71/92/71 +f 64/68/72 63/67/72 78/91/72 79/93/72 +f 57/70/73 56/69/73 71/92/73 72/94/73 +f 65/71/74 64/68/74 79/93/74 80/95/74 +f 58/72/75 57/70/75 72/94/75 73/96/75 +f 66/73/76 65/71/76 80/95/76 81/97/76 +f 59/74/77 58/72/77 73/96/77 74/98/77 +f 52/76/78 82/99/78 67/84/78 +f 308/100/79 66/73/79 81/97/79 +f 60/78/80 59/74/80 74/98/80 75/86/80 +f 72/94/81 71/92/81 87/101/81 88/102/81 +f 80/95/82 79/93/82 95/103/82 96/104/82 +f 73/96/83 72/94/83 88/102/83 89/105/83 +f 81/97/84 80/95/84 96/104/84 97/106/84 +f 74/98/85 73/96/85 89/105/85 90/107/85 +f 67/84/86 82/108/86 83/109/86 +f 308/110/87 81/97/87 97/106/87 +f 75/86/88 74/98/88 90/107/88 91/111/88 +f 68/85/89 67/84/89 83/109/89 84/112/89 +f 76/87/90 75/86/90 91/111/90 92/113/90 +f 69/88/91 68/85/91 84/112/91 85/114/91 +f 77/89/92 76/87/92 92/113/92 93/115/92 +f 70/90/93 69/88/93 85/114/93 86/116/93 +f 78/91/94 77/89/94 93/115/94 94/117/94 +f 71/92/95 70/90/95 86/116/95 87/101/95 +f 79/93/96 78/91/96 94/117/96 95/103/96 +f 92/113/97 91/111/97 106/118/97 107/119/97 +f 85/114/98 84/112/98 99/120/98 100/121/98 +f 93/115/99 92/113/99 107/119/99 108/122/99 +f 86/116/100 85/114/100 100/121/100 101/123/100 +f 94/117/101 93/115/101 108/122/101 109/124/101 +f 87/101/102 86/116/102 101/123/102 102/125/102 +f 95/103/103 94/117/103 109/124/103 110/126/103 +f 88/102/104 87/101/104 102/125/104 103/127/104 +f 96/104/105 95/103/105 110/126/105 111/128/105 +f 89/105/106 88/102/106 103/127/106 104/129/106 +f 97/106/107 96/104/107 111/128/107 112/130/107 +f 90/107/108 89/105/108 104/129/108 105/131/108 +f 83/109/109 82/132/109 98/133/109 +f 308/134/110 97/106/110 112/130/110 +f 91/111/111 90/107/111 105/131/111 106/118/111 +f 84/112/112 83/109/112 98/133/112 99/120/112 +f 111/128/113 110/126/113 125/135/113 126/136/113 +f 104/129/114 103/127/114 118/137/114 119/138/114 +f 112/130/115 111/128/115 126/136/115 127/139/115 +f 105/131/116 104/129/116 119/138/116 120/140/116 +f 98/133/117 82/141/117 113/142/117 +f 308/143/118 112/130/118 127/139/118 +f 106/118/119 105/131/119 120/140/119 121/144/119 +f 99/120/120 98/133/120 113/142/120 114/145/120 +f 107/119/121 106/118/121 121/144/121 122/146/121 +f 100/121/122 99/120/122 114/145/122 115/147/122 +f 108/122/123 107/119/123 122/146/123 123/148/123 +f 101/123/124 100/121/124 115/147/124 116/149/124 +f 109/124/125 108/122/125 123/148/125 124/150/125 +f 102/125/126 101/123/126 116/149/126 117/151/126 +f 110/126/127 109/124/127 124/150/127 125/135/127 +f 103/127/128 102/125/128 117/151/128 118/137/128 +f 115/147/129 114/145/129 129/152/129 130/153/129 +f 123/148/130 122/146/130 137/154/130 138/155/130 +f 116/149/131 115/147/131 130/153/131 131/156/131 +f 124/150/132 123/148/132 138/155/132 139/157/132 +f 117/151/133 116/149/133 131/156/133 132/158/133 +f 125/135/134 124/150/134 139/157/134 140/159/134 +f 118/137/135 117/151/135 132/158/135 133/160/135 +f 126/136/136 125/135/136 140/159/136 141/161/136 +f 119/138/137 118/137/137 133/160/137 134/162/137 +f 127/139/138 126/136/138 141/161/138 142/163/138 +f 120/140/139 119/138/139 134/162/139 135/164/139 +f 113/142/140 82/165/140 128/166/140 +f 308/167/141 127/139/141 142/163/141 +f 121/144/142 120/140/142 135/164/142 136/168/142 +f 114/145/143 113/142/143 128/166/143 129/152/143 +f 122/146/144 121/144/144 136/168/144 137/154/144 +f 134/162/145 133/160/145 148/169/145 149/170/145 +f 142/163/146 141/161/146 156/171/146 157/172/146 +f 135/164/147 134/162/147 149/170/147 150/173/147 +f 128/166/148 82/174/148 143/175/148 +f 308/176/149 142/163/149 157/172/149 +f 136/168/150 135/164/150 150/173/150 151/177/150 +f 129/152/151 128/166/151 143/175/151 144/178/151 +f 137/154/152 136/168/152 151/177/152 152/179/152 +f 130/153/153 129/152/153 144/178/153 145/180/153 +f 138/155/154 137/154/154 152/179/154 153/181/154 +f 131/156/155 130/153/155 145/180/155 146/182/155 +f 139/157/156 138/155/156 153/181/156 154/183/156 +f 132/158/157 131/156/157 146/182/157 147/184/157 +f 140/159/158 139/157/158 154/183/158 155/185/158 +f 133/160/159 132/158/159 147/184/159 148/169/159 +f 141/161/160 140/159/160 155/185/160 156/171/160 +f 153/181/161 152/179/161 167/186/161 168/187/161 +f 146/182/162 145/180/162 160/188/162 161/189/162 +f 154/183/163 153/181/163 168/187/163 169/190/163 +f 147/184/164 146/182/164 161/189/164 162/191/164 +f 155/185/165 154/183/165 169/190/165 170/192/165 +f 148/169/166 147/184/166 162/191/166 163/193/166 +f 156/171/167 155/185/167 170/192/167 171/194/167 +f 149/170/168 148/169/168 163/193/168 164/195/168 +f 157/172/169 156/171/169 171/194/169 172/196/169 +f 150/173/170 149/170/170 164/195/170 165/197/170 +f 143/175/171 82/198/171 158/199/171 +f 308/200/172 157/172/172 172/196/172 +f 151/177/173 150/173/173 165/197/173 166/201/173 +f 144/178/174 143/175/174 158/199/174 159/202/174 +f 152/179/175 151/177/175 166/201/175 167/186/175 +f 145/180/176 144/178/176 159/202/176 160/188/176 +f 172/196/177 171/194/177 186/203/177 187/204/177 +f 165/197/178 164/195/178 179/205/178 180/206/178 +f 158/199/179 82/207/179 173/208/179 +f 308/209/180 172/196/180 187/204/180 +f 166/201/181 165/197/181 180/206/181 181/210/181 +f 159/202/182 158/199/182 173/208/182 174/211/182 +f 167/186/183 166/201/183 181/210/183 182/212/183 +f 160/188/184 159/202/184 174/211/184 175/213/184 +f 168/187/185 167/186/185 182/212/185 183/214/185 +f 161/189/186 160/188/186 175/213/186 176/215/186 +f 169/190/187 168/187/187 183/214/187 184/216/187 +f 162/191/188 161/189/188 176/215/188 177/217/188 +f 170/192/189 169/190/189 184/216/189 185/218/189 +f 163/193/190 162/191/190 177/217/190 178/219/190 +f 171/194/191 170/192/191 185/218/191 186/203/191 +f 164/195/192 163/193/192 178/219/192 179/205/192 +f 184/216/193 183/214/193 198/220/193 199/221/193 +f 177/217/194 176/215/194 191/222/194 192/223/194 +f 185/218/195 184/216/195 199/221/195 200/224/195 +f 178/219/196 177/217/196 192/223/196 193/225/196 +f 186/203/197 185/218/197 200/224/197 201/226/197 +f 179/205/198 178/219/198 193/225/198 194/227/198 +f 187/204/199 186/203/199 201/226/199 202/228/199 +f 180/206/200 179/205/200 194/227/200 195/229/200 +f 173/208/201 82/230/201 188/231/201 +f 308/232/202 187/204/202 202/228/202 +f 181/210/203 180/206/203 195/229/203 196/233/203 +f 174/211/204 173/208/204 188/231/204 189/234/204 +f 182/212/205 181/210/205 196/233/205 197/235/205 +f 175/213/206 174/211/206 189/234/206 190/236/206 +f 183/214/207 182/212/207 197/235/207 198/220/207 +f 176/215/208 175/213/208 190/236/208 191/222/208 +f 188/231/209 82/237/209 203/238/209 +f 308/239/210 202/228/210 217/240/210 +f 196/233/211 195/229/211 210/241/211 211/242/211 +f 189/234/212 188/231/212 203/238/212 204/243/212 +f 197/235/213 196/233/213 211/242/213 212/244/213 +f 190/236/214 189/234/214 204/243/214 205/245/214 +f 198/220/215 197/235/215 212/244/215 213/246/215 +f 191/222/216 190/236/216 205/245/216 206/247/216 +f 199/221/217 198/220/217 213/246/217 214/248/217 +f 192/223/218 191/222/218 206/247/218 207/249/218 +f 200/224/219 199/221/219 214/248/219 215/250/219 +f 193/225/220 192/223/220 207/249/220 208/251/220 +f 201/226/221 200/224/221 215/250/221 216/252/221 +f 194/227/222 193/225/222 208/251/222 209/253/222 +f 202/228/223 201/226/223 216/252/223 217/240/223 +f 195/229/224 194/227/224 209/253/224 210/241/224 +f 207/249/225 206/247/225 221/254/225 222/255/225 +f 215/250/226 214/248/226 229/256/226 230/257/226 +f 208/251/227 207/249/227 222/255/227 223/258/227 +f 216/252/228 215/250/228 230/257/228 231/259/228 +f 209/253/229 208/251/229 223/258/229 224/260/229 +f 217/240/230 216/252/230 231/259/230 232/261/230 +f 210/241/231 209/253/231 224/260/231 225/262/231 +f 203/238/232 82/263/232 218/264/232 +f 308/265/233 217/240/233 232/261/233 +f 211/242/234 210/241/234 225/262/234 226/266/234 +f 204/243/235 203/238/235 218/264/235 219/267/235 +f 212/244/236 211/242/236 226/266/236 227/268/236 +f 205/245/237 204/243/237 219/267/237 220/269/237 +f 213/246/238 212/244/238 227/268/238 228/270/238 +f 206/247/239 205/245/239 220/269/239 221/254/239 +f 214/248/240 213/246/240 228/270/240 229/256/240 +f 226/266/241 225/262/241 240/271/241 241/272/241 +f 219/267/242 218/264/242 233/273/242 234/274/242 +f 227/268/243 226/266/243 241/272/243 242/275/243 +f 220/269/244 219/267/244 234/274/244 235/276/244 +f 228/270/245 227/268/245 242/275/245 243/277/245 +f 221/254/246 220/269/246 235/276/246 236/278/246 +f 229/256/247 228/270/247 243/277/247 244/279/247 +f 222/255/248 221/254/248 236/278/248 237/280/248 +f 230/257/249 229/256/249 244/279/249 245/281/249 +f 223/258/250 222/255/250 237/280/250 238/282/250 +f 231/259/251 230/257/251 245/281/251 246/283/251 +f 224/260/252 223/258/252 238/282/252 239/284/252 +f 232/261/253 231/259/253 246/283/253 247/285/253 +f 225/262/254 224/260/254 239/284/254 240/271/254 +f 218/264/255 82/286/255 233/273/255 +f 308/287/256 232/261/256 247/285/256 +f 245/281/257 244/279/257 259/288/257 260/289/257 +f 238/282/258 237/280/258 252/290/258 253/291/258 +f 246/283/259 245/281/259 260/289/259 261/292/259 +f 239/284/260 238/282/260 253/291/260 254/293/260 +f 247/285/261 246/283/261 261/292/261 262/294/261 +f 240/271/262 239/284/262 254/293/262 255/295/262 +f 233/273/263 82/296/263 248/297/263 +f 308/298/264 247/285/264 262/294/264 +f 241/272/265 240/271/265 255/295/265 256/299/265 +f 234/274/266 233/273/266 248/297/266 249/300/266 +f 242/275/267 241/272/267 256/299/267 257/301/267 +f 235/276/268 234/274/268 249/300/268 250/302/268 +f 243/277/269 242/275/269 257/301/269 258/303/269 +f 236/278/270 235/276/270 250/302/270 251/304/270 +f 244/279/271 243/277/271 258/303/271 259/288/271 +f 237/280/272 236/278/272 251/304/272 252/290/272 +f 249/300/273 248/297/273 263/305/273 264/306/273 +f 257/301/274 256/299/274 271/307/274 272/308/274 +f 250/302/275 249/300/275 264/306/275 265/309/275 +f 258/303/276 257/301/276 272/308/276 273/310/276 +f 251/304/277 250/302/277 265/309/277 266/311/277 +f 259/288/278 258/303/278 273/310/278 274/312/278 +f 252/290/279 251/304/279 266/311/279 267/313/279 +f 260/289/280 259/288/280 274/312/280 275/314/280 +f 253/291/281 252/290/281 267/313/281 268/315/281 +f 261/292/282 260/289/282 275/314/282 276/316/282 +f 254/293/283 253/291/283 268/315/283 269/317/283 +f 262/294/284 261/292/284 276/316/284 277/318/284 +f 255/295/285 254/293/285 269/317/285 270/319/285 +f 248/297/286 82/320/286 263/305/286 +f 308/321/287 262/294/287 277/318/287 +f 256/299/288 255/295/288 270/319/288 271/307/288 +f 268/315/289 267/313/289 282/322/289 283/323/289 +f 276/316/290 275/314/290 290/324/290 291/325/290 +f 269/317/291 268/315/291 283/323/291 284/326/291 +f 277/318/292 276/316/292 291/325/292 292/327/292 +f 270/319/293 269/317/293 284/326/293 285/328/293 +f 263/305/294 82/329/294 278/330/294 +f 308/331/295 277/318/295 292/327/295 +f 271/307/296 270/319/296 285/328/296 286/332/296 +f 264/306/297 263/305/297 278/330/297 279/333/297 +f 272/308/298 271/307/298 286/332/298 287/334/298 +f 265/309/299 264/306/299 279/333/299 280/335/299 +f 273/310/300 272/308/300 287/334/300 288/336/300 +f 266/311/301 265/309/301 280/335/301 281/337/301 +f 274/312/302 273/310/302 288/336/302 289/338/302 +f 267/313/303 266/311/303 281/337/303 282/322/303 +f 275/314/304 274/312/304 289/338/304 290/324/304 +f 287/334/305 286/332/305 301/339/305 302/340/305 +f 280/335/306 279/333/306 294/341/306 295/342/306 +f 288/336/307 287/334/307 302/340/307 303/343/307 +f 281/337/308 280/335/308 295/342/308 296/344/308 +f 289/338/309 288/336/309 303/343/309 304/345/309 +f 282/322/310 281/337/310 296/344/310 297/346/310 +f 290/324/311 289/338/311 304/345/311 305/347/311 +f 283/323/312 282/322/312 297/346/312 298/348/312 +f 291/325/313 290/324/313 305/347/313 306/349/313 +f 284/326/314 283/323/314 298/348/314 299/350/314 +f 292/327/315 291/325/315 306/349/315 307/351/315 +f 285/328/316 284/326/316 299/350/316 300/352/316 +f 278/330/317 82/353/317 293/354/317 +f 308/355/318 292/327/318 307/351/318 +f 286/332/319 285/328/319 300/352/319 301/339/319 +f 279/333/320 278/330/320 293/354/320 294/341/320 +f 306/349/321 305/347/321 321/356/321 322/357/321 +f 299/350/322 298/348/322 314/358/322 315/359/322 +f 307/351/323 306/349/323 322/357/323 323/360/323 +f 300/352/324 299/350/324 315/359/324 316/361/324 +f 293/354/325 82/362/325 309/363/325 +f 308/364/326 307/351/326 323/360/326 +f 301/339/327 300/352/327 316/361/327 317/365/327 +f 294/341/328 293/354/328 309/363/328 310/366/328 +f 302/340/329 301/339/329 317/365/329 318/367/329 +f 295/342/330 294/341/330 310/366/330 311/368/330 +f 303/343/331 302/340/331 318/367/331 319/369/331 +f 296/344/332 295/342/332 311/368/332 312/370/332 +f 304/345/333 303/343/333 319/369/333 320/371/333 +f 297/346/334 296/344/334 312/370/334 313/372/334 +f 305/347/335 304/345/335 320/371/335 321/356/335 +f 298/348/336 297/346/336 313/372/336 314/358/336 +f 319/369/337 318/367/337 333/373/337 334/374/337 +f 312/370/338 311/368/338 326/375/338 327/376/338 +f 320/371/339 319/369/339 334/374/339 335/377/339 +f 313/372/340 312/370/340 327/376/340 328/378/340 +f 321/356/341 320/371/341 335/377/341 336/379/341 +f 314/358/342 313/372/342 328/378/342 329/380/342 +f 322/357/343 321/356/343 336/379/343 337/381/343 +f 315/359/344 314/358/344 329/380/344 330/382/344 +f 323/360/345 322/357/345 337/381/345 338/383/345 +f 316/361/346 315/359/346 330/382/346 331/384/346 +f 309/363/347 82/385/347 324/386/347 +f 308/387/348 323/360/348 338/383/348 +f 317/365/349 316/361/349 331/384/349 332/388/349 +f 310/366/350 309/363/350 324/386/350 325/389/350 +f 318/367/351 317/365/351 332/388/351 333/373/351 +f 311/368/352 310/366/352 325/389/352 326/375/352 +f 338/383/353 337/381/353 352/390/353 353/391/353 +f 331/384/354 330/382/354 345/392/354 346/393/354 +f 324/386/355 82/394/355 339/395/355 +f 308/396/356 338/383/356 353/391/356 +f 332/388/357 331/384/357 346/393/357 347/397/357 +f 325/389/358 324/386/358 339/395/358 340/398/358 +f 333/373/359 332/388/359 347/397/359 348/399/359 +f 326/375/360 325/389/360 340/398/360 341/400/360 +f 334/374/361 333/373/361 348/399/361 349/401/361 +f 327/376/362 326/375/362 341/400/362 342/402/362 +f 335/377/363 334/374/363 349/401/363 350/403/363 +f 328/378/364 327/376/364 342/402/364 343/404/364 +f 336/379/365 335/377/365 350/403/365 351/405/365 +f 329/380/366 328/378/366 343/404/366 344/406/366 +f 337/381/367 336/379/367 351/405/367 352/390/367 +f 330/382/368 329/380/368 344/406/368 345/392/368 +f 342/402/369 341/400/369 356/407/369 357/408/369 +f 350/403/370 349/401/370 364/409/370 365/410/370 +f 343/404/371 342/402/371 357/408/371 358/411/371 +f 351/405/372 350/403/372 365/410/372 366/412/372 +f 344/406/373 343/404/373 358/411/373 359/413/373 +f 352/390/374 351/405/374 366/412/374 367/414/374 +f 345/392/375 344/406/375 359/413/375 360/415/375 +f 353/391/376 352/390/376 367/414/376 368/416/376 +f 346/393/377 345/392/377 360/415/377 361/417/377 +f 339/395/378 82/418/378 354/419/378 +f 308/420/379 353/391/379 368/416/379 +f 347/397/380 346/393/380 361/417/380 362/421/380 +f 340/398/381 339/395/381 354/419/381 355/422/381 +f 348/399/382 347/397/382 362/421/382 363/423/382 +f 341/400/383 340/398/383 355/422/383 356/407/383 +f 349/401/384 348/399/384 363/423/384 364/409/384 +f 361/424/385 360/425/385 375/426/385 376/427/385 +f 354/428/386 82/429/386 369/430/386 +f 308/431/387 368/432/387 383/433/387 +f 362/434/388 361/424/388 376/427/388 377/435/388 +f 355/436/389 354/428/389 369/430/389 370/437/389 +f 363/438/390 362/434/390 377/435/390 378/439/390 +f 356/440/391 355/436/391 370/437/391 371/441/391 +f 364/442/392 363/438/392 378/439/392 379/443/392 +f 357/444/393 356/440/393 371/441/393 372/445/393 +f 365/446/394 364/442/394 379/443/394 380/447/394 +f 358/448/395 357/444/395 372/445/395 373/449/395 +f 366/450/396 365/446/396 380/447/396 381/451/396 +f 359/452/397 358/448/397 373/449/397 374/453/397 +f 367/454/398 366/450/398 381/451/398 382/455/398 +f 360/425/399 359/452/399 374/453/399 375/426/399 +f 368/432/400 367/454/400 382/455/400 383/433/400 +f 380/447/401 379/443/401 394/456/401 395/457/401 +f 373/449/402 372/445/402 387/458/402 388/459/402 +f 381/451/403 380/447/403 395/457/403 396/460/403 +f 374/453/404 373/449/404 388/459/404 389/461/404 +f 382/455/405 381/451/405 396/460/405 397/462/405 +f 375/426/406 374/453/406 389/461/406 390/463/406 +f 383/433/407 382/455/407 397/462/407 398/464/407 +f 376/427/408 375/426/408 390/463/408 391/465/408 +f 369/430/409 82/466/409 384/467/409 +f 308/468/410 383/433/410 398/464/410 +f 377/435/411 376/427/411 391/465/411 392/469/411 +f 370/437/412 369/430/412 384/467/412 385/470/412 +f 378/439/413 377/435/413 392/469/413 393/471/413 +f 371/441/414 370/437/414 385/470/414 386/472/414 +f 379/443/415 378/439/415 393/471/415 394/456/415 +f 372/445/416 371/441/416 386/472/416 387/458/416 +f 384/467/417 82/473/417 399/474/417 +f 308/475/418 398/464/418 413/476/418 +f 392/469/419 391/465/419 406/477/419 407/478/419 +f 385/470/420 384/467/420 399/474/420 400/479/420 +f 393/471/421 392/469/421 407/478/421 408/480/421 +f 386/472/422 385/470/422 400/479/422 401/481/422 +f 394/456/423 393/471/423 408/480/423 409/482/423 +f 387/458/424 386/472/424 401/481/424 402/483/424 +f 395/457/425 394/456/425 409/482/425 410/484/425 +f 388/459/426 387/458/426 402/483/426 403/485/426 +f 396/460/427 395/457/427 410/484/427 411/486/427 +f 389/461/428 388/459/428 403/485/428 404/487/428 +f 397/462/429 396/460/429 411/486/429 412/488/429 +f 390/463/430 389/461/430 404/487/430 405/489/430 +f 398/464/431 397/462/431 412/488/431 413/476/431 +f 391/465/432 390/463/432 405/489/432 406/477/432 +f 403/485/433 402/483/433 417/490/433 418/491/433 +f 411/486/434 410/484/434 425/492/434 426/493/434 +f 404/487/435 403/485/435 418/491/435 419/494/435 +f 412/488/436 411/486/436 426/493/436 427/495/436 +f 405/489/437 404/487/437 419/494/437 420/496/437 +f 413/476/438 412/488/438 427/495/438 428/497/438 +f 406/477/439 405/489/439 420/496/439 421/498/439 +f 399/474/440 82/499/440 414/500/440 +f 308/501/441 413/476/441 428/497/441 +f 407/478/442 406/477/442 421/498/442 422/502/442 +f 400/479/443 399/474/443 414/500/443 415/503/443 +f 408/480/444 407/478/444 422/502/444 423/504/444 +f 401/481/445 400/479/445 415/503/445 416/505/445 +f 409/482/446 408/480/446 423/504/446 424/506/446 +f 402/483/447 401/481/447 416/505/447 417/490/447 +f 410/484/448 409/482/448 424/506/448 425/492/448 +f 422/502/449 421/498/449 436/507/449 437/508/449 +f 415/503/450 414/500/450 429/509/450 430/510/450 +f 423/504/451 422/502/451 437/508/451 438/511/451 +f 416/505/452 415/503/452 430/510/452 431/512/452 +f 424/506/453 423/504/453 438/511/453 439/513/453 +f 417/490/454 416/505/454 431/512/454 432/514/454 +f 425/492/455 424/506/455 439/513/455 440/515/455 +f 418/491/456 417/490/456 432/514/456 433/516/456 +f 426/493/457 425/492/457 440/515/457 441/517/457 +f 419/494/458 418/491/458 433/516/458 434/518/458 +f 427/495/459 426/493/459 441/517/459 442/519/459 +f 420/496/460 419/494/460 434/518/460 435/520/460 +f 428/497/461 427/495/461 442/519/461 443/521/461 +f 421/498/462 420/496/462 435/520/462 436/507/462 +f 414/500/463 82/522/463 429/509/463 +f 308/523/464 428/497/464 443/521/464 +f 441/517/465 440/515/465 455/524/465 456/525/465 +f 434/518/466 433/516/466 448/526/466 449/527/466 +f 442/519/467 441/517/467 456/525/467 457/528/467 +f 435/520/468 434/518/468 449/527/468 450/529/468 +f 443/521/469 442/519/469 457/528/469 458/530/469 +f 436/507/470 435/520/470 450/529/470 451/531/470 +f 429/509/471 82/532/471 444/533/471 +f 308/534/472 443/521/472 458/530/472 +f 437/508/473 436/507/473 451/531/473 452/535/473 +f 430/510/474 429/509/474 444/533/474 445/536/474 +f 438/511/475 437/508/475 452/535/475 453/537/475 +f 431/512/476 430/510/476 445/536/476 446/538/476 +f 439/513/477 438/511/477 453/537/477 454/539/477 +f 432/514/478 431/512/478 446/538/478 447/540/478 +f 440/515/479 439/513/479 454/539/479 455/524/479 +f 433/516/480 432/514/480 447/540/480 448/526/480 +f 453/537/481 452/535/481 467/541/481 468/542/481 +f 446/538/482 445/536/482 460/543/482 461/544/482 +f 454/539/483 453/537/483 468/542/483 469/545/483 +f 447/540/484 446/538/484 461/544/484 462/546/484 +f 455/524/485 454/539/485 469/545/485 470/547/485 +f 448/526/486 447/540/486 462/546/486 463/548/486 +f 456/525/487 455/524/487 470/547/487 471/549/487 +f 449/527/488 448/526/488 463/548/488 464/550/488 +f 457/528/489 456/525/489 471/549/489 472/551/489 +f 450/529/490 449/527/490 464/550/490 465/552/490 +f 458/530/491 457/528/491 472/551/491 473/553/491 +f 451/531/492 450/529/492 465/552/492 466/554/492 +f 444/533/493 82/555/493 459/556/493 +f 308/557/494 458/530/494 473/553/494 +f 452/535/495 451/531/495 466/554/495 467/541/495 +f 445/536/496 444/533/496 459/556/496 460/543/496 +f 472/551/497 471/549/497 480/6/497 481/5/497 +f 465/552/498 464/550/498 477/1/498 3/9/498 +f 473/553/499 472/551/499 481/5/499 482/11/499 +f 466/554/500 465/552/500 3/9/500 4/13/500 +f 459/556/501 82/558/501 474/15/501 +f 308/559/502 473/553/502 482/11/502 +f 467/541/503 466/554/503 4/13/503 5/19/503 +f 460/543/504 459/556/504 474/15/504 475/21/504 +f 468/542/505 467/541/505 5/19/505 478/23/505 +f 461/544/506 460/543/506 475/21/506 1/25/506 +f 469/545/507 468/542/507 478/23/507 6/27/507 +f 462/546/508 461/544/508 1/25/508 476/29/508 +f 470/547/509 469/545/509 6/27/509 479/31/509 +f 463/548/510 462/546/510 476/29/510 2/2/510 +f 471/549/511 470/547/511 479/31/511 480/6/511 +f 464/550/512 463/548/512 2/2/512 477/1/512 diff --git a/assets/shaders/shader.frag b/assets/shaders/shader.frag new file mode 100644 index 0000000..00983e4 --- /dev/null +++ b/assets/shaders/shader.frag @@ -0,0 +1,21 @@ +#version 330 core +in vec4 frag_pos; +in vec4 frag_normal; +in vec3 object_color; + +out vec4 outy; + +void main() { + vec4 norm = normalize(frag_normal); + vec4 ambient = vec4(0.7, 0.7788, 0.46, 1.0); + vec4 light_color = vec4(0.7, 0.7, 0.7, 1.0); + vec4 color = vec4(object_color.xyz, 1.0f); + + vec4 light_location = vec4(0.0, 100.0, 0.0, 1.0); + vec4 light_direction = normalize(light_location - frag_pos); + float diff = max(dot(norm.xyz, light_direction.xyz), 0.0); + + vec4 diffuse = diff * light_color; + + outy = color + diffuse; +} diff --git a/assets/shaders/shader.vert b/assets/shaders/shader.vert new file mode 100644 index 0000000..028d53a --- /dev/null +++ b/assets/shaders/shader.vert @@ -0,0 +1,21 @@ +#version 330 core +layout (location = 0) in vec3 pos; +layout (location = 1) in vec3 normal; + +uniform mat4 view; +uniform mat4 projection; +uniform mat4 translation; +uniform mat4 rotation; +uniform vec3 color; +uniform float scale; + +out vec4 frag_pos; +out vec4 frag_normal; +out vec3 object_color; + +void main() { + gl_Position = projection * view * translation * (vec4(pos.xyz, 1.0) * vec4(scale, scale, scale, 1.0)); + frag_pos = gl_Position; + frag_normal = translation * vec4(normal.xyz, 1.0); + object_color = color; +} \ No newline at end of file diff --git a/dev.c b/dev.c new file mode 100644 index 0000000..6985c8f --- /dev/null +++ b/dev.c @@ -0,0 +1,34 @@ +#include +#include +#include "include/rendlib.h" +#include "include/object.h" + +int main(int argc, char *argv[]) { + int ret = rendlib_start_window(argc, argv); + if (ret < 0) { + fprintf(stderr, "--error: %d\n", ret); + return EXIT_FAILURE; + } + + struct model *m = load_model("assets/models/sphere.obj"); + if (m == NULL) { + fprintf(stderr, "--error: loading model\n"); + return EXIT_FAILURE; + } + + struct object *o = create_object(&objects, 100.0f, m); + if (o == NULL) { + fprintf(stderr, "--error: creating object\n"); + return EXIT_FAILURE; + } + + ret = rendlib_render(); + if (ret < 0) { + fprintf(stderr, "--error: %d\n", ret); + return EXIT_FAILURE; + } + + fprintf(stdout, "--rendering\n"); + + return EXIT_SUCCESS; +} diff --git a/include/math.h b/include/math.h new file mode 100644 index 0000000..edac44a --- /dev/null +++ b/include/math.h @@ -0,0 +1,10 @@ +#ifndef MATH_H +#define MATH_H + +#include "object.h" +#include + +float frand48(void); +void calculate_gravity(struct object *src, struct object *target, vec3 force); + +#endif diff --git a/include/object.h b/include/object.h new file mode 100644 index 0000000..242e913 --- /dev/null +++ b/include/object.h @@ -0,0 +1,45 @@ +#ifndef OBJECT_H +#define OBJECT_H + +#include + +#define MAX_PATHS 2000 + +struct model { + float *vertices; + unsigned int *indices; + float *normals; + + long vertices_num; + long indices_num; + long normals_num; +}; + +struct object { + vec4 translation_force; + vec4 position; + vec3 color; + float mass; + void *next; + + float *paths; + int paths_num; + int paths_max; + + struct model *model; + float scale; + + unsigned int vao; // array object for the actual object + unsigned int vbo; // buffer for vertices + unsigned int ebo; // buffer for indices + unsigned int nbo; // buffer for normals + + unsigned int pvao; // array object for paths + unsigned int pbo; // buffer for paths +}; + +struct model *load_model(const char *path); +int record_path(struct object *obj); +struct object *create_object(struct object **o, float mass, struct model *model); + +#endif diff --git a/include/rendlib.h b/include/rendlib.h new file mode 100644 index 0000000..e167aed --- /dev/null +++ b/include/rendlib.h @@ -0,0 +1,15 @@ +#ifndef RENDLIB_H +#define RENDLIB_H + +enum errs { + err_glfw_init = -1, + err_glfw_win = -2, + err_glew_init = -3, + err_shaders_init = -4, +}; + +extern struct object *objects; +int rendlib_start_window(int argc, char *argv[]); +int rendlib_render(void); + +#endif diff --git a/math.c b/math.c new file mode 100644 index 0000000..c5f418c --- /dev/null +++ b/math.c @@ -0,0 +1,42 @@ +#include "math.h" +#include "include/object.h" +#include + +float frand48(void) { + float number = (float) rand() / (float) (RAND_MAX + 1.0); + float side = rand() % 2; + if (side == 0) { + number = -number; + } + + return number; +} + +void calculate_gravity(struct object *src, struct object *target, vec3 force) { + vec4 v4distance; + glm_vec4_sub(target->position, src->position, v4distance); + + vec3 v3distance; + glm_vec3(v4distance, v3distance); + + float distance_xy = sqrt((v3distance[0] * v3distance[0]) + (v3distance[1] * v3distance[1])); + float distance_xyz = sqrt((distance_xy * distance_xy) + (v3distance[2] * v3distance[2])); + float force_scale = 4.0f; + + float g = 6.67f * 1e-11f; + float top = g * src->mass * target->mass; + + for (int i = 0; i < 3; i++) { + v3distance[i] = (v3distance[i] * v3distance[i] * v3distance[i]); + } + + for (int i = 0; i < 3; i++) { + if (v3distance[i] == 0) { + force[i] = 0.0f; + continue; + } + + force[i] = (top / (distance_xyz / (target->position[i] - src->position[i]))) * force_scale; + } +} + diff --git a/object.c b/object.c new file mode 100644 index 0000000..3114f3c --- /dev/null +++ b/object.c @@ -0,0 +1,129 @@ +#include "include/object.h" + +#include "include/math.h" +#include +#include +#include +#include + +struct model *load_model(const char *path) { + struct model *new_model = (struct model *) calloc(1, sizeof(struct model)); + const struct aiScene *scene = aiImportFile(path, aiProcess_Triangulate); + + if (scene == NULL) { + fprintf(stderr, "Error: failed importing file from path '%s'", path); + } + + for (int mesh_index = 0; mesh_index < scene->mNumMeshes; mesh_index++) { + struct aiMesh *mesh = scene->mMeshes[mesh_index]; + + // fetch vertices + for (int vertex_index = 0; vertex_index < mesh->mNumVertices; vertex_index++) { + struct aiVector3D *vertex = &(mesh->mVertices[vertex_index]); + long start = new_model->vertices_num*3; + + new_model->vertices_num++; + new_model->vertices = (float *) realloc(new_model->vertices, new_model->vertices_num*3*sizeof(float)); + if (new_model->vertices == NULL) { + fprintf(stderr, "Error: failed allocating memory for vertices\n"); + goto error; + } + + memcpy(&new_model->vertices[start], vertex, sizeof(float)*3); + } + + // fetch indices + for (int face_index = 0; face_index < mesh->mNumFaces; face_index++) { + struct aiFace *face = &(mesh->mFaces[face_index]); + long start = new_model->indices_num; + + new_model->indices_num += face->mNumIndices; + new_model->indices = (unsigned int *) realloc(new_model->indices, sizeof(unsigned int)*new_model->indices_num); + if (new_model->indices == NULL) { + fprintf(stderr, "Error: failed allocating memory for indices\n"); + goto error; + } + + memcpy(&new_model->indices[start], face->mIndices, sizeof(unsigned int)*face->mNumIndices); + } + + // fetch normals + for (int normal_index = 0; normal_index < mesh->mNumVertices; normal_index++) { + struct aiVector3D *normal = &(mesh->mNormals[normal_index]); + long start = new_model->normals_num*3; + + new_model->normals_num++; + new_model->normals = (float *) realloc(new_model->normals, new_model->normals_num*3*sizeof(float)); + if (new_model->normals == NULL) { + fprintf(stderr, "Error: failed allocating memory for normals\n"); + goto error; + } + + memcpy(&new_model->normals[start], normal, sizeof(float)*3); + } + } + + return new_model; + +error: + aiReleaseImport(scene); + free(new_model->vertices); + free(new_model->indices); + free(new_model->normals); + free(new_model); + return NULL; +} + +int record_path(struct object *obj) { + if (obj->paths_num <= obj->paths_max) { + obj->paths = (float *) reallocarray(obj->paths, (obj->paths_num+1)*3, sizeof(float)); + } + + if (obj->paths == NULL) { + fprintf(stderr, "Error: failed allocating memory for paths of object\n"); + return -1; + } + + memcpy(obj->paths+(obj->paths_num*3), obj->position, 3*sizeof(float)); + + if (obj->paths_num < obj->paths_max) { + obj->paths_num++; + goto end; + } + + // pop first element + memmove(obj->paths, &obj->paths[3], (obj->paths_num)*3*sizeof(float)); + +end: + return 0; +} + +struct object *create_object(struct object **o, float mass, struct model *model) { + struct object *no = malloc(sizeof(struct object)); + if (no == NULL) { + return NULL; + } + memset(no, 0, sizeof(struct object)); + + no->mass = mass; + no->scale = 1.0f; + no->paths_max = MAX_PATHS; + no->model = model; + glm_vec4_one(no->position); + glm_vec3_one(no->color); + + for (int i = 0; i < 3; i++) { + no->color[i] = 0.5f + (fabs(frand48()) / 2); + } + + if (*o == NULL) { + *o = no; + return no; + } + + struct object *previous_object = *o; + no->next = previous_object; + *o = no; + + return no; +} diff --git a/rendlib.c b/rendlib.c new file mode 100644 index 0000000..82010e4 --- /dev/null +++ b/rendlib.c @@ -0,0 +1,473 @@ +#include +#include +#include +#include +#include +#include +#include +#include "include/rendlib.h" +#include "include/math.h" +#include "include/object.h" + +// global variables +int window_width = 960; +int window_height = 540; +char *window_title = "rendlib window"; + +// global settings +float fov = 80.0f; // default fov +float fov_change = 1.0f; +vec3 camera_pos = { 0.0f, 0.0f, 20.0f }; +vec3 camera_front = { 0.0f, 0.0f, -1.0f }; +vec3 camera_up = { 0.0f, 1.0f, 0.0f }; +struct object *camera_lock = NULL; // is camera locked to any object? +float camera_yaw = -90.0f; // x rotation +float camera_pitch = 0.0f; // y rotation +float camera_sensitivity = 0.01f; +float top_movement_speed = 0.2f; +vec3 speed = { 0.0f, 0.0f, 0.0f }; + +GLint screen_viewport[4]; // viewport: x,y,width,height +int toggle_tracing = 0; // true or false +long added_particles = 0; + +// tmp input +int inputs[8] = {0,0,0,0,0,0,}; + +// tmp +struct model *sphere_model; +struct object *objects; + +// opengl +unsigned int shader_program; +unsigned int vertex_shader; +unsigned int fragment_shader; + +// shaders +const char *object_vertex_shader_location = "assets/shaders/shader.vert"; +const char *object_fragment_shader_location = "assets/shaders/shader.frag"; + +int load_shader(const char *path, unsigned int shader) { + FILE *fp = fopen(path, "r"); + if (fp == NULL) { + fprintf(stderr, "error: cannot open file '%s'\n", path); + return -1; + } + + fseek(fp, 0L, SEEK_END); + int len = ftell(fp); + if (len == -1) { + fprintf(stderr, "error: cannot fetch length of file '%s'\n", path); + return -1; + } + + fseek(fp, 0L, SEEK_SET); + char *fc = (char *) malloc(len); + if (fc == NULL) { + fprintf(stderr, "error: not enough dynamic memory\n"); + return -1; + } + memset(fc, 0, len); + int rb = 0; + do { + rb += fread(fc+rb, sizeof(char), len-rb, fp); + if (rb == 0) { + break; + } + } while (rb < len); + + fclose(fp); + glShaderSource(shader, 1, (const char **) &fc, &rb); + glCompileShader(shader); + + int success; + glGetShaderiv(shader, GL_COMPILE_STATUS, &success); + if (success != GL_TRUE) { + int log_length; + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &log_length); + + char log[log_length]; + glGetShaderInfoLog(shader, log_length, NULL, log); + + fprintf(stderr, "Shader Compilation Error: %s\n", log); + return -1; + } + + free(fc); + return 0; +} + +int load_shaders(void) { + glDeleteProgram(shader_program); + shader_program = glCreateProgram(); + + // create and load new shaders + vertex_shader = glCreateShader(GL_VERTEX_SHADER); + fragment_shader = glCreateShader(GL_FRAGMENT_SHADER); + + if (load_shader(object_vertex_shader_location, vertex_shader) == -1) { + return -1; + } + + if (load_shader(object_fragment_shader_location, fragment_shader) == -1) { + return -1; + } + + // compile object shader program + glAttachShader(shader_program, vertex_shader); + glAttachShader(shader_program, fragment_shader); + glLinkProgram(shader_program); + + int success; + glGetProgramiv(shader_program, GL_LINK_STATUS, &success); + + if (success != GL_TRUE) { + int log_length; + glGetProgramiv(shader_program, GL_INFO_LOG_LENGTH, &log_length); + + char log[log_length]; + glGetProgramInfoLog(shader_program, log_length, NULL, log); + + fprintf(stderr, "[object program] Shader Compilation Error: %s\n", log); + return -1; + } + + glDeleteShader(vertex_shader); + glDeleteShader(fragment_shader); + + return 0; +} + +void handle_input(void) { + int ret = 0; + if (inputs[0]) { + exit(EXIT_SUCCESS); + inputs[0] = 0; + } + + if (inputs[1]) { + ret = load_shaders(); + if (ret < 0) { + fprintf(stderr, "--error: reloading shaders\n"); + exit(EXIT_FAILURE); + } + inputs[1] = 0; + } + + if (inputs[2]) { + vec3 side_scalar = {top_movement_speed, top_movement_speed, top_movement_speed }; + vec3 camera_side; + glm_cross(camera_front, camera_up, camera_side); + glm_normalize(camera_side); + glm_vec3_mul(camera_side, side_scalar, camera_side); + glm_vec3_sub(camera_pos, camera_side, camera_pos); + } + + if (inputs[3]) { + vec3 side_scalar = {top_movement_speed, top_movement_speed, top_movement_speed }; + vec3 camera_side; + glm_cross(camera_front, camera_up, camera_side); + glm_normalize(camera_side); + glm_vec3_mul(camera_side, side_scalar, camera_side); + glm_vec3_add(camera_pos, camera_side, camera_pos); + } + + if (inputs[4]) { + vec3 front_scalar = {top_movement_speed, top_movement_speed, top_movement_speed }; + glm_vec3_mul(front_scalar, camera_front, front_scalar); + glm_vec3_sub(camera_pos, front_scalar, camera_pos); + } + + if (inputs[5]) { + vec3 front_scalar = {top_movement_speed, top_movement_speed, top_movement_speed }; + glm_vec3_mul(front_scalar, camera_front, front_scalar); + glm_vec3_add(camera_pos, front_scalar, camera_pos); + } +} + +void window_size(GLFWwindow *w, int width, int height) { + glViewport(0, 0, width, height); +} + +void display(void) { + handle_input(); + GLFWwindow *w = glfwGetCurrentContext(); + + mat4 view; + mat4 projection; + + GLint translation_uniform; + GLint view_uniform; + GLint projection_uniform; + GLint color_uniform; + GLint scale_uniform; + + glClearColor(0.13f, 0.13f, 0.13f, 0.0f); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glGetIntegerv(GL_VIEWPORT, screen_viewport); + glUseProgram(shader_program); + + glm_mat4_identity(view); + vec3 camera_center; + glm_vec3_add(camera_pos, camera_front, camera_center); + glm_lookat(camera_pos, camera_center, camera_up, view); + + glm_mat4_identity(projection); + glm_perspective(glm_rad(fov), (float) screen_viewport[2]/(float) screen_viewport[3], 0.01f, 100000.0f, projection); + + view_uniform = glGetUniformLocation(shader_program, "view"); + projection_uniform = glGetUniformLocation(shader_program, "projection"); + translation_uniform = glGetUniformLocation(shader_program, "translation"); + color_uniform = glGetUniformLocation(shader_program, "color"); + scale_uniform = glGetUniformLocation(shader_program, "scale"); + + glUniformMatrix4fv(view_uniform, 1, GL_FALSE, (float *) view); + glUniformMatrix4fv(projection_uniform, 1, GL_FALSE, (float *) projection); + + for (struct object *obj = objects; obj != NULL; obj = obj->next) { + mat4 translation_matrix; + glm_mat4_identity(translation_matrix); + struct model *obj_model = obj->model; + + // calculate gravity + for (struct object *target = objects; target != NULL; target = target->next) { + if (target == obj) { + continue; + } + + vec3 force; + glm_vec3_zero(force); + calculate_gravity(obj, target, force); + + vec4 force_new; + for (int i = 0; i < 3; i++) { + force_new[i] = force[i]; + } + force_new[3] = 0.0f; + + float n = obj->mass; + vec4 scaler = {n,n,n,1.0f}; + glm_vec4_div(force_new, scaler, force_new); + + glm_vec4_add(force_new, obj->translation_force, obj->translation_force); + } + + glm_vec4_add(obj->position, obj->translation_force, obj->position); + + // follow object if camera locked + if (camera_lock == obj) { + glm_vec3_add(camera_pos, obj->translation_force, camera_pos); + } + + // record path + if (toggle_tracing == 1) { + if (record_path(obj) == -1) { + exit(EXIT_FAILURE); + } + } + + glm_translate(translation_matrix, obj->position); + + glUniformMatrix4fv(translation_uniform, 1, GL_FALSE, (float *) translation_matrix); + + glUniform3fv(color_uniform, 1, (float *) obj->color); + glUniform1f(scale_uniform, obj->scale); + + glBindVertexArray(obj->vao); + glDrawElements(GL_TRIANGLES, obj_model->indices_num, GL_UNSIGNED_INT, (void *) 0); + + glBindVertexArray(obj->pvao); + + glBindBuffer(GL_ARRAY_BUFFER, obj->pbo); + glBufferData(GL_ARRAY_BUFFER, obj->paths_num*3*sizeof(float),obj->paths, GL_STATIC_DRAW); + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void *) 0); + glEnableVertexAttribArray(0); + + glm_mat4_identity(translation_matrix); + glUniformMatrix4fv(translation_uniform, 1, GL_FALSE, (float *) translation_matrix); + glUniform1f(scale_uniform, 1.0f); + + glDrawArrays(GL_LINE_STRIP, 0, obj->paths_num); + } + + /*glutPostRedisplay(); + glutSwapBuffers();*/ + glfwSwapBuffers(w); + glfwPollEvents(); +} + +void rendlib_bake_graphics(void) { + // setup default mouse position + glGetIntegerv(GL_VIEWPORT, screen_viewport); + + + for (struct object *obj = objects; obj != NULL; obj = obj->next) { + struct model *obj_model = obj->model; + glGenVertexArrays(1, &obj->vao); + glGenVertexArrays(1, &obj->pvao); + glGenBuffers(1, &obj->vbo); + glGenBuffers(1, &obj->ebo); + glGenBuffers(1, &obj->nbo); + glGenBuffers(1, &obj->pbo); + + glBindVertexArray(obj->vao); + + glBindBuffer(GL_ARRAY_BUFFER,obj->vbo); + glBufferData(GL_ARRAY_BUFFER,obj_model->vertices_num*3*sizeof(float),obj_model->vertices, GL_STATIC_DRAW); + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void *) 0); + glEnableVertexAttribArray(0); + + glBindBuffer(GL_ARRAY_BUFFER, obj->nbo); + glBufferData(GL_ARRAY_BUFFER, obj_model->normals_num*3*sizeof(float), obj_model->normals, GL_STATIC_DRAW); + + glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void *) 0); + glEnableVertexAttribArray(1); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,obj->ebo); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, obj_model->indices_num*sizeof(unsigned int), obj_model->indices, GL_STATIC_DRAW); + + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } + + glEnable(GL_DEPTH_TEST); +} +void keyboard(GLFWwindow *w, int key, int scancode, int action, int mods) { + if (action == GLFW_PRESS) { + switch (key) { + case GLFW_KEY_ESCAPE: + inputs[0] = 1; + break; + case GLFW_KEY_R: + inputs[1] = 1; + break; + case GLFW_KEY_A: + inputs[2] = 1; + break; + case GLFW_KEY_D: + inputs[3] = 1; + break; + case GLFW_KEY_S: + inputs[4] = 1; + break; + case GLFW_KEY_W: + inputs[5] = 1; + break; + } + + } else if (action == GLFW_RELEASE) { + switch (key) { + case GLFW_KEY_A: + inputs[2] = 0; + break; + case GLFW_KEY_D: + inputs[3] = 0; + break; + case GLFW_KEY_S: + inputs[4] = 0; + break; + case GLFW_KEY_W: + inputs[5] = 0; + break; + } + } +} + +void mouse(int button, int state, int x, int y) { + switch (button) { + case 3: + if (fov-fov_change < 0.0f) { + break; + } + + fov -= fov_change; + break; + case 4: + if (fov+fov_change > 180.0f) { + break; + } + + fov += fov_change; + break; + default: + break; + } +} + +int warped_pointer = 0; +int first_pointer = 1; +void mouse_motion(GLFWwindow *window, double x, double y) { + if (warped_pointer == 1) { + warped_pointer = 0; + return; + } + + warped_pointer = 1; + GLFWwindow *w = glfwGetCurrentContext(); + glfwSetCursorPos(w, (screen_viewport[2]/2), (screen_viewport[3]/2)); + + if (first_pointer == 1) { + first_pointer = 0; + return; + } + + float offset_x = (float) (x - (screen_viewport[2]/2)) * camera_sensitivity; + float offset_y = (float) (y - (screen_viewport[3]/2)) * camera_sensitivity; + + camera_yaw += offset_x; + camera_pitch -= offset_y; + + // limit view rotation + if (camera_pitch < -89.9f) { + camera_pitch = -89.9f; + } + if (camera_pitch > 89.9f) { + camera_pitch = 89.9f; + } + + vec3 view_direction; + view_direction[0] = cos(glm_rad(camera_yaw)) * cos(glm_rad(camera_pitch)); + view_direction[1] = sin(glm_rad(camera_pitch)); + view_direction[2] = sin(glm_rad(camera_yaw)) * cos(glm_rad(camera_pitch)); + glm_normalize_to(view_direction, camera_front); +} + +int rendlib_start_window(int argc, char *argv[]) { + int ret = glfwInit(); + if (!ret) { + return err_glfw_init; + } + + GLFWwindow *w = glfwCreateWindow(window_width, window_height, window_title, NULL, NULL); + if (w == NULL) { + return err_glfw_win; + } + + glfwMakeContextCurrent(w); + glfwSetWindowSizeCallback(w, window_size); + glfwSetCursorPosCallback(w, mouse_motion); + glfwSetKeyCallback(w, keyboard); + + ret = glewInit(); + if (ret != GLEW_OK) { + return err_glew_init; + } + + ret = load_shaders(); + if (ret < 0) { + return err_shaders_init; + } + + return 0; +} + +int rendlib_render(void) { + rendlib_bake_graphics(); + for (;;) { + display(); + } + return 0; +}