From 19887eb7d06486ffdc9a8b9d2983722ccfed5e54 Mon Sep 17 00:00:00 2001 From: jvyden Date: Sun, 7 Jan 2024 01:28:38 -0500 Subject: [PATCH 1/6] UI for planets view --- src/app/pages/user/user.component.html | 18 ++++++++++++++++++ src/app/pages/user/user.component.ts | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/app/pages/user/user.component.html b/src/app/pages/user/user.component.html index 54aab02..9734709 100644 --- a/src/app/pages/user/user.component.html +++ b/src/app/pages/user/user.component.html @@ -45,3 +45,21 @@
+ +
+ +
+

Levels

+ +
+ + +
+ yo man the planet thing goes here +
+
+ +

Recent Activity

+ +
+
diff --git a/src/app/pages/user/user.component.ts b/src/app/pages/user/user.component.ts index 462314b..9e844fa 100644 --- a/src/app/pages/user/user.component.ts +++ b/src/app/pages/user/user.component.ts @@ -12,6 +12,7 @@ import {ExtendedUser} from "../../api/types/extended-user"; import {EmbedService} from "../../services/embed.service"; import {TitleService} from "../../services/title.service"; import {AuthService} from "../../api/auth.service"; +import {DropdownOption} from "../../components/form-dropdown/form-dropdown.component"; @Component({ selector: 'app-user', @@ -23,6 +24,18 @@ export class UserComponent implements OnInit { ownUser: ExtendedUser | undefined; + viewType: string = "3d"; + viewTypes: DropdownOption[] = [ + { + Name: "List", + Value: "2d", + }, + { + Name: "Earth (3D)", + Value: "3d", + }, + ] + constructor(private route: ActivatedRoute, private authService: AuthService, private apiClient: ApiClient, private router: Router, private embedService: EmbedService, private titleService: TitleService) { } From 3be82eeb2e6ce22e0e029c253ad867120097e3b2 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Sun, 7 Jan 2024 00:02:07 -0800 Subject: [PATCH 2/6] Add simple WIP 3d planet view No mouse control, it just spins, no cool model or textures either. --- src/app/api/api-client.service.ts | 4 + src/app/api/types/level.ts | 2 + src/app/api/types/location.ts | 4 + src/app/api/types/user.ts | 3 + src/app/app.module.ts | 2 + .../components/planets/planets.component.html | 1 + .../components/planets/planets.component.ts | 170 ++ src/app/pages/user/user.component.html | 6 +- src/assets/earth/debug.fs.glsl | 9 + src/assets/earth/debug.vs.glsl | 14 + src/assets/earth/earth.fs.glsl | 9 + src/assets/earth/earth.obj | 2005 +++++++++++++++++ src/assets/earth/earth.vs.glsl | 13 + 13 files changed, 2239 insertions(+), 3 deletions(-) create mode 100644 src/app/api/types/location.ts create mode 100644 src/app/components/planets/planets.component.html create mode 100644 src/app/components/planets/planets.component.ts create mode 100644 src/assets/earth/debug.fs.glsl create mode 100644 src/assets/earth/debug.vs.glsl create mode 100644 src/assets/earth/earth.fs.glsl create mode 100644 src/assets/earth/earth.obj create mode 100644 src/assets/earth/earth.vs.glsl diff --git a/src/app/api/api-client.service.ts b/src/app/api/api-client.service.ts index 4ea1b4a..6ae2029 100644 --- a/src/app/api/api-client.service.ts +++ b/src/app/api/api-client.service.ts @@ -87,6 +87,10 @@ export class ApiClient { return this.makeListRequest("GET", `levels/${route}?count=${count}&skip=${skip}`); } + public GetLevelsByUser(user: string, count: number = 20, skip: number = 0): Observable> { + return this.makeListRequest("GET", `levels/byUser?count=${count}&skip=${skip}&u=${user}`); + } + public GetLevelById(id: number): Observable { return this.makeRequest("GET", "levels/id/" + id) } diff --git a/src/app/api/types/level.ts b/src/app/api/types/level.ts index 1e21c9c..b614503 100644 --- a/src/app/api/types/level.ts +++ b/src/app/api/types/level.ts @@ -1,4 +1,5 @@ import {User} from "./user" +import {Location} from "./location" export interface Level { levelId: number @@ -16,4 +17,5 @@ export interface Level { teamPicked: boolean gameVersion: number score: number + location: Location } diff --git a/src/app/api/types/location.ts b/src/app/api/types/location.ts new file mode 100644 index 0000000..0443037 --- /dev/null +++ b/src/app/api/types/location.ts @@ -0,0 +1,4 @@ +export interface Location { + x: number + y: number +} diff --git a/src/app/api/types/user.ts b/src/app/api/types/user.ts index 814f06e..1040570 100644 --- a/src/app/api/types/user.ts +++ b/src/app/api/types/user.ts @@ -1,7 +1,10 @@ +import {Location} from './location'; + export interface User { userId: string username: string iconHash: string + location: Location description: string joinDate: Date lastLoginDate: Date diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0678870..1fcdeae 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -96,6 +96,7 @@ import {ForgotPasswordComponent} from './pages/forgot-password/forgot-password.c import {DateComponent} from './components/date/date.component'; import {StatisticsComponent} from './pages/statistics/statistics.component'; import { ContainerComponent } from './components/container/container.component'; +import { PlanetsComponent } from './components/planets/planets.component'; @NgModule({ declarations: [ @@ -162,6 +163,7 @@ import { ContainerComponent } from './components/container/container.component'; DateComponent, StatisticsComponent, ContainerComponent, + PlanetsComponent, ], imports: [ BrowserModule, diff --git a/src/app/components/planets/planets.component.html b/src/app/components/planets/planets.component.html new file mode 100644 index 0000000..1473958 --- /dev/null +++ b/src/app/components/planets/planets.component.html @@ -0,0 +1 @@ + diff --git a/src/app/components/planets/planets.component.ts b/src/app/components/planets/planets.component.ts new file mode 100644 index 0000000..ad90ccc --- /dev/null +++ b/src/app/components/planets/planets.component.ts @@ -0,0 +1,170 @@ +import * as twgl from 'twgl.js'; +import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core'; +import {HttpClient} from "@angular/common/http"; +import {User} from 'src/app/api/types/user'; +import {ApiClient} from 'src/app/api/api-client.service'; +import {Level} from "../../api/types/level"; +import {concatWith, forkJoin, mergeWith, Observable, Subscription} from "rxjs"; +import {Location} from "../../api/types/location"; + +@Component({ + selector: 'planets', + templateUrl: './planets.component.html', +}) +export class PlanetsComponent implements OnInit { + @ViewChild('canvas') public canvas!: ElementRef + didInit: boolean = false + + @Input("user") public User: User | undefined; + + private levels: Level[] | undefined; + private earthModel: number[] = []; + private vertexShader: string | undefined; + private fragmentShader: string | undefined; + private debugVertexShader: string | undefined; + private debugFragmentShader: string | undefined; + + constructor(private apiClient: ApiClient, private httpClient: HttpClient) { + } + + ngOnInit(): void { + } + + ngAfterViewInit(): void { + const username = this.User!.username; + + forkJoin([ + this.apiClient.GetLevelsByUser(username, 40, 0), + this.httpClient.get("/assets/earth/earth.obj", {responseType: "text"}), + this.httpClient.get("/assets/earth/earth.vs.glsl", {responseType: "text"}), + this.httpClient.get("/assets/earth/earth.fs.glsl", {responseType: "text"}), + this.httpClient.get("/assets/earth/debug.vs.glsl", {responseType: "text"}), + this.httpClient.get("/assets/earth/debug.fs.glsl", {responseType: "text"}), + ]).subscribe(res => { + this.levels = res[0].items; + this.earthModel = this.parseObj(res[1]); + this.vertexShader = res[2]; + this.fragmentShader = res[3]; + this.debugVertexShader = res[4]; + this.debugFragmentShader = res[5]; + + this.didInit = true; + this.main(); + }); + } + + parseObj(file: string) { + let verts = []; + let idx: number[] = []; + + for(let line of file.split("\n")) { + let split = line.split(" "); + + if(split[0] == 'v') { + verts.push([parseFloat(split[1]), parseFloat(split[2]), parseFloat(split[3])]); + } else if(split[0] == 'f') { + idx.push(parseInt(split[1].split("/")[0])); + idx.push(parseInt(split[2].split("/")[0])); + idx.push(parseInt(split[3].split("/")[0])); + } + } + + let ret: number[] = []; + + for(let index of idx) { + let vert = verts[index - 1]; + + ret.push(vert[0]); + ret.push(vert[1]); + ret.push(vert[2]); + } + + return ret; + } + + main() { + const gl = this.canvas.nativeElement.getContext("webgl2"); + + //Enables some GL state + gl.enable(gl.BLEND) + gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); + + gl.enable(gl.DEPTH_TEST); + gl.depthFunc(gl.LESS); + + const earthInfo = { + programInfo: twgl.createProgramInfo(gl, [this.vertexShader!, this.fragmentShader!]), + bufferInfo: twgl.createBufferInfoFromArrays(gl, { + position: this.earthModel + }), + }; + + let debugPoints: number[] = []; + + this.levels!.forEach(level => { + const loc = this.locationToSphere(level.location); + + debugPoints = debugPoints.concat(loc); + }); + + const debugInfo = { + programInfo: twgl.createProgramInfo(gl, [this.debugVertexShader!, this.debugFragmentShader!]), + bufferInfo: twgl.createBufferInfoFromArrays(gl, { + position: debugPoints + }), + }; + + let proj = twgl.m4.perspective(Math.PI / 2 / 1.2, 1, 0.00001, 100); + let view = twgl.m4.lookAt(twgl.v3.create(0, 0, -2), twgl.v3.create(0, 0, 0), twgl.v3.create(0, 1, 0)); + let model = twgl.m4.rotationY(0); + + //Begin the render process + requestAnimationFrame(render); + + function render(time: number) { + twgl.resizeCanvasToDisplaySize(gl.canvas); + gl.viewport(0, 0, gl.canvas.width, gl.canvas.height); + + //Clear color and depth buffers + gl.clearColor(0, 0, 0, 0); + gl.clearDepth(1); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + + const uniforms = { + model: model, + view: view, + proj: proj, + }; + + model = twgl.m4.rotationY(time * 0.0005); + + gl.useProgram(earthInfo.programInfo.program); + + twgl.setBuffersAndAttributes(gl, earthInfo.programInfo, earthInfo.bufferInfo); + twgl.setUniforms(earthInfo.programInfo, uniforms); + twgl.drawBufferInfo(gl, earthInfo.bufferInfo); + + gl.useProgram(debugInfo.programInfo.program); + + twgl.setBuffersAndAttributes(gl, debugInfo.programInfo, debugInfo.bufferInfo); + twgl.setUniforms(debugInfo.programInfo, uniforms); + twgl.drawBufferInfo(gl, debugInfo.bufferInfo, gl.POINTS); + + //Keep the loop going + requestAnimationFrame(render); + } + } + + locationToSphere(location: Location): number[] { + let lat = -((location.x / (65535 / 2)) * 180 - 90) * (Math.PI / 180); + let lon = -((location.y / 65535) * 360 - 180) * (Math.PI / 180); + + const rad = 1.025; + + let x = Math.cos(lat) * Math.cos(lon) * rad; + let z = Math.cos(lat) * Math.sin(lon) * rad; + let y = Math.sin(lat) * rad; + + return [x, y, z]; + } +} diff --git a/src/app/pages/user/user.component.html b/src/app/pages/user/user.component.html index 9734709..df9d312 100644 --- a/src/app/pages/user/user.component.html +++ b/src/app/pages/user/user.component.html @@ -46,7 +46,7 @@
-
+

Levels

@@ -54,8 +54,8 @@

Levels

-
- yo man the planet thing goes here +
+
diff --git a/src/assets/earth/debug.fs.glsl b/src/assets/earth/debug.fs.glsl new file mode 100644 index 0000000..9ca7886 --- /dev/null +++ b/src/assets/earth/debug.fs.glsl @@ -0,0 +1,9 @@ +#version 300 es + +precision highp float; + +out vec4 color; + +void main() { + color = vec4(1, 0, 0, 1); +} diff --git a/src/assets/earth/debug.vs.glsl b/src/assets/earth/debug.vs.glsl new file mode 100644 index 0000000..64c536f --- /dev/null +++ b/src/assets/earth/debug.vs.glsl @@ -0,0 +1,14 @@ +#version 300 es + +precision highp float; + +in vec3 position; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 proj; + +void main() { + gl_PointSize = 20.0; + gl_Position = proj * view * model * vec4(position, 1); +} diff --git a/src/assets/earth/earth.fs.glsl b/src/assets/earth/earth.fs.glsl new file mode 100644 index 0000000..22990d7 --- /dev/null +++ b/src/assets/earth/earth.fs.glsl @@ -0,0 +1,9 @@ +#version 300 es + +precision highp float; + +out vec4 color; + +void main() { + color = vec4(1,1,1,1); +} diff --git a/src/assets/earth/earth.obj b/src/assets/earth/earth.obj new file mode 100644 index 0000000..ac3942f --- /dev/null +++ b/src/assets/earth/earth.obj @@ -0,0 +1,2005 @@ +# Blender 4.0.2 +# www.blender.org +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 +vt 0.750000 0.625000 +vt 0.718750 0.687500 +vt 0.718750 0.625000 +vt 0.750000 0.187500 +vt 0.718750 0.125000 +vt 0.750000 0.125000 +vt 0.750000 0.562500 +vt 0.718750 0.562500 +vt 0.718750 0.062500 +vt 0.750000 0.062500 +vt 0.718750 0.500000 +vt 0.750000 0.500000 +vt 0.750000 0.937500 +vt 0.734375 1.000000 +vt 0.718750 0.937500 +vt 0.734375 0.000000 +vt 0.718750 0.437500 +vt 0.750000 0.437500 +vt 0.750000 0.875000 +vt 0.718750 0.875000 +vt 0.718750 0.375000 +vt 0.750000 0.375000 +vt 0.750000 0.812500 +vt 0.718750 0.812500 +vt 0.718750 0.312500 +vt 0.750000 0.312500 +vt 0.750000 0.750000 +vt 0.718750 0.750000 +vt 0.718750 0.250000 +vt 0.750000 0.250000 +vt 0.750000 0.687500 +vt 0.718750 0.187500 +vt 0.687500 0.687500 +vt 0.687500 0.250000 +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.687500 0.312500 +vt 0.687500 0.750000 +vt 0.656250 0.500000 +vt 0.656250 0.437500 +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.656250 0.062500 +vt 0.671875 1.000000 +vt 0.656250 0.937500 +vt 0.671875 0.000000 +vt 0.625000 0.187500 +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.625000 0.250000 +vt 0.625000 0.687500 +vt 0.593750 0.875000 +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.593750 0.937500 +vt 0.609375 0.000000 +vt 0.593750 0.437500 +vt 0.562500 0.625000 +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.562500 0.687500 +vt 0.562500 0.187500 +vt 0.531250 0.375000 +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.531250 0.437500 +vt 0.531250 0.875000 +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.500000 0.187500 +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.468750 0.875000 +vt 0.468750 0.812500 +vt 0.437500 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.562500 +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.437500 0.625000 +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.406250 0.375000 +vt 0.406250 0.812500 +vt 0.406250 0.312500 +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.062500 +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.375000 0.125000 +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.343750 0.312500 +vt 0.328125 1.000000 +vt 0.312500 0.937500 +vt 0.328125 0.000000 +vt 0.312500 0.062500 +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.312500 0.500000 +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.437500 +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.250000 0.500000 +vt 0.265625 1.000000 +vt 0.250000 0.937500 +vt 0.265625 0.000000 +vt 0.218750 0.250000 +vt 0.218750 0.187500 +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.218750 0.687500 +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.187500 0.937500 +vt 0.203125 0.000000 +vt 0.187500 0.437500 +vt 0.187500 0.875000 +vt 0.156250 0.125000 +vt 0.156250 0.625000 +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.156250 0.687500 +vt 0.156250 0.187500 +vt 0.125000 0.812500 +vt 0.125000 0.375000 +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.125000 0.437500 +vt 0.125000 0.875000 +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.093750 0.187500 +vt 0.093750 0.125000 +vt 0.062500 0.375000 +vt 0.062500 0.312500 +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.062500 0.812500 +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.031250 0.125000 +vt 0.000000 0.750000 +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 0.000000 0.812500 +vt 0.000000 0.312500 +vt 1.000000 0.500000 +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 0.968750 0.437500 +vt 1.000000 0.437500 +vt 0.968750 0.875000 +vt 1.000000 0.875000 +vt 0.968750 0.375000 +vt 1.000000 0.375000 +vt 1.000000 0.812500 +vt 0.968750 0.812500 +vt 1.000000 0.312500 +vt 0.968750 0.312500 +vt 0.968750 0.750000 +vt 1.000000 0.750000 +vt 0.968750 0.250000 +vt 1.000000 0.250000 +vt 1.000000 0.687500 +vt 0.968750 0.687500 +vt 1.000000 0.187500 +vt 0.968750 0.187500 +vt 0.968750 0.625000 +vt 1.000000 0.625000 +vt 0.968750 0.125000 +vt 1.000000 0.125000 +vt 1.000000 0.562500 +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.937500 0.312500 +vt 0.921875 0.000000 +vt 0.906250 0.062500 +vt 0.906250 0.437500 +vt 0.906250 0.937500 +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.906250 0.500000 +vt 0.921875 1.000000 +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.875000 0.750000 +vt 0.875000 0.687500 +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.843750 0.500000 +vt 0.859375 1.000000 +vt 0.843750 0.937500 +vt 0.859375 0.000000 +vt 0.843750 0.437500 +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.812500 0.250000 +vt 0.812500 0.687500 +vt 0.812500 0.187500 +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.781250 0.437500 +vt 0.765625 1.000000 +vt 0.765625 0.000000 +s 1 +f 477/1 11/2 12/3 +f 480/4 20/5 481/6 +f 3/7 12/3 13/8 +f 481/6 21/9 482/10 +f 3/7 14/11 4/12 +f 474/13 82/14 7/15 +f 308/16 482/10 21/9 +f 4/12 15/17 5/18 +f 475/19 7/15 8/20 +f 5/18 16/21 478/22 +f 1/23 8/20 9/24 +f 478/22 17/25 6/26 +f 476/27 9/24 10/28 +f 6/26 18/29 479/30 +f 2/31 10/28 11/2 +f 479/30 19/32 480/4 +f 10/28 26/33 11/2 +f 19/32 33/34 34/35 +f 11/2 27/36 12/3 +f 20/5 34/35 35/37 +f 13/8 27/36 28/38 +f 20/5 36/39 21/9 +f 13/8 29/40 14/11 +f 7/15 82/41 22/42 +f 308/43 21/9 36/39 +f 14/11 30/44 15/17 +f 7/15 23/45 8/20 +f 15/17 31/46 16/21 +f 8/20 24/47 9/24 +f 16/21 32/48 17/25 +f 9/24 25/49 10/28 +f 17/25 33/34 18/29 +f 30/44 44/50 45/51 +f 22/42 38/52 23/45 +f 30/44 46/53 31/46 +f 23/45 39/54 24/47 +f 32/48 46/53 47/55 +f 24/47 40/56 25/49 +f 33/34 47/55 48/57 +f 25/49 41/58 26/33 +f 34/35 48/57 49/59 +f 26/33 42/60 27/36 +f 34/35 50/61 35/37 +f 27/36 43/62 28/38 +f 35/37 51/63 36/39 +f 28/38 44/50 29/40 +f 22/42 82/64 37/65 +f 308/66 36/39 51/63 +f 48/57 64/67 49/59 +f 41/58 57/68 42/60 +f 49/59 65/69 50/61 +f 43/62 57/68 58/70 +f 50/61 66/71 51/63 +f 44/50 58/70 59/72 +f 37/65 82/73 52/74 +f 308/75 51/63 66/71 +f 44/50 60/76 45/51 +f 37/65 53/77 38/52 +f 45/51 61/78 46/53 +f 38/52 54/79 39/54 +f 47/55 61/78 62/80 +f 39/54 55/81 40/56 +f 47/55 63/82 48/57 +f 40/56 56/83 41/58 +f 52/74 68/84 53/77 +f 60/76 76/85 61/78 +f 53/77 69/86 54/79 +f 62/80 76/85 77/87 +f 54/79 70/88 55/81 +f 62/80 78/89 63/82 +f 56/83 70/88 71/90 +f 63/82 79/91 64/67 +f 56/83 72/92 57/68 +f 65/69 79/91 80/93 +f 58/70 72/92 73/94 +f 65/69 81/95 66/71 +f 59/72 73/94 74/96 +f 52/74 82/97 67/98 +f 308/99 66/71 81/95 +f 59/72 75/100 60/76 +f 71/90 88/101 72/92 +f 79/91 96/102 80/93 +f 73/94 88/101 89/103 +f 81/95 96/102 97/104 +f 74/96 89/103 90/105 +f 67/98 82/106 83/107 +f 308/108 81/95 97/104 +f 74/96 91/109 75/100 +f 67/98 84/110 68/84 +f 75/100 92/111 76/85 +f 68/84 85/112 69/86 +f 77/87 92/111 93/113 +f 69/86 86/114 70/88 +f 77/87 94/115 78/89 +f 71/90 86/114 87/116 +f 78/89 95/117 79/91 +f 91/109 107/118 92/111 +f 84/110 100/119 85/112 +f 93/113 107/118 108/120 +f 85/112 101/121 86/114 +f 93/113 109/122 94/115 +f 87/116 101/121 102/123 +f 95/117 109/122 110/124 +f 87/116 103/125 88/101 +f 96/102 110/124 111/126 +f 89/103 103/125 104/127 +f 96/102 112/128 97/104 +f 90/105 104/127 105/129 +f 83/107 82/130 98/131 +f 308/132 97/104 112/128 +f 90/105 106/133 91/109 +f 84/110 98/131 99/134 +f 110/124 126/135 111/126 +f 104/127 118/136 119/137 +f 111/126 127/138 112/128 +f 105/129 119/137 120/139 +f 98/131 82/140 113/141 +f 308/142 112/128 127/138 +f 105/129 121/143 106/133 +f 99/134 113/141 114/144 +f 106/133 122/145 107/118 +f 99/134 115/146 100/119 +f 108/120 122/145 123/147 +f 100/119 116/148 101/121 +f 108/120 124/149 109/122 +f 102/123 116/148 117/150 +f 110/124 124/149 125/151 +f 102/123 118/136 103/125 +f 123/147 137/152 138/153 +f 115/146 131/154 116/148 +f 123/147 139/155 124/149 +f 117/150 131/154 132/156 +f 125/151 139/155 140/157 +f 117/150 133/158 118/136 +f 125/151 141/159 126/135 +f 119/137 133/158 134/160 +f 126/135 142/161 127/138 +f 120/139 134/160 135/162 +f 113/141 82/163 128/164 +f 308/165 127/138 142/161 +f 120/139 136/166 121/143 +f 113/141 129/167 114/144 +f 121/143 137/152 122/145 +f 114/144 130/168 115/146 +f 142/161 156/169 157/170 +f 135/162 149/171 150/172 +f 128/164 82/173 143/174 +f 308/175 142/161 157/170 +f 135/162 151/176 136/166 +f 128/164 144/177 129/167 +f 136/166 152/178 137/152 +f 130/168 144/177 145/179 +f 138/153 152/178 153/180 +f 130/168 146/181 131/154 +f 138/153 154/182 139/155 +f 132/156 146/181 147/183 +f 140/157 154/182 155/184 +f 132/156 148/185 133/158 +f 140/157 156/169 141/159 +f 134/160 148/185 149/171 +f 145/179 161/186 146/181 +f 153/180 169/187 154/182 +f 147/183 161/186 162/188 +f 155/184 169/187 170/189 +f 147/183 163/190 148/185 +f 155/184 171/191 156/169 +f 149/171 163/190 164/192 +f 156/169 172/193 157/170 +f 150/172 164/192 165/194 +f 143/174 82/195 158/196 +f 308/197 157/170 172/193 +f 150/172 166/198 151/176 +f 143/174 159/199 144/177 +f 151/176 167/200 152/178 +f 145/179 159/199 160/201 +f 153/180 167/200 168/202 +f 165/194 179/203 180/204 +f 158/196 82/205 173/206 +f 308/207 172/193 187/208 +f 165/194 181/209 166/198 +f 158/196 174/210 159/199 +f 166/198 182/211 167/200 +f 159/199 175/212 160/201 +f 168/202 182/211 183/213 +f 160/201 176/214 161/186 +f 168/202 184/215 169/187 +f 162/188 176/214 177/216 +f 169/187 185/217 170/189 +f 162/188 178/218 163/190 +f 171/191 185/217 186/219 +f 164/192 178/218 179/203 +f 172/193 186/219 187/208 +f 183/213 199/220 184/215 +f 177/216 191/221 192/222 +f 185/217 199/220 200/223 +f 177/216 193/224 178/218 +f 185/217 201/225 186/219 +f 179/203 193/224 194/226 +f 186/219 202/227 187/208 +f 180/204 194/226 195/228 +f 173/206 82/229 188/230 +f 308/231 187/208 202/227 +f 180/204 196/232 181/209 +f 174/210 188/230 189/233 +f 181/209 197/234 182/211 +f 175/212 189/233 190/235 +f 183/213 197/234 198/236 +f 175/212 191/221 176/214 +f 188/230 82/237 203/238 +f 308/239 202/227 217/240 +f 195/228 211/241 196/232 +f 188/230 204/242 189/233 +f 196/232 212/243 197/234 +f 189/233 205/244 190/235 +f 198/236 212/243 213/245 +f 190/235 206/246 191/221 +f 198/236 214/247 199/220 +f 192/222 206/246 207/248 +f 200/223 214/247 215/249 +f 192/222 208/250 193/224 +f 200/223 216/251 201/225 +f 194/226 208/250 209/252 +f 201/225 217/240 202/227 +f 195/228 209/252 210/253 +f 207/248 221/254 222/255 +f 215/249 229/256 230/257 +f 207/248 223/258 208/250 +f 215/249 231/259 216/251 +f 209/252 223/258 224/260 +f 216/251 232/261 217/240 +f 210/253 224/260 225/262 +f 203/238 82/263 218/264 +f 308/265 217/240 232/261 +f 210/253 226/266 211/241 +f 203/238 219/267 204/242 +f 211/241 227/268 212/243 +f 204/242 220/269 205/244 +f 213/245 227/268 228/270 +f 205/244 221/254 206/246 +f 213/245 229/256 214/247 +f 225/262 241/271 226/266 +f 218/264 234/272 219/267 +f 226/266 242/273 227/268 +f 220/269 234/272 235/274 +f 228/270 242/273 243/275 +f 220/269 236/276 221/254 +f 228/270 244/277 229/256 +f 222/255 236/276 237/278 +f 230/257 244/277 245/279 +f 222/255 238/280 223/258 +f 230/257 246/281 231/259 +f 224/260 238/280 239/282 +f 232/261 246/281 247/283 +f 225/262 239/282 240/284 +f 218/264 82/285 233/286 +f 308/287 232/261 247/283 +f 245/279 259/288 260/289 +f 237/278 253/290 238/280 +f 245/279 261/291 246/281 +f 239/282 253/290 254/292 +f 246/281 262/293 247/283 +f 240/284 254/292 255/294 +f 233/286 82/295 248/296 +f 308/297 247/283 262/293 +f 240/284 256/298 241/271 +f 233/286 249/299 234/272 +f 241/271 257/300 242/273 +f 234/272 250/301 235/274 +f 243/275 257/300 258/302 +f 235/274 251/303 236/276 +f 243/275 259/288 244/277 +f 237/278 251/303 252/304 +f 256/298 272/305 257/300 +f 249/299 265/306 250/301 +f 258/302 272/305 273/307 +f 250/301 266/308 251/303 +f 258/302 274/309 259/288 +f 252/304 266/308 267/310 +f 260/289 274/309 275/311 +f 252/304 268/312 253/290 +f 260/289 276/313 261/291 +f 254/292 268/312 269/314 +f 261/291 277/315 262/293 +f 255/294 269/314 270/316 +f 248/296 82/317 263/318 +f 308/319 262/293 277/315 +f 255/294 271/320 256/298 +f 249/299 263/318 264/321 +f 275/311 291/322 276/313 +f 269/314 283/323 284/324 +f 277/315 291/322 292/325 +f 270/316 284/324 285/326 +f 263/318 82/327 278/328 +f 308/329 277/315 292/325 +f 270/316 286/330 271/320 +f 264/321 278/328 279/331 +f 271/320 287/332 272/305 +f 264/321 280/333 265/306 +f 273/307 287/332 288/334 +f 265/306 281/335 266/308 +f 273/307 289/336 274/309 +f 267/310 281/335 282/337 +f 275/311 289/336 290/338 +f 267/310 283/323 268/312 +f 279/331 295/339 280/333 +f 288/334 302/340 303/341 +f 280/333 296/342 281/335 +f 288/334 304/343 289/336 +f 282/337 296/342 297/344 +f 290/338 304/343 305/345 +f 282/337 298/346 283/323 +f 290/338 306/347 291/322 +f 284/324 298/346 299/348 +f 292/325 306/347 307/349 +f 285/326 299/348 300/350 +f 278/328 82/351 293/352 +f 308/353 292/325 307/349 +f 285/326 301/354 286/330 +f 278/328 294/355 279/331 +f 286/330 302/340 287/332 +f 299/348 314/356 315/357 +f 306/347 323/358 307/349 +f 300/350 315/357 316/359 +f 293/352 82/360 309/361 +f 308/362 307/349 323/358 +f 300/350 317/363 301/354 +f 293/352 310/364 294/355 +f 301/354 318/365 302/340 +f 294/355 311/366 295/339 +f 303/341 318/365 319/367 +f 295/339 312/368 296/342 +f 303/341 320/369 304/343 +f 297/344 312/368 313/370 +f 305/345 320/369 321/371 +f 297/344 314/356 298/346 +f 305/345 322/372 306/347 +f 319/367 333/373 334/374 +f 311/366 327/375 312/368 +f 319/367 335/376 320/369 +f 312/368 328/377 313/370 +f 321/371 335/376 336/378 +f 313/370 329/379 314/356 +f 321/371 337/380 322/372 +f 315/357 329/379 330/381 +f 322/372 338/382 323/358 +f 316/359 330/381 331/383 +f 309/361 82/384 324/385 +f 308/386 323/358 338/382 +f 316/359 332/387 317/363 +f 309/361 325/388 310/364 +f 317/363 333/373 318/365 +f 310/364 326/389 311/366 +f 337/380 353/390 338/382 +f 331/383 345/391 346/392 +f 324/385 82/393 339/394 +f 308/395 338/382 353/390 +f 331/383 347/396 332/387 +f 324/385 340/397 325/388 +f 332/387 348/398 333/373 +f 325/388 341/399 326/389 +f 334/374 348/398 349/400 +f 326/389 342/401 327/375 +f 334/374 350/402 335/376 +f 328/377 342/401 343/403 +f 336/378 350/402 351/404 +f 328/377 344/405 329/379 +f 336/378 352/406 337/380 +f 330/381 344/405 345/391 +f 341/399 357/407 342/401 +f 349/400 365/408 350/402 +f 343/403 357/407 358/409 +f 351/404 365/408 366/410 +f 343/403 359/411 344/405 +f 351/404 367/412 352/406 +f 345/391 359/411 360/413 +f 352/406 368/414 353/390 +f 346/392 360/413 361/415 +f 339/394 82/416 354/417 +f 308/418 353/390 368/414 +f 346/392 362/419 347/396 +f 339/394 355/420 340/397 +f 347/396 363/421 348/398 +f 341/399 355/420 356/422 +f 349/400 363/421 364/423 +f 361/424 375/425 376/426 +f 354/427 82/428 369/429 +f 308/430 368/431 383/432 +f 361/424 377/433 362/434 +f 354/427 370/435 355/436 +f 362/434 378/437 363/438 +f 356/439 370/435 371/440 +f 364/441 378/437 379/442 +f 356/439 372/443 357/444 +f 364/441 380/445 365/446 +f 358/447 372/443 373/448 +f 366/449 380/445 381/450 +f 358/447 374/451 359/452 +f 366/449 382/453 367/454 +f 360/455 374/451 375/425 +f 367/454 383/432 368/431 +f 379/442 395/456 380/445 +f 373/448 387/457 388/458 +f 381/450 395/456 396/459 +f 373/448 389/460 374/451 +f 381/450 397/461 382/453 +f 375/425 389/460 390/462 +f 382/453 398/463 383/432 +f 376/426 390/462 391/464 +f 369/429 82/465 384/466 +f 308/467 383/432 398/463 +f 376/426 392/468 377/433 +f 369/429 385/469 370/435 +f 377/433 393/470 378/437 +f 371/440 385/469 386/471 +f 379/442 393/470 394/472 +f 371/440 387/457 372/443 +f 308/473 398/463 413/474 +f 391/464 407/475 392/468 +f 385/469 399/476 400/477 +f 392/468 408/478 393/470 +f 385/469 401/479 386/471 +f 394/472 408/478 409/480 +f 386/471 402/481 387/457 +f 394/472 410/482 395/456 +f 388/458 402/481 403/483 +f 396/459 410/482 411/484 +f 388/458 404/485 389/460 +f 397/461 411/484 412/486 +f 390/462 404/485 405/487 +f 397/461 413/474 398/463 +f 391/464 405/487 406/488 +f 384/466 82/489 399/476 +f 411/484 425/490 426/491 +f 403/483 419/492 404/485 +f 411/484 427/493 412/486 +f 405/487 419/492 420/494 +f 412/486 428/495 413/474 +f 406/488 420/494 421/496 +f 399/476 82/497 414/498 +f 308/499 413/474 428/495 +f 406/488 422/500 407/475 +f 399/476 415/501 400/477 +f 407/475 423/502 408/478 +f 401/479 415/501 416/503 +f 409/480 423/502 424/504 +f 401/479 417/505 402/481 +f 409/480 425/490 410/482 +f 403/483 417/505 418/506 +f 414/498 430/507 415/501 +f 422/500 438/508 423/502 +f 416/503 430/507 431/509 +f 424/504 438/508 439/510 +f 416/503 432/511 417/505 +f 424/504 440/512 425/490 +f 418/506 432/511 433/513 +f 426/491 440/512 441/514 +f 418/506 434/515 419/492 +f 426/491 442/516 427/493 +f 420/494 434/515 435/517 +f 427/493 443/518 428/495 +f 421/496 435/517 436/519 +f 414/498 82/520 429/521 +f 308/522 428/495 443/518 +f 421/496 437/523 422/500 +f 433/513 449/524 434/515 +f 441/514 457/525 442/516 +f 435/517 449/524 450/526 +f 442/516 458/527 443/518 +f 436/519 450/526 451/528 +f 429/521 82/529 444/530 +f 308/531 443/518 458/527 +f 436/519 452/532 437/523 +f 430/507 444/530 445/533 +f 437/523 453/534 438/508 +f 430/507 446/535 431/509 +f 439/510 453/534 454/536 +f 431/509 447/537 432/511 +f 439/510 455/538 440/512 +f 433/513 447/537 448/539 +f 441/514 455/538 456/540 +f 452/532 468/541 453/534 +f 446/535 460/542 461/543 +f 454/536 468/541 469/544 +f 446/535 462/545 447/537 +f 454/536 470/546 455/538 +f 448/539 462/545 463/547 +f 456/540 470/546 471/548 +f 448/539 464/549 449/524 +f 456/540 472/550 457/525 +f 450/526 464/549 465/551 +f 458/527 472/550 473/552 +f 451/528 465/551 466/553 +f 444/530 82/554 459/555 +f 308/556 458/527 473/552 +f 451/528 467/557 452/532 +f 444/530 460/542 445/533 +f 471/548 481/6 472/550 +f 465/551 477/1 3/7 +f 472/550 482/10 473/552 +f 466/553 3/7 4/12 +f 459/555 82/558 474/13 +f 308/559 473/552 482/10 +f 466/553 5/18 467/557 +f 460/542 474/13 475/19 +f 467/557 478/22 468/541 +f 461/543 475/19 1/23 +f 468/541 6/26 469/544 +f 462/545 1/23 476/27 +f 469/544 479/30 470/546 +f 463/547 476/27 2/31 +f 471/548 479/30 480/4 +f 464/549 2/31 477/1 +f 477/1 2/31 11/2 +f 480/4 19/32 20/5 +f 3/7 477/1 12/3 +f 481/6 20/5 21/9 +f 3/7 13/8 14/11 +f 4/12 14/11 15/17 +f 475/19 474/13 7/15 +f 5/18 15/17 16/21 +f 1/23 475/19 8/20 +f 478/22 16/21 17/25 +f 476/27 1/23 9/24 +f 6/26 17/25 18/29 +f 2/31 476/27 10/28 +f 479/30 18/29 19/32 +f 10/28 25/49 26/33 +f 19/32 18/29 33/34 +f 11/2 26/33 27/36 +f 20/5 19/32 34/35 +f 13/8 12/3 27/36 +f 20/5 35/37 36/39 +f 13/8 28/38 29/40 +f 14/11 29/40 30/44 +f 7/15 22/42 23/45 +f 15/17 30/44 31/46 +f 8/20 23/45 24/47 +f 16/21 31/46 32/48 +f 9/24 24/47 25/49 +f 17/25 32/48 33/34 +f 30/44 29/40 44/50 +f 22/42 37/65 38/52 +f 30/44 45/51 46/53 +f 23/45 38/52 39/54 +f 32/48 31/46 46/53 +f 24/47 39/54 40/56 +f 33/34 32/48 47/55 +f 25/49 40/56 41/58 +f 34/35 33/34 48/57 +f 26/33 41/58 42/60 +f 34/35 49/59 50/61 +f 27/36 42/60 43/62 +f 35/37 50/61 51/63 +f 28/38 43/62 44/50 +f 48/57 63/82 64/67 +f 41/58 56/83 57/68 +f 49/59 64/67 65/69 +f 43/62 42/60 57/68 +f 50/61 65/69 66/71 +f 44/50 43/62 58/70 +f 44/50 59/72 60/76 +f 37/65 52/74 53/77 +f 45/51 60/76 61/78 +f 38/52 53/77 54/79 +f 47/55 46/53 61/78 +f 39/54 54/79 55/81 +f 47/55 62/80 63/82 +f 40/56 55/81 56/83 +f 52/74 67/98 68/84 +f 60/76 75/100 76/85 +f 53/77 68/84 69/86 +f 62/80 61/78 76/85 +f 54/79 69/86 70/88 +f 62/80 77/87 78/89 +f 56/83 55/81 70/88 +f 63/82 78/89 79/91 +f 56/83 71/90 72/92 +f 65/69 64/67 79/91 +f 58/70 57/68 72/92 +f 65/69 80/93 81/95 +f 59/72 58/70 73/94 +f 59/72 74/96 75/100 +f 71/90 87/116 88/101 +f 79/91 95/117 96/102 +f 73/94 72/92 88/101 +f 81/95 80/93 96/102 +f 74/96 73/94 89/103 +f 74/96 90/105 91/109 +f 67/98 83/107 84/110 +f 75/100 91/109 92/111 +f 68/84 84/110 85/112 +f 77/87 76/85 92/111 +f 69/86 85/112 86/114 +f 77/87 93/113 94/115 +f 71/90 70/88 86/114 +f 78/89 94/115 95/117 +f 91/109 106/133 107/118 +f 84/110 99/134 100/119 +f 93/113 92/111 107/118 +f 85/112 100/119 101/121 +f 93/113 108/120 109/122 +f 87/116 86/114 101/121 +f 95/117 94/115 109/122 +f 87/116 102/123 103/125 +f 96/102 95/117 110/124 +f 89/103 88/101 103/125 +f 96/102 111/126 112/128 +f 90/105 89/103 104/127 +f 90/105 105/129 106/133 +f 84/110 83/107 98/131 +f 110/124 125/151 126/135 +f 104/127 103/125 118/136 +f 111/126 126/135 127/138 +f 105/129 104/127 119/137 +f 105/129 120/139 121/143 +f 99/134 98/131 113/141 +f 106/133 121/143 122/145 +f 99/134 114/144 115/146 +f 108/120 107/118 122/145 +f 100/119 115/146 116/148 +f 108/120 123/147 124/149 +f 102/123 101/121 116/148 +f 110/124 109/122 124/149 +f 102/123 117/150 118/136 +f 123/147 122/145 137/152 +f 115/146 130/168 131/154 +f 123/147 138/153 139/155 +f 117/150 116/148 131/154 +f 125/151 124/149 139/155 +f 117/150 132/156 133/158 +f 125/151 140/157 141/159 +f 119/137 118/136 133/158 +f 126/135 141/159 142/161 +f 120/139 119/137 134/160 +f 120/139 135/162 136/166 +f 113/141 128/164 129/167 +f 121/143 136/166 137/152 +f 114/144 129/167 130/168 +f 142/161 141/159 156/169 +f 135/162 134/160 149/171 +f 135/162 150/172 151/176 +f 128/164 143/174 144/177 +f 136/166 151/176 152/178 +f 130/168 129/167 144/177 +f 138/153 137/152 152/178 +f 130/168 145/179 146/181 +f 138/153 153/180 154/182 +f 132/156 131/154 146/181 +f 140/157 139/155 154/182 +f 132/156 147/183 148/185 +f 140/157 155/184 156/169 +f 134/160 133/158 148/185 +f 145/179 160/201 161/186 +f 153/180 168/202 169/187 +f 147/183 146/181 161/186 +f 155/184 154/182 169/187 +f 147/183 162/188 163/190 +f 155/184 170/189 171/191 +f 149/171 148/185 163/190 +f 156/169 171/191 172/193 +f 150/172 149/171 164/192 +f 150/172 165/194 166/198 +f 143/174 158/196 159/199 +f 151/176 166/198 167/200 +f 145/179 144/177 159/199 +f 153/180 152/178 167/200 +f 165/194 164/192 179/203 +f 165/194 180/204 181/209 +f 158/196 173/206 174/210 +f 166/198 181/209 182/211 +f 159/199 174/210 175/212 +f 168/202 167/200 182/211 +f 160/201 175/212 176/214 +f 168/202 183/213 184/215 +f 162/188 161/186 176/214 +f 169/187 184/215 185/217 +f 162/188 177/216 178/218 +f 171/191 170/189 185/217 +f 164/192 163/190 178/218 +f 172/193 171/191 186/219 +f 183/213 198/236 199/220 +f 177/216 176/214 191/221 +f 185/217 184/215 199/220 +f 177/216 192/222 193/224 +f 185/217 200/223 201/225 +f 179/203 178/218 193/224 +f 186/219 201/225 202/227 +f 180/204 179/203 194/226 +f 180/204 195/228 196/232 +f 174/210 173/206 188/230 +f 181/209 196/232 197/234 +f 175/212 174/210 189/233 +f 183/213 182/211 197/234 +f 175/212 190/235 191/221 +f 195/228 210/253 211/241 +f 188/230 203/238 204/242 +f 196/232 211/241 212/243 +f 189/233 204/242 205/244 +f 198/236 197/234 212/243 +f 190/235 205/244 206/246 +f 198/236 213/245 214/247 +f 192/222 191/221 206/246 +f 200/223 199/220 214/247 +f 192/222 207/248 208/250 +f 200/223 215/249 216/251 +f 194/226 193/224 208/250 +f 201/225 216/251 217/240 +f 195/228 194/226 209/252 +f 207/248 206/246 221/254 +f 215/249 214/247 229/256 +f 207/248 222/255 223/258 +f 215/249 230/257 231/259 +f 209/252 208/250 223/258 +f 216/251 231/259 232/261 +f 210/253 209/252 224/260 +f 210/253 225/262 226/266 +f 203/238 218/264 219/267 +f 211/241 226/266 227/268 +f 204/242 219/267 220/269 +f 213/245 212/243 227/268 +f 205/244 220/269 221/254 +f 213/245 228/270 229/256 +f 225/262 240/284 241/271 +f 218/264 233/286 234/272 +f 226/266 241/271 242/273 +f 220/269 219/267 234/272 +f 228/270 227/268 242/273 +f 220/269 235/274 236/276 +f 228/270 243/275 244/277 +f 222/255 221/254 236/276 +f 230/257 229/256 244/277 +f 222/255 237/278 238/280 +f 230/257 245/279 246/281 +f 224/260 223/258 238/280 +f 232/261 231/259 246/281 +f 225/262 224/260 239/282 +f 245/279 244/277 259/288 +f 237/278 252/304 253/290 +f 245/279 260/289 261/291 +f 239/282 238/280 253/290 +f 246/281 261/291 262/293 +f 240/284 239/282 254/292 +f 240/284 255/294 256/298 +f 233/286 248/296 249/299 +f 241/271 256/298 257/300 +f 234/272 249/299 250/301 +f 243/275 242/273 257/300 +f 235/274 250/301 251/303 +f 243/275 258/302 259/288 +f 237/278 236/276 251/303 +f 256/298 271/320 272/305 +f 249/299 264/321 265/306 +f 258/302 257/300 272/305 +f 250/301 265/306 266/308 +f 258/302 273/307 274/309 +f 252/304 251/303 266/308 +f 260/289 259/288 274/309 +f 252/304 267/310 268/312 +f 260/289 275/311 276/313 +f 254/292 253/290 268/312 +f 261/291 276/313 277/315 +f 255/294 254/292 269/314 +f 255/294 270/316 271/320 +f 249/299 248/296 263/318 +f 275/311 290/338 291/322 +f 269/314 268/312 283/323 +f 277/315 276/313 291/322 +f 270/316 269/314 284/324 +f 270/316 285/326 286/330 +f 264/321 263/318 278/328 +f 271/320 286/330 287/332 +f 264/321 279/331 280/333 +f 273/307 272/305 287/332 +f 265/306 280/333 281/335 +f 273/307 288/334 289/336 +f 267/310 266/308 281/335 +f 275/311 274/309 289/336 +f 267/310 282/337 283/323 +f 279/331 294/355 295/339 +f 288/334 287/332 302/340 +f 280/333 295/339 296/342 +f 288/334 303/341 304/343 +f 282/337 281/335 296/342 +f 290/338 289/336 304/343 +f 282/337 297/344 298/346 +f 290/338 305/345 306/347 +f 284/324 283/323 298/346 +f 292/325 291/322 306/347 +f 285/326 284/324 299/348 +f 285/326 300/350 301/354 +f 278/328 293/352 294/355 +f 286/330 301/354 302/340 +f 299/348 298/346 314/356 +f 306/347 322/372 323/358 +f 300/350 299/348 315/357 +f 300/350 316/359 317/363 +f 293/352 309/361 310/364 +f 301/354 317/363 318/365 +f 294/355 310/364 311/366 +f 303/341 302/340 318/365 +f 295/339 311/366 312/368 +f 303/341 319/367 320/369 +f 297/344 296/342 312/368 +f 305/345 304/343 320/369 +f 297/344 313/370 314/356 +f 305/345 321/371 322/372 +f 319/367 318/365 333/373 +f 311/366 326/389 327/375 +f 319/367 334/374 335/376 +f 312/368 327/375 328/377 +f 321/371 320/369 335/376 +f 313/370 328/377 329/379 +f 321/371 336/378 337/380 +f 315/357 314/356 329/379 +f 322/372 337/380 338/382 +f 316/359 315/357 330/381 +f 316/359 331/383 332/387 +f 309/361 324/385 325/388 +f 317/363 332/387 333/373 +f 310/364 325/388 326/389 +f 337/380 352/406 353/390 +f 331/383 330/381 345/391 +f 331/383 346/392 347/396 +f 324/385 339/394 340/397 +f 332/387 347/396 348/398 +f 325/388 340/397 341/399 +f 334/374 333/373 348/398 +f 326/389 341/399 342/401 +f 334/374 349/400 350/402 +f 328/377 327/375 342/401 +f 336/378 335/376 350/402 +f 328/377 343/403 344/405 +f 336/378 351/404 352/406 +f 330/381 329/379 344/405 +f 341/399 356/422 357/407 +f 349/400 364/423 365/408 +f 343/403 342/401 357/407 +f 351/404 350/402 365/408 +f 343/403 358/409 359/411 +f 351/404 366/410 367/412 +f 345/391 344/405 359/411 +f 352/406 367/412 368/414 +f 346/392 345/391 360/413 +f 346/392 361/415 362/419 +f 339/394 354/417 355/420 +f 347/396 362/419 363/421 +f 341/399 340/397 355/420 +f 349/400 348/398 363/421 +f 361/424 360/455 375/425 +f 361/424 376/426 377/433 +f 354/427 369/429 370/435 +f 362/434 377/433 378/437 +f 356/439 355/436 370/435 +f 364/441 363/438 378/437 +f 356/439 371/440 372/443 +f 364/441 379/442 380/445 +f 358/447 357/444 372/443 +f 366/449 365/446 380/445 +f 358/447 373/448 374/451 +f 366/449 381/450 382/453 +f 360/455 359/452 374/451 +f 367/454 382/453 383/432 +f 379/442 394/472 395/456 +f 373/448 372/443 387/457 +f 381/450 380/445 395/456 +f 373/448 388/458 389/460 +f 381/450 396/459 397/461 +f 375/425 374/451 389/460 +f 382/453 397/461 398/463 +f 376/426 375/425 390/462 +f 376/426 391/464 392/468 +f 369/429 384/466 385/469 +f 377/433 392/468 393/470 +f 371/440 370/435 385/469 +f 379/442 378/437 393/470 +f 371/440 386/471 387/457 +f 391/464 406/488 407/475 +f 385/469 384/466 399/476 +f 392/468 407/475 408/478 +f 385/469 400/477 401/479 +f 394/472 393/470 408/478 +f 386/471 401/479 402/481 +f 394/472 409/480 410/482 +f 388/458 387/457 402/481 +f 396/459 395/456 410/482 +f 388/458 403/483 404/485 +f 397/461 396/459 411/484 +f 390/462 389/460 404/485 +f 397/461 412/486 413/474 +f 391/464 390/462 405/487 +f 411/484 410/482 425/490 +f 403/483 418/506 419/492 +f 411/484 426/491 427/493 +f 405/487 404/485 419/492 +f 412/486 427/493 428/495 +f 406/488 405/487 420/494 +f 406/488 421/496 422/500 +f 399/476 414/498 415/501 +f 407/475 422/500 423/502 +f 401/479 400/477 415/501 +f 409/480 408/478 423/502 +f 401/479 416/503 417/505 +f 409/480 424/504 425/490 +f 403/483 402/481 417/505 +f 414/498 429/521 430/507 +f 422/500 437/523 438/508 +f 416/503 415/501 430/507 +f 424/504 423/502 438/508 +f 416/503 431/509 432/511 +f 424/504 439/510 440/512 +f 418/506 417/505 432/511 +f 426/491 425/490 440/512 +f 418/506 433/513 434/515 +f 426/491 441/514 442/516 +f 420/494 419/492 434/515 +f 427/493 442/516 443/518 +f 421/496 420/494 435/517 +f 421/496 436/519 437/523 +f 433/513 448/539 449/524 +f 441/514 456/540 457/525 +f 435/517 434/515 449/524 +f 442/516 457/525 458/527 +f 436/519 435/517 450/526 +f 436/519 451/528 452/532 +f 430/507 429/521 444/530 +f 437/523 452/532 453/534 +f 430/507 445/533 446/535 +f 439/510 438/508 453/534 +f 431/509 446/535 447/537 +f 439/510 454/536 455/538 +f 433/513 432/511 447/537 +f 441/514 440/512 455/538 +f 452/532 467/557 468/541 +f 446/535 445/533 460/542 +f 454/536 453/534 468/541 +f 446/535 461/543 462/545 +f 454/536 469/544 470/546 +f 448/539 447/537 462/545 +f 456/540 455/538 470/546 +f 448/539 463/547 464/549 +f 456/540 471/548 472/550 +f 450/526 449/524 464/549 +f 458/527 457/525 472/550 +f 451/528 450/526 465/551 +f 451/528 466/553 467/557 +f 444/530 459/555 460/542 +f 471/548 480/4 481/6 +f 465/551 464/549 477/1 +f 472/550 481/6 482/10 +f 466/553 465/551 3/7 +f 466/553 4/12 5/18 +f 460/542 459/555 474/13 +f 467/557 5/18 478/22 +f 461/543 460/542 475/19 +f 468/541 478/22 6/26 +f 462/545 461/543 1/23 +f 469/544 6/26 479/30 +f 463/547 462/545 476/27 +f 471/548 470/546 479/30 +f 464/549 463/547 2/31 diff --git a/src/assets/earth/earth.vs.glsl b/src/assets/earth/earth.vs.glsl new file mode 100644 index 0000000..20d96d0 --- /dev/null +++ b/src/assets/earth/earth.vs.glsl @@ -0,0 +1,13 @@ +#version 300 es + +precision highp float; + +in vec3 position; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 proj; + +void main() { + gl_Position = proj * view * model * vec4(position, 1); +} From ac88bab8bafbb4670e6222ac6373d4d3cfd702d3 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Sun, 7 Jan 2024 00:04:56 -0800 Subject: [PATCH 3/6] Properly commit package stuff --- package-lock.json | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 7da2d71..b217cfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "ngx-masonry": "^14.0.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", + "twgl.js": "^5.5.3", "webpack": "^5.76.1", "zone.js": "~0.13.0" }, @@ -13370,6 +13371,11 @@ "tailwindcss": ">=3.0.0" } }, + "node_modules/twgl.js": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/twgl.js/-/twgl.js-5.5.3.tgz", + "integrity": "sha512-lUrWxXmEURxQphwu4hMkudIThjhbrej3WUKH2qdTifixuO1FxQRLgxJVQ81rTDw9CBoxx4m4iIEOfgCf02Ip1Q==" + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", diff --git a/package.json b/package.json index e4c28d0..96f1268 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "ngx-masonry": "^14.0.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", + "twgl.js": "^5.5.3", "webpack": "^5.76.1", "zone.js": "~0.13.0" }, @@ -56,4 +57,4 @@ "tw-colors": "^3.2.0", "typescript": "~4.9.4" } -} \ No newline at end of file +} From 480c1019a315598cfa77075dbd3f60b74290da54 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Sun, 7 Jan 2024 16:42:44 -0800 Subject: [PATCH 4/6] Refactor + mouse movement + auto-rotate --- .../components/planets/planets.component.ts | 119 ++++++++++++------ 1 file changed, 80 insertions(+), 39 deletions(-) diff --git a/src/app/components/planets/planets.component.ts b/src/app/components/planets/planets.component.ts index ad90ccc..9a3ebfe 100644 --- a/src/app/components/planets/planets.component.ts +++ b/src/app/components/planets/planets.component.ts @@ -24,6 +24,20 @@ export class PlanetsComponent implements OnInit { private debugVertexShader: string | undefined; private debugFragmentShader: string | undefined; + private mouseDown: boolean = false; + + private oldX: number = 0; + private oldY: number = 0; + + private rotX: number = 0; + private rotY: number = 0; + + private gl: any | undefined; + private debugInfo: { bufferInfo: twgl.BufferInfo; programInfo: twgl.ProgramInfo } | undefined; + private earthInfo: { bufferInfo: twgl.BufferInfo; programInfo: twgl.ProgramInfo } | undefined; + + private lastInteraction: number = 0; + constructor(private apiClient: ApiClient, private httpClient: HttpClient) { } @@ -83,18 +97,18 @@ export class PlanetsComponent implements OnInit { } main() { - const gl = this.canvas.nativeElement.getContext("webgl2"); + this.gl = this.canvas.nativeElement.getContext("webgl2"); //Enables some GL state - gl.enable(gl.BLEND) - gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); + this.gl.enable(this.gl.BLEND) + this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA); - gl.enable(gl.DEPTH_TEST); - gl.depthFunc(gl.LESS); + this.gl.enable(this.gl.DEPTH_TEST); + this.gl.depthFunc(this.gl.LESS); - const earthInfo = { - programInfo: twgl.createProgramInfo(gl, [this.vertexShader!, this.fragmentShader!]), - bufferInfo: twgl.createBufferInfoFromArrays(gl, { + this.earthInfo = { + programInfo: twgl.createProgramInfo(this.gl, [this.vertexShader!, this.fragmentShader!]), + bufferInfo: twgl.createBufferInfoFromArrays(this.gl, { position: this.earthModel }), }; @@ -107,52 +121,79 @@ export class PlanetsComponent implements OnInit { debugPoints = debugPoints.concat(loc); }); - const debugInfo = { - programInfo: twgl.createProgramInfo(gl, [this.debugVertexShader!, this.debugFragmentShader!]), - bufferInfo: twgl.createBufferInfoFromArrays(gl, { + this.debugInfo = { + programInfo: twgl.createProgramInfo(this.gl, [this.debugVertexShader!, this.debugFragmentShader!]), + bufferInfo: twgl.createBufferInfoFromArrays(this.gl, { position: debugPoints }), }; - let proj = twgl.m4.perspective(Math.PI / 2 / 1.2, 1, 0.00001, 100); - let view = twgl.m4.lookAt(twgl.v3.create(0, 0, -2), twgl.v3.create(0, 0, 0), twgl.v3.create(0, 1, 0)); - let model = twgl.m4.rotationY(0); + this.gl.canvas.addEventListener('mousemove', (e: any) => { + this.lastInteraction = Date.now(); + + if(this.mouseDown) { + this.rotX += e.pageX - this.oldX; + this.rotY -= e.pageY - this.oldY; + } + + this.oldX = e.pageX; + this.oldY = e.pageY; + }, false); + this.gl.canvas.addEventListener('mousedown', () => this.mouseDown = true, false); + this.gl.canvas.addEventListener('mouseup', () => this.mouseDown = false, false); //Begin the render process - requestAnimationFrame(render); + requestAnimationFrame(time => this.render(time)); + } - function render(time: number) { - twgl.resizeCanvasToDisplaySize(gl.canvas); - gl.viewport(0, 0, gl.canvas.width, gl.canvas.height); + render(time: number) { + if(Date.now() - this.lastInteraction > 5000) { + this.rotX += 0.1; + this.rotY = this.rotY * 0.95; + } - //Clear color and depth buffers - gl.clearColor(0, 0, 0, 0); - gl.clearDepth(1); - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + twgl.resizeCanvasToDisplaySize(this.gl.canvas); + this.gl.viewport(0, 0, this.gl.canvas.width, this.gl.canvas.height); - const uniforms = { - model: model, - view: view, - proj: proj, - }; + //Clear color and depth buffers + this.gl.clearColor(0, 0, 0, 0); + this.gl.clearDepth(1); + this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT); - model = twgl.m4.rotationY(time * 0.0005); + let proj = twgl.m4.perspective(Math.PI / 2 / 1.2, 1, 0.00001, 100); + let view = twgl.m4.lookAt(twgl.v3.create(0, 0, -2), twgl.v3.create(0, 0, 0), twgl.v3.create(0, 1, 0)); + let model = twgl.m4.rotateY(twgl.m4.rotationX(this.rotY / 200), this.rotX / 200); - gl.useProgram(earthInfo.programInfo.program); + const uniforms = { + model: model, + view: view, + proj: proj, + }; - twgl.setBuffersAndAttributes(gl, earthInfo.programInfo, earthInfo.bufferInfo); - twgl.setUniforms(earthInfo.programInfo, uniforms); - twgl.drawBufferInfo(gl, earthInfo.bufferInfo); + // model = twgl.m4.rotationY(time * 0.0005); - gl.useProgram(debugInfo.programInfo.program); + //Use the earth shader + this.gl.useProgram(this.earthInfo!.programInfo.program); - twgl.setBuffersAndAttributes(gl, debugInfo.programInfo, debugInfo.bufferInfo); - twgl.setUniforms(debugInfo.programInfo, uniforms); - twgl.drawBufferInfo(gl, debugInfo.bufferInfo, gl.POINTS); + //Set the buffers to the earth buffers + twgl.setBuffersAndAttributes(this.gl, this.earthInfo!.programInfo, this.earthInfo!.bufferInfo); + //Set the uniforms + twgl.setUniforms(this.earthInfo!.programInfo, uniforms); + //Draw the buffers + twgl.drawBufferInfo(this.gl, this.earthInfo!.bufferInfo); - //Keep the loop going - requestAnimationFrame(render); - } + //Use the debug shader + this.gl.useProgram(this.debugInfo!.programInfo.program); + + //Set the debug buffers + twgl.setBuffersAndAttributes(this.gl, this.debugInfo!.programInfo, this.debugInfo!.bufferInfo); + //Set the uniforms + twgl.setUniforms(this.debugInfo!.programInfo, uniforms); + //Draw the buffers + twgl.drawBufferInfo(this.gl, this.debugInfo!.bufferInfo, this.gl.POINTS); + + //Keep the loop going + requestAnimationFrame(time => this.render(time)); } locationToSphere(location: Location): number[] { From 323598ac22cce84942decf3eda29f7cac7bb2c78 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Sun, 7 Jan 2024 17:34:26 -0800 Subject: [PATCH 5/6] Parse indices --- .../components/planets/planets.component.ts | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/src/app/components/planets/planets.component.ts b/src/app/components/planets/planets.component.ts index 9a3ebfe..c995a2d 100644 --- a/src/app/components/planets/planets.component.ts +++ b/src/app/components/planets/planets.component.ts @@ -18,7 +18,7 @@ export class PlanetsComponent implements OnInit { @Input("user") public User: User | undefined; private levels: Level[] | undefined; - private earthModel: number[] = []; + private earthModel: {vertices: number[], indices: number[]} = {vertices: [], indices: []}; private vertexShader: string | undefined; private fragmentShader: string | undefined; private debugVertexShader: string | undefined; @@ -68,32 +68,24 @@ export class PlanetsComponent implements OnInit { } parseObj(file: string) { - let verts = []; + let verts: number[] = []; let idx: number[] = []; for(let line of file.split("\n")) { let split = line.split(" "); if(split[0] == 'v') { - verts.push([parseFloat(split[1]), parseFloat(split[2]), parseFloat(split[3])]); + verts.push(parseFloat(split[1])); + verts.push(parseFloat(split[2])); + verts.push(parseFloat(split[3])); } else if(split[0] == 'f') { - idx.push(parseInt(split[1].split("/")[0])); - idx.push(parseInt(split[2].split("/")[0])); - idx.push(parseInt(split[3].split("/")[0])); + idx.push(parseInt(split[1].split("/")[0]) - 1); + idx.push(parseInt(split[2].split("/")[0]) - 1); + idx.push(parseInt(split[3].split("/")[0]) - 1); } } - let ret: number[] = []; - - for(let index of idx) { - let vert = verts[index - 1]; - - ret.push(vert[0]); - ret.push(vert[1]); - ret.push(vert[2]); - } - - return ret; + return {vertices: verts, indices: idx}; } main() { @@ -109,7 +101,8 @@ export class PlanetsComponent implements OnInit { this.earthInfo = { programInfo: twgl.createProgramInfo(this.gl, [this.vertexShader!, this.fragmentShader!]), bufferInfo: twgl.createBufferInfoFromArrays(this.gl, { - position: this.earthModel + position: this.earthModel.vertices, + indices: this.earthModel.indices, }), }; @@ -124,7 +117,7 @@ export class PlanetsComponent implements OnInit { this.debugInfo = { programInfo: twgl.createProgramInfo(this.gl, [this.debugVertexShader!, this.debugFragmentShader!]), bufferInfo: twgl.createBufferInfoFromArrays(this.gl, { - position: debugPoints + position: debugPoints, }), }; @@ -134,6 +127,8 @@ export class PlanetsComponent implements OnInit { if(this.mouseDown) { this.rotX += e.pageX - this.oldX; this.rotY -= e.pageY - this.oldY; + + this.rotY = Math.max(Math.min(180, this.rotY), -180); } this.oldX = e.pageX; @@ -148,7 +143,7 @@ export class PlanetsComponent implements OnInit { render(time: number) { if(Date.now() - this.lastInteraction > 5000) { - this.rotX += 0.1; + this.rotX += 0.15; this.rotY = this.rotY * 0.95; } @@ -170,8 +165,6 @@ export class PlanetsComponent implements OnInit { proj: proj, }; - // model = twgl.m4.rotationY(time * 0.0005); - //Use the earth shader this.gl.useProgram(this.earthInfo!.programInfo.program); From 420d19dd92394113852926725aa5bf49d52058d4 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Mon, 8 Jan 2024 16:45:46 -0800 Subject: [PATCH 6/6] Minor refactor, create proper Model data structure --- src/app/components/planets/Model.ts | 4 ++++ src/app/components/planets/planets.component.ts | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/app/components/planets/Model.ts diff --git a/src/app/components/planets/Model.ts b/src/app/components/planets/Model.ts new file mode 100644 index 0000000..d7857bd --- /dev/null +++ b/src/app/components/planets/Model.ts @@ -0,0 +1,4 @@ +export interface Model { + vertices: number[], + indices: number[] +} diff --git a/src/app/components/planets/planets.component.ts b/src/app/components/planets/planets.component.ts index c995a2d..c0cc74e 100644 --- a/src/app/components/planets/planets.component.ts +++ b/src/app/components/planets/planets.component.ts @@ -6,6 +6,8 @@ import {ApiClient} from 'src/app/api/api-client.service'; import {Level} from "../../api/types/level"; import {concatWith, forkJoin, mergeWith, Observable, Subscription} from "rxjs"; import {Location} from "../../api/types/location"; +import {Model} from "./Model"; + @Component({ selector: 'planets', @@ -18,7 +20,7 @@ export class PlanetsComponent implements OnInit { @Input("user") public User: User | undefined; private levels: Level[] | undefined; - private earthModel: {vertices: number[], indices: number[]} = {vertices: [], indices: []}; + private earthModel: Model = {vertices: [], indices: []}; private vertexShader: string | undefined; private fragmentShader: string | undefined; private debugVertexShader: string | undefined; @@ -67,7 +69,7 @@ export class PlanetsComponent implements OnInit { }); } - parseObj(file: string) { + parseObj(file: string): Model { let verts: number[] = []; let idx: number[] = []; @@ -85,7 +87,10 @@ export class PlanetsComponent implements OnInit { } } - return {vertices: verts, indices: idx}; + return { + vertices: verts, + indices: idx + }; } main() {