diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index db2cf04..8af37eb 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,5 +1,3 @@ - - name: Build and Deploy on: push: diff --git a/INSTRUCTIONS.md b/INSTRUCTIONS.md new file mode 100644 index 0000000..c1cda32 --- /dev/null +++ b/INSTRUCTIONS.md @@ -0,0 +1,130 @@ +# Homework 4: L-systems + +For this assignment, you will design a set of formal grammar rules to create +a plant life using an L-system program. Once again, you will work from a +TypeScript / WebGL 2.0 base code like the one you used in homework 0. You will +implement your own set of classes to handle the L-system grammar expansion and +drawing. You will rasterize your L-system using faceted geometry. Feel free +to use ray marching to generate an interesting background, but trying to +raymarch an entire L-system will take too long to render! + +## Base Code +The provided code is very similar to that of homework 1, with the same camera and GUI layout. Additionally, we have provided you with a `Mesh` class that, given a filepath, will construct VBOs describing the vertex positions, normals, colors, uvs, and indices for any `.obj` file. The provided code also uses instanced rendering to draw a single square 10,000 times at different locations and with different colors; refer to the Assignment Requirements section for more details on instanced rendering. Farther down this README, we have also provided some example code snippets for setting up hash map structures in TypeScript. + +## Assignment Requirements +- __(15 points)__ Create a collection of classes to represent an L-system. You should have at least the following components to make your L-system functional: + - A `Turtle` class to represent the current drawing state of your L-System. It should at least keep track of its current position, current orientation, and recursion depth (how many `[` characters have been found while drawing before `]`s) + - A stack of `Turtle`s to represent your `Turtle` history. Push a copy of your current `Turtle` onto this when you reach a `[` while drawing, and pop the top `Turtle` from the stack and make it your current `Turtle` when you encounter a `]`. Note that in TypeScript, `push()` and `pop()` operations can be done on regular arrays. + - An expandable string of characters to represent your grammar as you iterate on it. + - An `ExpansionRule` class to represent the result of mapping a particular character to a new set of characters during the grammar expansion phase of the L-System. By making a class to represent the expansion, you can have a single character expand to multiple possible strings depending on some probability by querying a `Map`. + - A `DrawingRule` class to represent the result of mapping a character to an L-System drawing operation (possibly with multiple outcomes depending on a probability). + +- __(10 points)__ Set up the code in `main.ts` and `ShaderProgram.ts` to pass a collection of transformation data to the GPU to draw your L-System geometric components using __instanced rendering__. We will be using instanced rendering to draw our L-Systems because it is much more efficient to pass a single transformation for each object to be drawn rather than an entire collection of vertices. The provided base code has examples of passing a set of `vec3`s to offset the position of each instanced object, and a set of `vec4`s to change the color of each object. You should at least alter the following via instanced rendering (note that these can be accomplished with a single `mat4`): + - Position + - Orientation + - Scaling + +- __(55 points)__ Your L-System scene must have the following attributes: + - Your plant must grow in 3D (branches must not just exist in one plane) + - Your plant must have flowers, leaves, or some other branch decoration in addition to basic branch geometry + - Organic variation (i.e. noise or randomness in grammar expansion and/or drawing operations) + - The background should be a colorful backdrop to complement your plant, incorporating some procedural elements. + - A flavorful twist. Don't just make a basic variation of the example F[+FX]-FX from the slides! Create a plant that is unique to you. Make an alien tentacle monster plant if you want to! Play around with drawing operations; don't feel compelled to always make your branches straight lines. Curved forms can look quite visually appealing too. + +- __(10 points)__ Using dat.GUI, make at least three aspects of your L-System interactive, such as: + - The probability thresholds in your grammar expansions + - The angle of rotation in various drawing aspects + - The size or color or material of the plant components + - Anything else in your L-System expansion or drawing you'd like to make modifiable; it doesn't have to be these particular elements + +- __(10 points)__ Following the specifications listed +[here](https://github.com/pjcozzi/Articles/blob/master/CIS565/GitHubRepo/README.md), +create your own README.md, renaming the file you are presently reading to +INSTRUCTIONS.md. Don't worry about discussing runtime optimization for this +project. Make sure your README contains the following information: + - Your name and PennKey + - Citation of any external resources you found helpful when implementing this + assignment. + - A link to your live github.io demo (refer to the pinned Piazza post on + how to make a live demo through github.io) + - An explanation of the techniques you used to generate your L-System features. + Please be as detailed as you can; not only will this help you explain your work + to recruiters, but it helps us understand your project when we grade it! + +## Writing classes and functions in TypeScript +Example of a basic Turtle class in TypeScript (Turtle.ts) +``` +import {vec3} from 'gl-matrix'; + +export default class Turtle { + constructor(pos: vec3, orient: vec3) { + this.position = pos; + this.orientation = orient; + } + + moveForward() { + add(this.position, this.position, this.orientation * 10.0); + } +} +``` +Example of a hash map in TypeScript: +``` +let expansionRules : Map = new Map(); +expansionRules.set('A', 'AB'); +expansionRules.set('B', 'A'); + +console.log(expansionRules.get('A')); // Will print out 'AB' +console.log(expansionRules.get('C')); // Will print out 'undefined' +``` +Using functions as map values in TypeScript: +``` +function moveForward() {...} +function rotateLeft() {...} +let drawRules : Map = new Map(); +drawRules.set('F', moveForward); +drawRules.set('+', rotateLeft); + +let func = drawRules.get('F'); +if(func) { // Check that the map contains a value for this key + func(); +} +``` +Note that in the above case, the code assumes that all functions stored in the `drawRules` map take in no arguments. If you want to store a class's functions as values in a map, you'll have to refer to a specific instance of a class, e.g. +``` +let myTurtle: Turtle = new Turtle(); +let drawRules: Map = new Map(); +drawRules.set('F', myTurtle.moveForward.bind(myTurtle)); +let func = drawRules.get('F'); +if(func) { // Check that the map contains a value for this key + func(); +} +``` +TypeScript's `bind` operation sets the `this` variable inside the bound function to refer to the object inside `bind`. This ensures that the `Turtle` in question is the one on which `moveForward` is invoked when `func()` is called with no object. + +## Examples from previous years (Click to go to live demo) + +Andrea Lin: + +[![](andreaLin.png)](http://andrea-lin.com/Project3-LSystems/) + +Ishan Ranade: + +[![](ishanRanade.png)](https://ishanranade.github.io/homework-4-l-systems-IshanRanade/) + +Joe Klinger: + +[![](joeKlinger.png)](https://klingerj.github.io/Project3-LSystems/) + +Linshen Xiao: + +[![](linshenXiao.png)](https://githublsx.github.io/homework-4-l-systems-githublsx/) + +## Useful Resources +- [The Algorithmic Beauty of Plants](http://algorithmicbotany.org/papers/abop/abop-ch1.pdf) +- [OpenGL Instanced Rendering (Learn OpenGL)](https://learnopengl.com/Advanced-OpenGL/Instancing) +- [OpenGL Instanced Rendering (OpenGL-Tutorial)](http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/) + +## Extra Credit (Up to 20 points) +- For bonus points, add functionality to your L-system drawing that ensures geometry will never overlap. In other words, make your plant behave like a real-life plant so that its branches and other components don't compete for the same space. The more complex you make your L-system self-interaction, the more +points you'll earn. +- Any additional visual polish you add to your L-System will count towards extra credit, at your grader's discretion. For example, you could add animation of the leaves or branches in your vertex shader, or add falling leaves or flower petals. diff --git a/README.md b/README.md index c1cda32..ac54ae4 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,9 @@ -# Homework 4: L-systems -For this assignment, you will design a set of formal grammar rules to create -a plant life using an L-system program. Once again, you will work from a -TypeScript / WebGL 2.0 base code like the one you used in homework 0. You will -implement your own set of classes to handle the L-system grammar expansion and -drawing. You will rasterize your L-system using faceted geometry. Feel free -to use ray marching to generate an interesting background, but trying to -raymarch an entire L-system will take too long to render! -## Base Code -The provided code is very similar to that of homework 1, with the same camera and GUI layout. Additionally, we have provided you with a `Mesh` class that, given a filepath, will construct VBOs describing the vertex positions, normals, colors, uvs, and indices for any `.obj` file. The provided code also uses instanced rendering to draw a single square 10,000 times at different locations and with different colors; refer to the Assignment Requirements section for more details on instanced rendering. Farther down this README, we have also provided some example code snippets for setting up hash map structures in TypeScript. +## Halloween Tree: +![screenshot](halloweenTree.JPG) +PennKey: effieli +Name: Effie Li +Link: https://effieyanfei.github.io/hw04-l-systems/ +I was inspired by Halloween and created a tree with sprial monster-like branches. The leaves are towards the tip of the branches, increasing based on how close it is to the tip. There are also bats hanging from the branches when you incrase the iteration. Users can control the number of iteration, the scale of the leaves, and the color of the leaves and the base of the trunk. The background is created with fbm noise, and it is animated with time. -## Assignment Requirements -- __(15 points)__ Create a collection of classes to represent an L-system. You should have at least the following components to make your L-system functional: - - A `Turtle` class to represent the current drawing state of your L-System. It should at least keep track of its current position, current orientation, and recursion depth (how many `[` characters have been found while drawing before `]`s) - - A stack of `Turtle`s to represent your `Turtle` history. Push a copy of your current `Turtle` onto this when you reach a `[` while drawing, and pop the top `Turtle` from the stack and make it your current `Turtle` when you encounter a `]`. Note that in TypeScript, `push()` and `pop()` operations can be done on regular arrays. - - An expandable string of characters to represent your grammar as you iterate on it. - - An `ExpansionRule` class to represent the result of mapping a particular character to a new set of characters during the grammar expansion phase of the L-System. By making a class to represent the expansion, you can have a single character expand to multiple possible strings depending on some probability by querying a `Map`. - - A `DrawingRule` class to represent the result of mapping a character to an L-System drawing operation (possibly with multiple outcomes depending on a probability). - -- __(10 points)__ Set up the code in `main.ts` and `ShaderProgram.ts` to pass a collection of transformation data to the GPU to draw your L-System geometric components using __instanced rendering__. We will be using instanced rendering to draw our L-Systems because it is much more efficient to pass a single transformation for each object to be drawn rather than an entire collection of vertices. The provided base code has examples of passing a set of `vec3`s to offset the position of each instanced object, and a set of `vec4`s to change the color of each object. You should at least alter the following via instanced rendering (note that these can be accomplished with a single `mat4`): - - Position - - Orientation - - Scaling - -- __(55 points)__ Your L-System scene must have the following attributes: - - Your plant must grow in 3D (branches must not just exist in one plane) - - Your plant must have flowers, leaves, or some other branch decoration in addition to basic branch geometry - - Organic variation (i.e. noise or randomness in grammar expansion and/or drawing operations) - - The background should be a colorful backdrop to complement your plant, incorporating some procedural elements. - - A flavorful twist. Don't just make a basic variation of the example F[+FX]-FX from the slides! Create a plant that is unique to you. Make an alien tentacle monster plant if you want to! Play around with drawing operations; don't feel compelled to always make your branches straight lines. Curved forms can look quite visually appealing too. - -- __(10 points)__ Using dat.GUI, make at least three aspects of your L-System interactive, such as: - - The probability thresholds in your grammar expansions - - The angle of rotation in various drawing aspects - - The size or color or material of the plant components - - Anything else in your L-System expansion or drawing you'd like to make modifiable; it doesn't have to be these particular elements - -- __(10 points)__ Following the specifications listed -[here](https://github.com/pjcozzi/Articles/blob/master/CIS565/GitHubRepo/README.md), -create your own README.md, renaming the file you are presently reading to -INSTRUCTIONS.md. Don't worry about discussing runtime optimization for this -project. Make sure your README contains the following information: - - Your name and PennKey - - Citation of any external resources you found helpful when implementing this - assignment. - - A link to your live github.io demo (refer to the pinned Piazza post on - how to make a live demo through github.io) - - An explanation of the techniques you used to generate your L-System features. - Please be as detailed as you can; not only will this help you explain your work - to recruiters, but it helps us understand your project when we grade it! - -## Writing classes and functions in TypeScript -Example of a basic Turtle class in TypeScript (Turtle.ts) -``` -import {vec3} from 'gl-matrix'; - -export default class Turtle { - constructor(pos: vec3, orient: vec3) { - this.position = pos; - this.orientation = orient; - } - - moveForward() { - add(this.position, this.position, this.orientation * 10.0); - } -} -``` -Example of a hash map in TypeScript: -``` -let expansionRules : Map = new Map(); -expansionRules.set('A', 'AB'); -expansionRules.set('B', 'A'); - -console.log(expansionRules.get('A')); // Will print out 'AB' -console.log(expansionRules.get('C')); // Will print out 'undefined' -``` -Using functions as map values in TypeScript: -``` -function moveForward() {...} -function rotateLeft() {...} -let drawRules : Map = new Map(); -drawRules.set('F', moveForward); -drawRules.set('+', rotateLeft); - -let func = drawRules.get('F'); -if(func) { // Check that the map contains a value for this key - func(); -} -``` -Note that in the above case, the code assumes that all functions stored in the `drawRules` map take in no arguments. If you want to store a class's functions as values in a map, you'll have to refer to a specific instance of a class, e.g. -``` -let myTurtle: Turtle = new Turtle(); -let drawRules: Map = new Map(); -drawRules.set('F', myTurtle.moveForward.bind(myTurtle)); -let func = drawRules.get('F'); -if(func) { // Check that the map contains a value for this key - func(); -} -``` -TypeScript's `bind` operation sets the `this` variable inside the bound function to refer to the object inside `bind`. This ensures that the `Turtle` in question is the one on which `moveForward` is invoked when `func()` is called with no object. - -## Examples from previous years (Click to go to live demo) - -Andrea Lin: - -[![](andreaLin.png)](http://andrea-lin.com/Project3-LSystems/) - -Ishan Ranade: - -[![](ishanRanade.png)](https://ishanranade.github.io/homework-4-l-systems-IshanRanade/) - -Joe Klinger: - -[![](joeKlinger.png)](https://klingerj.github.io/Project3-LSystems/) - -Linshen Xiao: - -[![](linshenXiao.png)](https://githublsx.github.io/homework-4-l-systems-githublsx/) - -## Useful Resources -- [The Algorithmic Beauty of Plants](http://algorithmicbotany.org/papers/abop/abop-ch1.pdf) -- [OpenGL Instanced Rendering (Learn OpenGL)](https://learnopengl.com/Advanced-OpenGL/Instancing) -- [OpenGL Instanced Rendering (OpenGL-Tutorial)](http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/) - -## Extra Credit (Up to 20 points) -- For bonus points, add functionality to your L-system drawing that ensures geometry will never overlap. In other words, make your plant behave like a real-life plant so that its branches and other components don't compete for the same space. The more complex you make your L-system self-interaction, the more -points you'll earn. -- Any additional visual polish you add to your L-System will count towards extra credit, at your grader's discretion. For example, you could add animation of the leaves or branches in your vertex shader, or add falling leaves or flower petals. diff --git a/dist/index.html b/dist/index.html index eba1966..6a82b8a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,20 +1,22 @@ - + + - Project 4: L-Systems | CIS 566 - + Project 4: L System| CIS 566 + - \ No newline at end of file + diff --git a/halloweenTree.JPG b/halloweenTree.JPG new file mode 100644 index 0000000..11eb04c Binary files /dev/null and b/halloweenTree.JPG differ diff --git a/package-lock.json b/package-lock.json index 095aa6c..f370cda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1743,7 +1743,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1764,12 +1765,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1784,17 +1787,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1911,7 +1917,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1923,6 +1930,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1937,6 +1945,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1944,12 +1953,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1968,6 +1979,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2048,7 +2060,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2060,6 +2073,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2145,7 +2159,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2181,6 +2196,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2200,6 +2216,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2243,12 +2260,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json new file mode 100644 index 0000000..0469248 --- /dev/null +++ b/src/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-msedge", + "request": "launch", + "name": "Launch Edge against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/src/DrawingRule.ts b/src/DrawingRule.ts new file mode 100644 index 0000000..c28c6ea --- /dev/null +++ b/src/DrawingRule.ts @@ -0,0 +1,54 @@ +import Turtle from "./Turtle"; + +export default class DrawingRule{ + turtle: Turtle; + char: string; + a: number = 20; + isOperation: boolean; + isTurn: boolean; + + constructor(st: Turtle, c: string) { + this.isTurn = false; + this.turtle = st; + this.char = c; + this.getTurtle(); + + } + + getTurtle() { + if(this.char == 'F' || this.char == 'W' || this.char == 'D') { + this.turtle.moveForward(); + this.isOperation = true; + } + if(this.char == '*') { + this.turtle.FBackward(this.a); + this.isOperation = true; + this.isTurn = true; + } + if(this.char == '+') { + this.turtle.FForward(this.a); + this.isOperation = true; + this.isTurn = true; + } + if(this.char == '&') { + this.turtle.UForward(this.a); + this.isOperation = true; + this.isTurn = true; + } + if(this.char == '^') { + this.turtle.UBackward(this.a); + this.isOperation = true; + this.isTurn = true; + } + if(this.char == '/') { + this.turtle.RBackward(this.a); + this.isOperation = true; + this.isTurn = true; + } + if(this.char == '<') { + this.turtle.RForward(this.a); + this.isOperation = true; + this.isTurn = true; + } + } +} \ No newline at end of file diff --git a/src/ExpansionRule.ts b/src/ExpansionRule.ts new file mode 100644 index 0000000..e106ba0 --- /dev/null +++ b/src/ExpansionRule.ts @@ -0,0 +1,25 @@ +export default class ExpansionRule{ + rules: Array = new Array(); + possibilities: Array = new Array(); + output : string = ""; + + constructor(rules: Array, possibilities: Array) { + this.rules = rules; + this.possibilities = possibilities; + this.output = rules[0]; + } + + createRule() { + var r = Math.random(); + var idx = 0; + var sum = 0; + while(r > sum) { + sum += this.possibilities[idx]; + idx += 1; + } + if(idx >= this.rules.length) { + idx = this.rules.length - 1; + } + this.output = this.rules[idx]; + } +} \ No newline at end of file diff --git a/src/LSystem.ts b/src/LSystem.ts new file mode 100644 index 0000000..12be8ce --- /dev/null +++ b/src/LSystem.ts @@ -0,0 +1,188 @@ +import ExpansionRule from './ExpansionRule'; +import DrawingRule from './DrawingRule'; +import Turtle from "./Turtle"; +import {mat4} from 'gl-matrix'; +import {vec4} from 'gl-matrix'; +import { vec3 } from 'gl-matrix'; +import { copyFile } from 'fs'; +import { networkInterfaces } from 'os'; + +class LSystem { + iteration: number = 0; + axiom: string = ""; + rulesExpan: Map = new Map(); + rulesDraw: DrawingRule; + fullGrammar: string = ""; + myTurtle: Turtle = new Turtle(vec4.fromValues(50, 20, 0, 1), vec4.fromValues(0, 1, 0, 0), vec4.fromValues(1, 0, 0, 0), vec4.fromValues(1, 0, 0, 0), 1, 1.8); + turtleStack: Array = new Array(); + angle: number= 10; + color: vec3; + leafScale: number; + + Btransformations: Array = new Array(); + Bcolors: Array = new Array(); + + Ytransformations: Array = new Array(); + Ycolors: Array = new Array(); + + Ltransformations: Array = new Array(); + Lcolors: Array = new Array(); + + Htransformations: Array = new Array(); + Hcolors: Array = new Array(); + + Ttransformations: Array = new Array(); + Tcolors: Array = new Array(); + + + constructor(a: string, iter: number, color: vec3, leaf: number) { + this.iteration = iter; + this.axiom = a; + this.color = color; + this.leafScale = leaf; + this.makeExpansionRules(); + this.createFullGrammar(); + this.findTransforms(); + } + + makeExpansionRules() { + var r0 = new ExpansionRule(new Array("[[[[AB]++++BA]+++J"), new Array(1.0)); + this.rulesExpan.set('J', r0); + + var r1 = new ExpansionRule(new Array("TJ"), new Array(1.0)); + this.rulesExpan.set('X', r1); + + var r2 = new ExpansionRule(new Array("<<[**L][^^L]FF<(0.33, 0.33, 0.33)); + this.rulesExpan.set('A', r2); + + var r3 = new ExpansionRule(new Array("//[++L][&&L]FF//FF//FF//A", "++[&&L][//L]FF++FF++FF++HA", "&&[//L][++L]FF&&FF&&FF&&A"), new Array(0.33, 0.33, 0.33)); + this.rulesExpan.set('B', r3); + + var r4 = new ExpansionRule(new Array("FFT"), new Array(1.0)); + this.rulesExpan.set('T', r4); + } + + createFullGrammar() { + var current = this.axiom; + var count = 0; + while(count < this.iteration) { + count ++; + var idx = 0; + var updated = ""; + while(idx < current.length) { + var k = current.substring(idx, idx + 1); + if(this.rulesExpan.has(k)){ + var r: any = this.rulesExpan.get(k); + r.createRule(); + updated += r.output; + } else { + updated += k; + } + idx ++; + } + current = updated; + } + this.fullGrammar = current; + } + + findTransforms() { + var idx = 0; + while(idx < this.fullGrammar.length) { + var k = this.fullGrammar.substring(idx, idx + 1); + this.rulesDraw = new DrawingRule(this.myTurtle, k); + this.myTurtle = this.rulesDraw.turtle; + if(k == 'F') { + var s = 1 - this.myTurtle.scale; + var r = 0.2 + (this.color[0] - 0.2) * (s * s); + var g = 0.2 + (this.color[1] - 0.2) * (s * s); + var b = 0.2 + (this.color[2] - 0.2) * (s * s); + var color = vec4.fromValues(r, g, b, 1); + this.myTurtle.decreaseScale(0.98); + this.Bcolors.push(color); + this.Btransformations.push(this.myTurtle.getTransform()); + } + if(this.rulesDraw.isTurn){ + var r = 0.2 + (this.color[0] - 0.2) * (s * s); + var g = 0.2 + (this.color[1] - 0.2) * (s * s); + var b = 0.2 + (this.color[2] - 0.2) * (s * s); + var color = vec4.fromValues(r, g, b, 1); + this.Tcolors.push(color); + this.Ttransformations.push(this.myTurtle.getTransform()); + } + + if(k == '[') { + let d = this.myTurtle.depth; + let copy: Turtle = new Turtle(vec4.fromValues(this.myTurtle.pos[0], this.myTurtle.pos[1], this.myTurtle.pos[2], this.myTurtle.pos[3]), + vec4.fromValues(this.myTurtle.forward[0], this.myTurtle.forward[1], this.myTurtle.forward[2], this.myTurtle.forward[3]), + vec4.fromValues(this.myTurtle.right[0], this.myTurtle.right[1], this.myTurtle.right[2], this.myTurtle.right[3]), + vec4.fromValues(this.myTurtle.up[0], this.myTurtle.up[1], this.myTurtle.up[2], this.myTurtle.up[3]), + d + 1, this.myTurtle.scale); + this.turtleStack.push(copy); + } + if(k == ']'){ + let popped: Turtle = this.turtleStack.pop(); + this.myTurtle = new Turtle(popped.pos, popped.forward, popped.right, popped.up, popped.depth, popped.scale); + } + if(k == 'L' && this.myTurtle.scale < this.iteration * 0.08) { + var color = vec4.fromValues(r, g, b, 1); + this.Lcolors.push(color); + this.Ltransformations.push(this.myTurtle.getTransformCustomScale(this.leafScale)); + } + if(k == 'H' && this.myTurtle.scale < this.iteration * 0.04) { + var color = vec4.fromValues(0, 0, 0, 1); + this.Hcolors.push(color); + this.Htransformations.push(this.myTurtle.getTranslationMatrix()); + } + idx ++; + } + } + + getTFloat32Array(arr: Array, mode: number): Float32Array { + let T = []; + var idx = 0; + while(idx < arr.length) { + var transform: mat4 = arr[idx]; + if(mode == 1){ + for(var i = 0; i < 4; i++) { + T.push(transform[i]); + } + } + if(mode == 2) { + for(var i = 0; i < 4; i++) { + T.push(transform[4 + i]); + } + } + if(mode == 3) { + for(var i = 0; i < 4; i++) { + T.push(transform[8 + i]); + } + } + if(mode == 4) { + for(var i = 0; i < 4; i++) { + T.push(transform[12 + i]); + } + } + idx ++; + } + let Tarray: Float32Array = new Float32Array(T); + return Tarray; + } + + getCFloat32Array(arr: Array): Float32Array { + var idx = 0; + let colorsArray = []; + while(idx < arr.length) { + var c: vec4 = arr[idx]; + colorsArray.push(c[0]); + colorsArray.push(c[1]); + colorsArray.push(c[2]); + colorsArray.push(c[3]); + idx ++; + } + let colors: Float32Array = new Float32Array(colorsArray); + return colors; + } + +}; + +export default LSystem; \ No newline at end of file diff --git a/src/Turtle.ts b/src/Turtle.ts new file mode 100644 index 0000000..9a1befd --- /dev/null +++ b/src/Turtle.ts @@ -0,0 +1,121 @@ +import { glMatrix, vec3, vec4 } from "gl-matrix"; +import { mat4 } from "gl-matrix"; +import { totalmem } from "os"; + +export default class Turtle { + pos: vec4 = vec4.create(); + depth: number = 0; + forward: vec4 = vec4.create(); + right: vec4 = vec4.create(); + up: vec4 = vec4.create(); + scale: number; + + constructor(pos: vec4, f: vec4, r: vec4, u: vec4, d: number, s: number) { + this.pos = pos; + this.depth = d; + this.forward = f; + this.right = r; + this.up = u; + this.scale = s; + } + + moveForward() { + var step: number = this.scale; + this.pos[0] = this.pos[0] + step * this.forward[0]; + this.pos[1] = this.pos[1] + step * this.forward[1]; + this.pos[2] = this.pos[2] + step * this.forward[2]; + } + + FForward(angle: number) { + var a = glMatrix.toRadian(angle); + var rot = mat4.create(); + var axis = vec3.fromValues(this.forward[0], this.forward[1], this.forward[2]); + mat4.fromRotation(rot, a, axis); + vec4.normalize(this.right, vec4.transformMat4(this.right, this.right, rot)); + vec4.normalize(this.up, vec4.transformMat4(this.up, this.up, rot)); + } + + FBackward(angle: number) { + this.FForward(-1 * angle); + } + + + UForward(angle: number) { + var a = glMatrix.toRadian(angle); + var rot = mat4.create(); + var axis = vec3.fromValues(this.up[0], this.up[1], this.up[2]); + mat4.fromRotation(rot, a, axis); + vec4.normalize(this.right, vec4.transformMat4(this.right, this.right, rot)); + vec4.normalize(this.forward, vec4.transformMat4(this.forward, this.forward, rot)); + } + + UBackward(angle: number) { + this.UForward(-1 * angle); + } + + RForward(angle: number) { + var a = glMatrix.toRadian(angle); + var rot = mat4.create(); + var axis = vec3.fromValues(this.right[0], this.right[1], this.right[2]); + mat4.fromRotation(rot, a, axis); + vec4.normalize(this.up, vec4.transformMat4(this.up, this.up, rot)); + vec4.normalize(this.forward, vec4.transformMat4(this.forward, this.forward, rot)); + } + + RBackward(angle: number) { + this.RForward(-1 * angle); + } + + getRotationMatrix(): mat4 { + var originDir: vec3 = vec3.fromValues(0, 1, 0); + var forwardDir: vec3 = vec3.fromValues(this.forward[0], this.forward[1], this.forward[2]); + var rotAxis = vec3.create(); + vec3.cross(rotAxis, originDir, forwardDir); + var angle = Math.acos(vec3.dot(originDir, forwardDir) / (vec3.length(originDir) * vec3.length(forwardDir))); + var rotMatrix = mat4.create(); + mat4.fromRotation(rotMatrix, angle, rotAxis); + return rotMatrix; + } + + getTranslationMatrix(): mat4 { + var identity = mat4.create(); + var transMatrix = mat4.create(); + mat4.identity(identity); + mat4.translate(transMatrix, identity, vec3.fromValues(this.pos[0], this.pos[1], this.pos[2])); + return transMatrix; + } + + decreaseScale(f: number) { + this.scale = this.scale * f; + } + + getScaleMatrix(): mat4 { + var scaleMatrix = mat4.create(); + let identity = mat4.create(); + mat4.identity(identity); + mat4.scale(scaleMatrix, identity, vec3.fromValues(this.scale, this.scale, this.scale)); + return scaleMatrix; + } + + getScaleMatrixCustom(s: number) : mat4 { + var scaleMatrix = mat4.create(); + let identity = mat4.create(); + mat4.identity(identity); + mat4.scale(scaleMatrix, identity, vec3.fromValues(s, s, s)); + return scaleMatrix; + } + + getTransform(): mat4 { + var output = mat4.create(); + mat4.multiply(output, this.getTranslationMatrix(), this.getRotationMatrix()); + mat4.multiply(output, output, this.getScaleMatrix()); + return output; + } + + getTransformCustomScale(s: number): mat4 { + var output = mat4.create(); + mat4.multiply(output, this.getTranslationMatrix(), this.getRotationMatrix()); + mat4.multiply(output, output, this.getScaleMatrixCustom(s)); + return output; + } +} \ No newline at end of file diff --git a/src/bat.obj b/src/bat.obj new file mode 100644 index 0000000..23d63d3 --- /dev/null +++ b/src/bat.obj @@ -0,0 +1,551 @@ +# This file uses centimeters as units for non-parametric coordinates. + +mtllib bat.mtl +g default +v 0.129359 -0.159253 -0.171852 +v 0.129359 -0.221696 -0.283047 +v 0.129359 -1.000803 -0.342842 +v 0.129359 -1.801216 -0.412088 +v 0.129359 -2.934905 -0.841443 +v 0.129359 -4.020538 -1.216231 +v 0.129359 -5.647404 -1.260170 +v 0.129359 -5.501899 -0.789385 +v 0.129359 -5.685778 -0.345375 +v 0.129359 -5.826259 0.000000 +v 0.129359 -5.685778 0.345375 +v 0.129359 -5.501899 0.789385 +v 0.129359 -5.647404 1.260170 +v 0.129359 -4.020537 1.216231 +v 0.129359 -2.934905 0.841442 +v 0.129359 -1.801217 0.412088 +v 0.129359 -1.000804 0.342842 +v 0.129359 -0.221698 0.283047 +v 0.129359 -0.159254 0.171852 +v 0.129359 -0.018773 -0.000000 +v -0.129359 -0.159253 -0.171852 +v -0.129359 -0.221696 -0.283047 +v -0.129359 -1.000803 -0.342842 +v -0.129359 -1.801216 -0.403035 +v -0.129359 -2.935125 -0.832234 +v -0.129359 -4.020538 -1.216231 +v -0.129359 -5.647404 -1.260170 +v -0.129359 -5.501899 -0.789385 +v -0.129359 -5.685778 -0.345375 +v -0.129359 -5.826259 0.000000 +v -0.129359 -5.685778 0.345375 +v -0.129359 -5.501899 0.789385 +v -0.129359 -5.647404 1.260170 +v -0.129359 -4.020537 1.216231 +v -0.129359 -2.935125 0.832234 +v -0.129359 -1.801217 0.403035 +v -0.129359 -1.000804 0.342842 +v -0.129359 -0.221698 0.283047 +v -0.129359 -0.159254 0.171852 +v -0.129359 -0.018773 -0.000000 +v 0.129359 -2.955993 -0.000000 +v -0.129359 -2.955993 -0.000000 +vt 0.648603 0.107966 +vt 0.626409 0.064408 +vt 0.591842 0.029841 +vt 0.548284 0.007647 +vt 0.500000 -0.000000 +vt 0.451716 0.007647 +vt 0.408159 0.029841 +vt 0.373591 0.064409 +vt 0.351397 0.107966 +vt 0.343750 0.156250 +vt 0.351397 0.204534 +vt 0.373591 0.248091 +vt 0.408159 0.282659 +vt 0.451716 0.304853 +vt 0.500000 0.312500 +vt 0.548284 0.304853 +vt 0.591841 0.282659 +vt 0.626409 0.248091 +vt 0.648603 0.204534 +vt 0.656250 0.156250 +vt 0.375000 0.312500 +vt 0.387500 0.312500 +vt 0.400000 0.312500 +vt 0.412500 0.312500 +vt 0.425000 0.312500 +vt 0.437500 0.312500 +vt 0.450000 0.312500 +vt 0.462500 0.312500 +vt 0.475000 0.312500 +vt 0.487500 0.312500 +vt 0.500000 0.312500 +vt 0.512500 0.312500 +vt 0.525000 0.312500 +vt 0.537500 0.312500 +vt 0.550000 0.312500 +vt 0.562500 0.312500 +vt 0.575000 0.312500 +vt 0.587500 0.312500 +vt 0.600000 0.312500 +vt 0.612500 0.312500 +vt 0.625000 0.312500 +vt 0.375000 0.688440 +vt 0.387500 0.688440 +vt 0.400000 0.688440 +vt 0.412500 0.688440 +vt 0.425000 0.688440 +vt 0.437500 0.688440 +vt 0.450000 0.688440 +vt 0.462500 0.688440 +vt 0.475000 0.688440 +vt 0.487500 0.688440 +vt 0.500000 0.688440 +vt 0.512500 0.688440 +vt 0.525000 0.688440 +vt 0.537500 0.688440 +vt 0.550000 0.688440 +vt 0.562500 0.688440 +vt 0.575000 0.688440 +vt 0.587500 0.688440 +vt 0.600000 0.688440 +vt 0.612500 0.688440 +vt 0.625000 0.688440 +vt 0.648603 0.795466 +vt 0.626409 0.751908 +vt 0.591842 0.717341 +vt 0.548284 0.695147 +vt 0.500000 0.687500 +vt 0.451716 0.695147 +vt 0.408159 0.717341 +vt 0.373591 0.751909 +vt 0.351397 0.795466 +vt 0.343750 0.843750 +vt 0.351397 0.892034 +vt 0.373591 0.935591 +vt 0.408159 0.970159 +vt 0.451716 0.992353 +vt 0.500000 1.000000 +vt 0.548284 0.992353 +vt 0.591841 0.970159 +vt 0.626409 0.935591 +vt 0.648603 0.892034 +vt 0.656250 0.843750 +vt 0.500000 0.150000 +vt 0.500000 0.837500 +vn 0.000000 0.812719 -0.582656 +vn 0.000000 0.199116 -0.979976 +vn 0.000000 0.199116 -0.979976 +vn 0.000000 0.812719 -0.582656 +vn -0.008838 0.078584 -0.996868 +vn -0.008838 0.078584 -0.996868 +vn -0.027151 0.247550 -0.968495 +vn -0.027130 0.247186 -0.968588 +vn -0.025239 0.342223 -0.939280 +vn -0.025273 0.342274 -0.939260 +vn -0.007096 0.154203 -0.988014 +vn -0.007096 0.154203 -0.988014 +vn -0.000000 -0.276880 -0.960905 +vn -0.000000 -0.276880 -0.960905 +vn -0.000000 -0.999121 -0.041912 +vn -0.000000 -0.999121 -0.041912 +vn -0.000000 -0.924959 -0.380068 +vn -0.000000 -0.924959 -0.380068 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -0.924959 0.380068 +vn 0.000000 -0.924959 0.380068 +vn 0.000000 -0.999121 0.041912 +vn 0.000000 -0.999121 0.041912 +vn 0.000000 -0.276879 0.960905 +vn 0.000000 -0.276879 0.960905 +vn -0.007096 0.154203 0.988014 +vn -0.007096 0.154203 0.988014 +vn -0.025240 0.342223 0.939280 +vn -0.025274 0.342274 0.939260 +vn -0.027152 0.247550 0.968495 +vn -0.027131 0.247186 0.968588 +vn -0.008838 0.078584 0.996868 +vn -0.008838 0.078584 0.996868 +vn 0.000000 0.199116 0.979976 +vn 0.000000 0.199116 0.979976 +vn 0.000000 0.812716 0.582660 +vn 0.000000 0.812716 0.582660 +vn 0.000000 1.000000 0.000005 +vn 0.000000 1.000000 0.000005 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +s 1 +g pCylinder1 +usemtl initialShadingGroup +f 1/21/1 2/22/2 22/43/3 21/42/4 +f 2/22/2 3/23/5 23/44/6 22/43/3 +f 3/23/5 4/24/7 24/45/8 23/44/6 +f 4/24/7 5/25/9 25/46/10 24/45/8 +f 5/25/9 6/26/11 26/47/12 25/46/10 +f 6/26/11 7/27/13 27/48/14 26/47/12 +f 7/27/13 8/28/15 28/49/16 27/48/14 +f 8/28/15 9/29/17 29/50/18 28/49/16 +f 9/29/17 10/30/19 30/51/20 29/50/18 +f 10/30/19 11/31/21 31/52/22 30/51/20 +f 11/31/21 12/32/23 32/53/24 31/52/22 +f 12/32/23 13/33/25 33/54/26 32/53/24 +f 13/33/25 14/34/27 34/55/28 33/54/26 +f 14/34/27 15/35/29 35/56/30 34/55/28 +f 15/35/29 16/36/31 36/57/32 35/56/30 +f 16/36/31 17/37/33 37/58/34 36/57/32 +f 17/37/33 18/38/35 38/59/36 37/58/34 +f 18/38/35 19/39/37 39/60/38 38/59/36 +f 19/39/37 20/40/39 40/61/40 39/60/38 +f 20/40/39 1/41/1 21/62/4 40/61/40 +s 2 +f 2/2/41 1/1/42 41/83/43 +f 3/3/44 2/2/41 41/83/43 +f 4/4/45 3/3/44 41/83/43 +f 5/5/46 4/4/45 41/83/43 +f 6/6/47 5/5/46 41/83/43 +f 7/7/48 6/6/47 41/83/43 +f 8/8/49 7/7/48 41/83/43 +f 9/9/50 8/8/49 41/83/43 +f 10/10/51 9/9/50 41/83/43 +f 11/11/52 10/10/51 41/83/43 +f 12/12/53 11/11/52 41/83/43 +f 13/13/54 12/12/53 41/83/43 +f 14/14/55 13/13/54 41/83/43 +f 15/15/56 14/14/55 41/83/43 +f 16/16/57 15/15/56 41/83/43 +f 17/17/58 16/16/57 41/83/43 +f 18/18/59 17/17/58 41/83/43 +f 19/19/60 18/18/59 41/83/43 +f 20/20/61 19/19/60 41/83/43 +f 1/1/42 20/20/61 41/83/43 +s 3 +f 21/81/62 22/80/63 42/84/64 +f 22/80/63 23/79/65 42/84/64 +f 23/79/65 24/78/66 42/84/64 +f 24/78/66 25/77/67 42/84/64 +f 25/77/67 26/76/68 42/84/64 +f 26/76/68 27/75/69 42/84/64 +f 27/75/69 28/74/70 42/84/64 +f 28/74/70 29/73/71 42/84/64 +f 29/73/71 30/72/72 42/84/64 +f 30/72/72 31/71/73 42/84/64 +f 31/71/73 32/70/74 42/84/64 +f 32/70/74 33/69/75 42/84/64 +f 33/69/75 34/68/76 42/84/64 +f 34/68/76 35/67/77 42/84/64 +f 35/67/77 36/66/78 42/84/64 +f 36/66/78 37/65/79 42/84/64 +f 37/65/79 38/64/80 42/84/64 +f 38/64/80 39/63/81 42/84/64 +f 39/63/81 40/82/82 42/84/64 +f 40/82/82 21/81/62 42/84/64 +g default +v 0.145482 -5.621302 -0.141705 +v 0.145482 -5.623792 -0.269539 +v 0.145482 -5.680256 -0.389456 +v 0.145482 -5.836042 -0.513657 +v 0.145482 -6.057429 -0.590639 +v 0.145482 -6.464421 -0.573456 +v 0.145482 -7.163419 -0.794295 +v 0.145482 -6.814373 -0.482555 +v 0.145482 -6.733751 -0.217209 +v 0.145482 -6.793560 -0.000000 +v 0.145482 -6.733751 0.217209 +v 0.145482 -6.814373 0.482555 +v 0.145482 -7.163419 0.794295 +v 0.145482 -6.464421 0.573456 +v 0.145482 -6.057429 0.590638 +v 0.145482 -5.836042 0.513656 +v 0.145482 -5.680257 0.389455 +v 0.145482 -5.623793 0.269538 +v 0.145482 -5.621302 0.141705 +v 0.145482 -5.659132 -0.000000 +v -0.145482 -5.621302 -0.141705 +v -0.145482 -5.623792 -0.269539 +v -0.145482 -5.680256 -0.389456 +v -0.145482 -5.836042 -0.513657 +v -0.145482 -6.057429 -0.590639 +v -0.145482 -6.464421 -0.573456 +v -0.145482 -7.163419 -0.794295 +v -0.145482 -6.814373 -0.482555 +v -0.145482 -6.733751 -0.217209 +v -0.145482 -6.793560 -0.000000 +v -0.145482 -6.733751 0.217209 +v -0.145482 -6.814373 0.482555 +v -0.145482 -7.163419 0.794295 +v -0.145482 -6.464421 0.573456 +v -0.145482 -6.057429 0.590638 +v -0.145482 -5.836042 0.513656 +v -0.145482 -5.680257 0.389455 +v -0.145482 -5.623793 0.269538 +v -0.145482 -5.621302 0.141705 +v -0.145482 -5.659132 -0.000000 +v 0.145482 -6.067506 -0.000000 +v -0.145482 -6.067506 -0.000000 +vt 0.648603 0.107966 +vt 0.626409 0.064408 +vt 0.591842 0.029841 +vt 0.548284 0.007647 +vt 0.500000 -0.000000 +vt 0.451716 0.007647 +vt 0.408159 0.029841 +vt 0.373591 0.064409 +vt 0.351397 0.107966 +vt 0.343750 0.156250 +vt 0.351397 0.204534 +vt 0.373591 0.248091 +vt 0.408159 0.282659 +vt 0.451716 0.304853 +vt 0.500000 0.312500 +vt 0.548284 0.304853 +vt 0.591841 0.282659 +vt 0.626409 0.248091 +vt 0.648603 0.204534 +vt 0.656250 0.156250 +vt 0.375000 0.312500 +vt 0.387500 0.312500 +vt 0.400000 0.312500 +vt 0.412500 0.312500 +vt 0.425000 0.312500 +vt 0.437500 0.312500 +vt 0.450000 0.312500 +vt 0.462500 0.312500 +vt 0.475000 0.312500 +vt 0.487500 0.312500 +vt 0.500000 0.312500 +vt 0.512500 0.312500 +vt 0.525000 0.312500 +vt 0.537500 0.312500 +vt 0.550000 0.312500 +vt 0.562500 0.312500 +vt 0.575000 0.312500 +vt 0.587500 0.312500 +vt 0.600000 0.312500 +vt 0.612500 0.312500 +vt 0.625000 0.312500 +vt 0.375000 0.688440 +vt 0.387500 0.688440 +vt 0.400000 0.688440 +vt 0.412500 0.688440 +vt 0.425000 0.688440 +vt 0.437500 0.688440 +vt 0.450000 0.688440 +vt 0.462500 0.688440 +vt 0.475000 0.688440 +vt 0.487500 0.688440 +vt 0.500000 0.688440 +vt 0.512500 0.688440 +vt 0.525000 0.688440 +vt 0.537500 0.688440 +vt 0.550000 0.688440 +vt 0.562500 0.688440 +vt 0.575000 0.688440 +vt 0.587500 0.688440 +vt 0.600000 0.688440 +vt 0.612500 0.688440 +vt 0.625000 0.688440 +vt 0.648603 0.795466 +vt 0.626409 0.751908 +vt 0.591842 0.717341 +vt 0.548284 0.695147 +vt 0.500000 0.687500 +vt 0.451716 0.695147 +vt 0.408159 0.717341 +vt 0.373591 0.751909 +vt 0.351397 0.795466 +vt 0.343750 0.843750 +vt 0.351397 0.892034 +vt 0.373591 0.935591 +vt 0.408159 0.970159 +vt 0.451716 0.992353 +vt 0.500000 1.000000 +vt 0.548284 0.992353 +vt 0.591841 0.970159 +vt 0.626409 0.935591 +vt 0.648603 0.892034 +vt 0.656250 0.843750 +vt 0.500000 0.150000 +vt 0.500000 0.837500 +vn 0.000000 0.991514 0.130001 +vn 0.000000 0.972836 -0.231494 +vn 0.000000 0.972836 -0.231494 +vn 0.000000 0.991514 0.130001 +vn 0.000000 0.754647 -0.656131 +vn 0.000000 0.754647 -0.656131 +vn 0.000000 0.470633 -0.882329 +vn 0.000000 0.470633 -0.882329 +vn 0.000000 0.094737 -0.995502 +vn 0.000000 0.094737 -0.995502 +vn 0.000000 0.181095 -0.983466 +vn 0.000000 0.181095 -0.983466 +vn -0.000000 -0.251410 -0.967881 +vn -0.000000 -0.251410 -0.967881 +vn 0.000000 -0.802094 0.597198 +vn 0.000000 -0.802094 0.597198 +vn 0.000000 -0.999071 0.043092 +vn 0.000000 -0.999071 0.043092 +vn -0.000000 -1.000000 -0.000000 +vn -0.000000 -1.000000 -0.000000 +vn -0.000000 -0.999071 -0.043092 +vn -0.000000 -0.999071 -0.043092 +vn -0.000000 -0.802094 -0.597198 +vn -0.000000 -0.802094 -0.597198 +vn 0.000000 -0.251410 0.967881 +vn 0.000000 -0.251410 0.967881 +vn 0.000000 0.181095 0.983466 +vn 0.000000 0.181095 0.983466 +vn 0.000000 0.094737 0.995502 +vn 0.000000 0.094737 0.995502 +vn 0.000000 0.470633 0.882329 +vn 0.000000 0.470633 0.882329 +vn 0.000000 0.754647 0.656131 +vn 0.000000 0.754647 0.656131 +vn 0.000000 0.972836 0.231494 +vn 0.000000 0.972836 0.231494 +vn 0.000000 0.991514 -0.129999 +vn 0.000000 0.991514 -0.129999 +vn 0.000000 1.000000 0.000001 +vn 0.000000 1.000000 0.000001 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +s 1 +g pCylinder2 +usemtl initialShadingGroup +f 43/105/83 44/106/84 64/127/85 63/126/86 +f 44/106/84 45/107/87 65/128/88 64/127/85 +f 45/107/87 46/108/89 66/129/90 65/128/88 +f 46/108/89 47/109/91 67/130/92 66/129/90 +f 47/109/91 48/110/93 68/131/94 67/130/92 +f 48/110/93 49/111/95 69/132/96 68/131/94 +f 49/111/95 50/112/97 70/133/98 69/132/96 +f 50/112/97 51/113/99 71/134/100 70/133/98 +f 51/113/99 52/114/101 72/135/102 71/134/100 +f 52/114/101 53/115/103 73/136/104 72/135/102 +f 53/115/103 54/116/105 74/137/106 73/136/104 +f 54/116/105 55/117/107 75/138/108 74/137/106 +f 55/117/107 56/118/109 76/139/110 75/138/108 +f 56/118/109 57/119/111 77/140/112 76/139/110 +f 57/119/111 58/120/113 78/141/114 77/140/112 +f 58/120/113 59/121/115 79/142/116 78/141/114 +f 59/121/115 60/122/117 80/143/118 79/142/116 +f 60/122/117 61/123/119 81/144/120 80/143/118 +f 61/123/119 62/124/121 82/145/122 81/144/120 +f 62/124/121 43/125/83 63/146/86 82/145/122 +s 2 +f 44/86/123 43/85/124 83/167/125 +f 45/87/126 44/86/123 83/167/125 +f 46/88/127 45/87/126 83/167/125 +f 47/89/128 46/88/127 83/167/125 +f 48/90/129 47/89/128 83/167/125 +f 49/91/130 48/90/129 83/167/125 +f 50/92/131 49/91/130 83/167/125 +f 51/93/132 50/92/131 83/167/125 +f 52/94/133 51/93/132 83/167/125 +f 53/95/134 52/94/133 83/167/125 +f 54/96/135 53/95/134 83/167/125 +f 55/97/136 54/96/135 83/167/125 +f 56/98/137 55/97/136 83/167/125 +f 57/99/138 56/98/137 83/167/125 +f 58/100/139 57/99/138 83/167/125 +f 59/101/140 58/100/139 83/167/125 +f 60/102/141 59/101/140 83/167/125 +f 61/103/142 60/102/141 83/167/125 +f 62/104/143 61/103/142 83/167/125 +f 43/85/124 62/104/143 83/167/125 +s 3 +f 63/165/144 64/164/145 84/168/146 +f 64/164/145 65/163/147 84/168/146 +f 65/163/147 66/162/148 84/168/146 +f 66/162/148 67/161/149 84/168/146 +f 67/161/149 68/160/150 84/168/146 +f 68/160/150 69/159/151 84/168/146 +f 69/159/151 70/158/152 84/168/146 +f 70/158/152 71/157/153 84/168/146 +f 71/157/153 72/156/154 84/168/146 +f 72/156/154 73/155/155 84/168/146 +f 73/155/155 74/154/156 84/168/146 +f 74/154/156 75/153/157 84/168/146 +f 75/153/157 76/152/158 84/168/146 +f 76/152/158 77/151/159 84/168/146 +f 77/151/159 78/150/160 84/168/146 +f 78/150/160 79/149/161 84/168/146 +f 79/149/161 80/148/162 84/168/146 +f 80/148/162 81/147/163 84/168/146 +f 81/147/163 82/166/164 84/168/146 +f 82/166/164 63/165/144 84/168/146 diff --git a/src/cube.obj b/src/cube.obj new file mode 100644 index 0000000..75c937a --- /dev/null +++ b/src/cube.obj @@ -0,0 +1,59 @@ +# This file uses centimeters as units for non-parametric coordinates. + +mtllib cube.mtl +g default +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +vt 0.375000 0.000000 +vt 0.625000 0.000000 +vt 0.375000 0.250000 +vt 0.625000 0.250000 +vt 0.375000 0.500000 +vt 0.625000 0.500000 +vt 0.375000 0.750000 +vt 0.625000 0.750000 +vt 0.375000 1.000000 +vt 0.625000 1.000000 +vt 0.875000 0.000000 +vt 0.875000 0.250000 +vt 0.125000 0.000000 +vt 0.125000 0.250000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +s off +g pCube1 +usemtl initialShadingGroup +f 1/1/1 2/2/2 4/4/3 3/3/4 +f 3/3/5 4/4/6 6/6/7 5/5/8 +f 5/5/9 6/6/10 8/8/11 7/7/12 +f 7/7/13 8/8/14 2/10/15 1/9/16 +f 2/2/17 8/11/18 6/12/19 4/4/20 +f 7/13/21 1/1/22 3/3/23 5/14/24 diff --git a/src/geometry/Cube.ts b/src/geometry/Cube.ts new file mode 100644 index 0000000..fa45161 --- /dev/null +++ b/src/geometry/Cube.ts @@ -0,0 +1,103 @@ +import {vec3, vec4} from 'gl-matrix'; +import Drawable from '../rendering/gl/Drawable'; +import {gl} from '../globals'; + +class Cube extends Drawable { + indices: Uint32Array; + positions: Float32Array; + normals: Float32Array; + center: vec4; + + constructor(center: vec3) { + super(); // Call the constructor of the super class. This is required. + this.center = vec4.fromValues(center[0], center[1], center[2], 1); + } + + create() { + + this.indices = new Uint32Array([0, 1, 2, + 0, 2, 3, + 4, 5, 6, + 4, 6, 7, + 8, 9, 10, + 8, 10, 11, + 12, 13, 14, + 12, 14, 15, + 16, 17, 18, + 16, 18, 19, + 20, 21, 22, + 20, 22, 23 + ]); + this.normals = new Float32Array([0, 0, 1, 0, + 0, 0, 1, 0, + 0, 0, 1, 0, + 0, 0, 1, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 1, 0, + 0, 0, 1, 0, + 0, 0, 1, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0, + 1, 0, 0, 0 + ]); + this.positions = new Float32Array([-1, -1, 1, 1, + 1, -1, 1, 1, + 1, 1, 1, 1, + -1, 1, 1, 1, + -1, 1, 1, 1, + 1, 1, 1, 1, + 1, 1, -1, 1, + -1, 1, -1, 1, + + -1, -1, -1, 1, + 1, -1, -1, 1, + 1, 1, -1, 1, + -1, 1, -1, 1, + -1, -1, 1, 1, + 1, -1, 1, 1, + 1, -1, -1, 1, + -1, -1, -1, 1, + + -1, -1, -1, 1, + -1, -1, 1, 1, + -1, 1, 1, 1, + -1, 1, -1, 1, + + 1, -1, -1, 1, + 1, -1, 1, 1, + 1, 1, 1, 1, + 1, 1, -1, 1 + ]); + + this.generateIdx(); + this.generatePos(); + this.generateNor(); + + this.count = this.indices.length; + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.bufIdx); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices, gl.STATIC_DRAW); + + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufNor); + gl.bufferData(gl.ARRAY_BUFFER, this.normals, gl.STATIC_DRAW); + + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufPos); + gl.bufferData(gl.ARRAY_BUFFER, this.positions, gl.STATIC_DRAW); + + console.log(`Created cube`); + } +}; + +export default Cube; diff --git a/src/geometry/Mesh.ts b/src/geometry/Mesh.ts index c5591ce..79f27ba 100644 --- a/src/geometry/Mesh.ts +++ b/src/geometry/Mesh.ts @@ -8,8 +8,13 @@ class Mesh extends Drawable { positions: Float32Array; normals: Float32Array; colors: Float32Array; + offsets: Float32Array; uvs: Float32Array; center: vec4; + T1: Float32Array; + T2: Float32Array; + T3: Float32Array; + T4: Float32Array; objString: string; @@ -43,10 +48,10 @@ class Mesh extends Drawable { idxTemp = loadedMesh.indices; // white vert color for now - this.colors = new Float32Array(posTemp.length); - for (var i = 0; i < posTemp.length; ++i){ - this.colors[i] = 1.0; - } + //this.colors = new Float32Array(posTemp.length); + //for (var i = 0; i < posTemp.length; ++i){ + // this.colors[i] = 1.0; + //} this.indices = new Uint32Array(idxTemp); this.normals = new Float32Array(norTemp); @@ -58,6 +63,11 @@ class Mesh extends Drawable { this.generateNor(); this.generateUV(); this.generateCol(); + this.generateTranslate(); + this.generateT1(); + this.generateT2(); + this.generateT3(); + this.generateT4(); this.count = this.indices.length; gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.bufIdx); @@ -69,8 +79,8 @@ class Mesh extends Drawable { gl.bindBuffer(gl.ARRAY_BUFFER, this.bufPos); gl.bufferData(gl.ARRAY_BUFFER, this.positions, gl.STATIC_DRAW); - gl.bindBuffer(gl.ARRAY_BUFFER, this.bufCol); - gl.bufferData(gl.ARRAY_BUFFER, this.colors, gl.STATIC_DRAW); + //gl.bindBuffer(gl.ARRAY_BUFFER, this.bufCol); + //gl.bufferData(gl.ARRAY_BUFFER, this.colors, gl.STATIC_DRAW); gl.bindBuffer(gl.ARRAY_BUFFER, this.bufUV); gl.bufferData(gl.ARRAY_BUFFER, this.uvs, gl.STATIC_DRAW); @@ -78,6 +88,25 @@ class Mesh extends Drawable { console.log(`Created Mesh from OBJ`); this.objString = ""; // hacky clear } + + setInstanceVBOs(T1: Float32Array, T2: Float32Array, T3: Float32Array, T4: Float32Array, colors: Float32Array) { + this.colors = colors; + this.T1 = T1; + this.T2 = T2; + this.T3 = T3; + this.T4 = T4; + + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufCol); + gl.bufferData(gl.ARRAY_BUFFER, this.colors, gl.STATIC_DRAW); + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT1); + gl.bufferData(gl.ARRAY_BUFFER, this.T1, gl.STATIC_DRAW); + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT2); + gl.bufferData(gl.ARRAY_BUFFER, this.T2, gl.STATIC_DRAW); + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT3); + gl.bufferData(gl.ARRAY_BUFFER, this.T3, gl.STATIC_DRAW); + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT4); + gl.bufferData(gl.ARRAY_BUFFER, this.T4, gl.STATIC_DRAW); + } }; export default Mesh; diff --git a/src/leaf.obj b/src/leaf.obj new file mode 100644 index 0000000..72c1106 --- /dev/null +++ b/src/leaf.obj @@ -0,0 +1,277 @@ +# This file uses centimeters as units for non-parametric coordinates. + +mtllib leaf.mtl +g default +v 0.119980 7.470734 -0.309017 +v 0.119980 6.526162 -0.642524 +v 0.119980 5.612993 -1.082292 +v 0.119980 5.698362 -2.039852 +v 0.119980 3.337849 -1.299343 +v 0.119980 2.068549 -0.951057 +v 0.119980 1.245116 -0.809017 +v 0.119980 0.591636 -0.587785 +v 0.119980 0.172076 -0.309017 +v 0.119980 0.027506 0.000000 +v 0.119980 0.172076 0.309017 +v 0.119980 0.591636 0.587785 +v 0.119980 1.245116 0.809017 +v 0.119980 2.068549 0.951057 +v 0.119980 3.337849 1.299343 +v 0.119980 5.698362 2.039852 +v 0.119980 5.612992 1.082291 +v 0.119980 6.526161 0.642524 +v 0.119980 7.470732 0.309017 +v 0.119980 7.734311 0.000000 +v -0.119980 7.470734 -0.309017 +v -0.119980 6.526162 -0.642524 +v -0.119980 5.612993 -1.082292 +v -0.119980 5.698362 -2.039852 +v -0.119980 3.337849 -1.299343 +v -0.119980 2.068549 -0.951057 +v -0.119980 1.245116 -0.809017 +v -0.119980 0.591636 -0.587785 +v -0.119980 0.172076 -0.309017 +v -0.119980 0.027506 0.000000 +v -0.119980 0.172076 0.309017 +v -0.119980 0.591636 0.587785 +v -0.119980 1.245116 0.809017 +v -0.119980 2.068549 0.951057 +v -0.119980 3.337849 1.299343 +v -0.119980 5.698362 2.039852 +v -0.119980 5.612992 1.082292 +v -0.119980 6.526161 0.642524 +v -0.119980 7.470732 0.309017 +v -0.119980 7.734311 0.000000 +v 0.119980 3.004597 0.000000 +v -0.119980 3.004597 0.000000 +vt 0.648603 0.107966 +vt 0.626409 0.064408 +vt 0.591842 0.029841 +vt 0.548284 0.007647 +vt 0.500000 -0.000000 +vt 0.451716 0.007647 +vt 0.408159 0.029841 +vt 0.373591 0.064409 +vt 0.351397 0.107966 +vt 0.343750 0.156250 +vt 0.351397 0.204534 +vt 0.373591 0.248091 +vt 0.408159 0.282659 +vt 0.451716 0.304853 +vt 0.500000 0.312500 +vt 0.548284 0.304853 +vt 0.591841 0.282659 +vt 0.626409 0.248091 +vt 0.648603 0.204534 +vt 0.656250 0.156250 +vt 0.375000 0.312500 +vt 0.387500 0.312500 +vt 0.400000 0.312500 +vt 0.412500 0.312500 +vt 0.425000 0.312500 +vt 0.437500 0.312500 +vt 0.450000 0.312500 +vt 0.462500 0.312500 +vt 0.475000 0.312500 +vt 0.487500 0.312500 +vt 0.500000 0.312500 +vt 0.512500 0.312500 +vt 0.525000 0.312500 +vt 0.537500 0.312500 +vt 0.550000 0.312500 +vt 0.562500 0.312500 +vt 0.575000 0.312500 +vt 0.587500 0.312500 +vt 0.600000 0.312500 +vt 0.612500 0.312500 +vt 0.625000 0.312500 +vt 0.375000 0.688440 +vt 0.387500 0.688440 +vt 0.400000 0.688440 +vt 0.412500 0.688440 +vt 0.425000 0.688440 +vt 0.437500 0.688440 +vt 0.450000 0.688440 +vt 0.462500 0.688440 +vt 0.475000 0.688440 +vt 0.487500 0.688440 +vt 0.500000 0.688440 +vt 0.512500 0.688440 +vt 0.525000 0.688440 +vt 0.537500 0.688440 +vt 0.550000 0.688440 +vt 0.562500 0.688440 +vt 0.575000 0.688440 +vt 0.587500 0.688440 +vt 0.600000 0.688440 +vt 0.612500 0.688440 +vt 0.625000 0.688440 +vt 0.648603 0.795466 +vt 0.626409 0.751908 +vt 0.591842 0.717341 +vt 0.548284 0.695147 +vt 0.500000 0.687500 +vt 0.451716 0.695147 +vt 0.408159 0.717341 +vt 0.373591 0.751909 +vt 0.351397 0.795466 +vt 0.343750 0.843750 +vt 0.351397 0.892034 +vt 0.373591 0.935591 +vt 0.408159 0.970159 +vt 0.451716 0.992353 +vt 0.500000 1.000000 +vt 0.548284 0.992353 +vt 0.591841 0.970159 +vt 0.626409 0.935591 +vt 0.648603 0.892034 +vt 0.656250 0.843750 +vt 0.500000 0.150000 +vt 0.500000 0.837500 +vn 0.000000 0.469552 -0.882905 +vn 0.000000 0.384283 -0.923215 +vn 0.000000 0.384283 -0.923215 +vn 0.000000 0.469552 -0.882905 +vn -0.000000 0.860358 -0.509690 +vn -0.000000 0.860358 -0.509690 +vn 0.000000 0.094970 -0.995480 +vn 0.000000 0.094970 -0.995480 +vn 0.000000 -0.287312 -0.957837 +vn 0.000000 -0.287312 -0.957837 +vn -0.000000 -0.228121 -0.973633 +vn -0.000000 -0.228121 -0.973633 +vn -0.000000 -0.238848 -0.971057 +vn -0.000000 -0.238848 -0.971057 +vn -0.000000 -0.422364 -0.906426 +vn -0.000000 -0.422364 -0.906426 +vn -0.000000 -0.721475 -0.692440 +vn -0.000000 -0.721475 -0.692440 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 -0.721475 0.692440 +vn 0.000000 -0.721475 0.692440 +vn 0.000000 -0.422364 0.906426 +vn 0.000000 -0.422364 0.906426 +vn 0.000000 -0.238848 0.971057 +vn 0.000000 -0.238848 0.971057 +vn 0.000000 -0.228121 0.973633 +vn 0.000000 -0.228121 0.973633 +vn 0.000000 -0.287312 0.957837 +vn 0.000000 -0.287312 0.957837 +vn 0.000001 0.094970 0.995480 +vn 0.000001 0.094970 0.995480 +vn 0.000001 0.860358 0.509690 +vn 0.000001 0.860358 0.509690 +vn 0.000000 0.384283 0.923215 +vn 0.000000 0.384283 0.923215 +vn 0.000000 0.469551 0.882905 +vn 0.000000 0.469551 0.882905 +vn 0.000000 1.000000 0.000003 +vn 0.000000 1.000000 0.000003 +vn 1.000000 -0.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 -0.000000 +vn 1.000000 0.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 -0.000000 0.000000 +vn 1.000000 -0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 -0.000000 -0.000000 +vn -1.000000 0.000000 -0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 -0.000000 0.000000 +vn -1.000000 -0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +s 1 +g pCylinder1 +usemtl initialShadingGroup +f 1/21/1 2/22/2 22/43/3 21/42/4 +f 2/22/2 3/23/5 23/44/6 22/43/3 +f 3/23/5 4/24/7 24/45/8 23/44/6 +f 4/24/7 5/25/9 25/46/10 24/45/8 +f 5/25/9 6/26/11 26/47/12 25/46/10 +f 6/26/11 7/27/13 27/48/14 26/47/12 +f 7/27/13 8/28/15 28/49/16 27/48/14 +f 8/28/15 9/29/17 29/50/18 28/49/16 +f 9/29/17 10/30/19 30/51/20 29/50/18 +f 10/30/19 11/31/21 31/52/22 30/51/20 +f 11/31/21 12/32/23 32/53/24 31/52/22 +f 12/32/23 13/33/25 33/54/26 32/53/24 +f 13/33/25 14/34/27 34/55/28 33/54/26 +f 14/34/27 15/35/29 35/56/30 34/55/28 +f 15/35/29 16/36/31 36/57/32 35/56/30 +f 16/36/31 17/37/33 37/58/34 36/57/32 +f 17/37/33 18/38/35 38/59/36 37/58/34 +f 18/38/35 19/39/37 39/60/38 38/59/36 +f 19/39/37 20/40/39 40/61/40 39/60/38 +f 20/40/39 1/41/1 21/62/4 40/61/40 +s 2 +f 2/2/41 1/1/42 41/83/43 +f 3/3/44 2/2/41 41/83/43 +f 4/4/45 3/3/44 41/83/43 +f 5/5/46 4/4/45 41/83/43 +f 6/6/47 5/5/46 41/83/43 +f 7/7/48 6/6/47 41/83/43 +f 8/8/49 7/7/48 41/83/43 +f 9/9/50 8/8/49 41/83/43 +f 10/10/51 9/9/50 41/83/43 +f 11/11/52 10/10/51 41/83/43 +f 12/12/53 11/11/52 41/83/43 +f 13/13/54 12/12/53 41/83/43 +f 14/14/55 13/13/54 41/83/43 +f 15/15/56 14/14/55 41/83/43 +f 16/16/57 15/15/56 41/83/43 +f 17/17/58 16/16/57 41/83/43 +f 18/18/59 17/17/58 41/83/43 +f 19/19/60 18/18/59 41/83/43 +f 20/20/61 19/19/60 41/83/43 +f 1/1/42 20/20/61 41/83/43 +s 3 +f 21/81/62 22/80/63 42/84/64 +f 22/80/63 23/79/65 42/84/64 +f 23/79/65 24/78/66 42/84/64 +f 24/78/66 25/77/67 42/84/64 +f 25/77/67 26/76/68 42/84/64 +f 26/76/68 27/75/69 42/84/64 +f 27/75/69 28/74/70 42/84/64 +f 28/74/70 29/73/71 42/84/64 +f 29/73/71 30/72/72 42/84/64 +f 30/72/72 31/71/73 42/84/64 +f 31/71/73 32/70/74 42/84/64 +f 32/70/74 33/69/75 42/84/64 +f 33/69/75 34/68/76 42/84/64 +f 34/68/76 35/67/77 42/84/64 +f 35/67/77 36/66/78 42/84/64 +f 36/66/78 37/65/79 42/84/64 +f 37/65/79 38/64/80 42/84/64 +f 38/64/80 39/63/81 42/84/64 +f 39/63/81 40/82/82 42/84/64 +f 40/82/82 21/81/62 42/84/64 diff --git a/src/main.ts b/src/main.ts index 932c78f..18e13e9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,5 @@ -import {vec3} from 'gl-matrix'; +import {vec3, vec4} from 'gl-matrix'; +import {mat4} from 'gl-matrix'; import * as Stats from 'stats-js'; import * as DAT from 'dat-gui'; import Square from './geometry/Square'; @@ -7,19 +8,72 @@ import OpenGLRenderer from './rendering/gl/OpenGLRenderer'; import Camera from './Camera'; import {setGL} from './globals'; import ShaderProgram, {Shader} from './rendering/gl/ShaderProgram'; - +import Mesh from './geometry/Mesh'; +import LSystem from './LSystem'; // Define an object with application parameters and button callbacks // This will be referred to by dat.GUI's functions that add GUI elements. const controls = { + iteration: 8, + 'Reload': reload, // A function pointer, essentially + leafScale: 0.5, +}; +var palette = { + leaf: [255, 94, 0], // RGB array }; +let r: number = 255; +let g: number = 94; +let leafScale = 0.5; +let b: number = 0; +let prevIteratoin: number = 8; let square: Square; +let branch: Mesh; +let turn: Mesh; +let leaf: Mesh; +let bat: Mesh; let screenQuad: ScreenQuad; let time: number = 0.0; +let ls: LSystem = new LSystem("X", controls.iteration, vec3.fromValues(r / 255, g / 255, b / 255), leafScale); + +function reload() { + ls = new LSystem("X", controls.iteration, vec3.fromValues(r / 255, g / 255, b / 255), leafScale); +} + +function readOBJ(file: string): string { + var text = ""; + var rf = new XMLHttpRequest(); + rf.open("GET", file, false); + rf.onreadystatechange = function () { + if (rf.readyState === 4) { + if (rf.status === 200 || rf.status == 0) { + var allText = rf.responseText; + text = allText; + } + } + } + rf.send(null); + return text; +} function loadScene() { - square = new Square(); - square.create(); + + var objstr1 = readOBJ('https://raw.githubusercontent.com/effieyanfei/hw04-l-systems/master/src/cube.obj'); + var objstr2 = readOBJ('https://raw.githubusercontent.com/effieyanfei/hw04-l-systems/master/src/sphere.obj'); + var objstr3 = readOBJ('https://raw.githubusercontent.com/effieyanfei/hw04-l-systems/master/src/bat.obj'); + var objstr4 = readOBJ('https://raw.githubusercontent.com/effieyanfei/hw04-l-systems/master/src/leaf.obj'); + + branch = new Mesh(objstr1, vec3.fromValues(0.0, 0.0, 0.0)); + branch.create(); + + turn = new Mesh(objstr2, vec3.fromValues(0.0, 0.0, 0.0)); + turn.create(); + + leaf = new Mesh(objstr4, vec3.fromValues(0.0, 0.0, 0.0)); + leaf.create(); + + bat = new Mesh(objstr3, vec3.fromValues(0.0, 0.0, 0.0)); + bat.create(); + screenQuad = new ScreenQuad(); screenQuad.create(); @@ -28,6 +82,39 @@ function loadScene() { // offsets and gradiated colors for a 100x100 grid // of squares, even though the VBO data for just // one square is actually passed to the GPU + branch.setInstanceVBOs(ls.getTFloat32Array(ls.Btransformations, 1), + ls.getTFloat32Array(ls.Btransformations, 2), + ls.getTFloat32Array(ls.Btransformations, 3), + ls.getTFloat32Array(ls.Btransformations, 4), + ls.getCFloat32Array(ls.Bcolors)); + branch.setNumInstances(ls.Btransformations.length); // grid of "particles" + + turn.setInstanceVBOs(ls.getTFloat32Array(ls.Ttransformations, 1), + ls.getTFloat32Array(ls.Ttransformations, 2), + ls.getTFloat32Array(ls.Ttransformations, 3), + ls.getTFloat32Array(ls.Ttransformations, 4), + ls.getCFloat32Array(ls.Tcolors)); + turn.setNumInstances(ls.Ttransformations.length); + + leaf.setInstanceVBOs(ls.getTFloat32Array(ls.Ltransformations, 1), + ls.getTFloat32Array(ls.Ltransformations, 2), + ls.getTFloat32Array(ls.Ltransformations, 3), + ls.getTFloat32Array(ls.Ltransformations, 4), + ls.getCFloat32Array(ls.Lcolors)); + leaf.setNumInstances(ls.Ltransformations.length); + + bat.setInstanceVBOs(ls.getTFloat32Array(ls.Htransformations, 1), + ls.getTFloat32Array(ls.Htransformations, 2), + ls.getTFloat32Array(ls.Htransformations, 3), + ls.getTFloat32Array(ls.Htransformations, 4), + ls.getCFloat32Array(ls.Hcolors)); + bat.setNumInstances(ls.Htransformations.length); + +} + +function loadSquare() { + square = new Square(); + square.create(); let offsetsArray = []; let colorsArray = []; let n: number = 100.0; @@ -49,6 +136,8 @@ function loadScene() { square.setNumInstances(n * n); // grid of "particles" } + + function main() { // Initial display for framerate const stats = Stats(); @@ -60,6 +149,9 @@ function main() { // Add controls to the gui const gui = new DAT.GUI(); + gui.add(controls, 'iteration', 8, 12).step(1); + gui.add(controls, 'leafScale', 0.1, 1.0).step(0.1); + var colorController = gui.addColor(palette, 'leaf'); // get canvas and webgl context const canvas = document.getElementById('canvas'); @@ -73,13 +165,14 @@ function main() { // Initial call to load scene loadScene(); + loadSquare(); const camera = new Camera(vec3.fromValues(50, 50, 10), vec3.fromValues(50, 50, 0)); const renderer = new OpenGLRenderer(canvas); renderer.setClearColor(0.2, 0.2, 0.2, 1); - gl.enable(gl.BLEND); - gl.blendFunc(gl.ONE, gl.ONE); // Additive blending + // gl.enable(gl.BLEND); + // gl.blendFunc(gl.ONE, gl.ONE); // Additive blending const instancedShader = new ShaderProgram([ new Shader(gl.VERTEX_SHADER, require('./shaders/instanced-vert.glsl')), @@ -93,6 +186,29 @@ function main() { // This function will be called every frame function tick() { + var newColor = colorController.getValue(); + if(newColor[0] != r || newColor[1] != g || newColor[2] != b) { + r = newColor[0]; + g = newColor[1]; + b = newColor[2]; + ls = new LSystem("X", prevIteratoin, vec3.fromValues(r / 255, g / 255, b / 255), leafScale); + loadScene(); + } + + if(controls.iteration != prevIteratoin) + { + prevIteratoin = controls.iteration; + ls = new LSystem("X", prevIteratoin, vec3.fromValues(r / 255, g / 255, b / 255), leafScale); + loadScene(); + } + + if(controls.leafScale != leafScale) + { + leafScale = controls.leafScale; + ls = new LSystem("X", prevIteratoin, vec3.fromValues(r / 255, g / 255, b / 255), leafScale); + loadScene(); + } + camera.update(); stats.begin(); instancedShader.setTime(time); @@ -102,6 +218,10 @@ function main() { renderer.render(camera, flat, [screenQuad]); renderer.render(camera, instancedShader, [ square, + branch, + turn, + leaf, + bat, ]); stats.end(); @@ -125,4 +245,4 @@ function main() { tick(); } -main(); +main(); \ No newline at end of file diff --git a/src/rendering/gl/Drawable.ts b/src/rendering/gl/Drawable.ts index d5420f6..a79f6ce 100644 --- a/src/rendering/gl/Drawable.ts +++ b/src/rendering/gl/Drawable.ts @@ -9,6 +9,10 @@ abstract class Drawable { bufTranslate: WebGLBuffer; bufCol: WebGLBuffer; bufUV: WebGLBuffer; + bufT1: WebGLBuffer; + bufT2: WebGLBuffer; + bufT3: WebGLBuffer; + bufT4: WebGLBuffer; idxGenerated: boolean = false; posGenerated: boolean = false; @@ -16,7 +20,10 @@ abstract class Drawable { colGenerated: boolean = false; translateGenerated: boolean = false; uvGenerated: boolean = false; - + T1Generated: boolean = false; + T2Generated: boolean = false; + T3Generated: boolean = false; + T4Generated: boolean = false; numInstances: number = 0; // How many instances of this Drawable the shader program should draw abstract create() : void; @@ -28,6 +35,10 @@ abstract class Drawable { gl.deleteBuffer(this.bufCol); gl.deleteBuffer(this.bufTranslate); gl.deleteBuffer(this.bufUV); + gl.deleteBuffer(this.bufT1); + gl.deleteBuffer(this.bufT2); + gl.deleteBuffer(this.bufT3); + gl.deleteBuffer(this.bufT4); } generateIdx() { @@ -55,6 +66,26 @@ abstract class Drawable { this.bufTranslate = gl.createBuffer(); } + generateT1() { + this.T1Generated = true; + this.bufT1 = gl.createBuffer(); + } + + generateT2() { + this.T2Generated = true; + this.bufT2 = gl.createBuffer(); + } + + generateT3() { + this.T3Generated = true; + this.bufT3 = gl.createBuffer(); + } + + generateT4() { + this.T4Generated = true; + this.bufT4 = gl.createBuffer(); + } + generateUV() { this.uvGenerated = true; this.bufUV = gl.createBuffer(); @@ -102,6 +133,34 @@ abstract class Drawable { return this.uvGenerated; } + bindT1(): boolean{ + if(this.T1Generated) { + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT1); + } + return this.T1Generated; + } + + bindT2(): boolean{ + if(this.T2Generated) { + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT2); + } + return this.T2Generated; + } + + bindT3(): boolean{ + if(this.T3Generated) { + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT3); + } + return this.T3Generated; + } + + bindT4(): boolean{ + if(this.T4Generated) { + gl.bindBuffer(gl.ARRAY_BUFFER, this.bufT4); + } + return this.T4Generated; + } + elemCount(): number { return this.count; } diff --git a/src/rendering/gl/ShaderProgram.ts b/src/rendering/gl/ShaderProgram.ts index fa9f450..80399d3 100644 --- a/src/rendering/gl/ShaderProgram.ts +++ b/src/rendering/gl/ShaderProgram.ts @@ -26,6 +26,10 @@ class ShaderProgram { attrCol: number; // This time, it's an instanced rendering attribute, so each particle can have a unique color. Not per-vertex, but per-instance. attrTranslate: number; // Used in the vertex shader during instanced rendering to offset the vertex positions to the particle's drawn position. attrUV: number; + attrT1: number; + attrT2: number; + attrT3: number; + attrT4: number; unifModel: WebGLUniformLocation; unifModelInvTr: WebGLUniformLocation; @@ -50,6 +54,11 @@ class ShaderProgram { this.attrPos = gl.getAttribLocation(this.prog, "vs_Pos"); this.attrCol = gl.getAttribLocation(this.prog, "vs_Col"); + this.attrNor = gl.getAttribLocation(this.prog, "vs_Nor"); + this.attrT1 = gl.getAttribLocation(this.prog, "vs_T1"); + this.attrT2 = gl.getAttribLocation(this.prog, "vs_T2"); + this.attrT3 = gl.getAttribLocation(this.prog, "vs_T3"); + this.attrT4 = gl.getAttribLocation(this.prog, "vs_T4"); this.attrTranslate = gl.getAttribLocation(this.prog, "vs_Translate"); this.attrUV = gl.getAttribLocation(this.prog, "vs_UV"); this.unifModel = gl.getUniformLocation(this.prog, "u_Model"); @@ -151,6 +160,30 @@ class ShaderProgram { gl.vertexAttribDivisor(this.attrTranslate, 1); // Advance 1 index in translate VBO for each drawn instance } + if (this.attrT1 != -1 && d.bindT1()) { + gl.enableVertexAttribArray(this.attrT1); + gl.vertexAttribPointer(this.attrT1, 4, gl.FLOAT, false, 0, 0); + gl.vertexAttribDivisor(this.attrT1, 1); // Advance 1 index in nor VBO for each vertex + } + + if (this.attrT2 != -1 && d.bindT2()) { + gl.enableVertexAttribArray(this.attrT2); + gl.vertexAttribPointer(this.attrT2, 4, gl.FLOAT, false, 0, 0); + gl.vertexAttribDivisor(this.attrT2, 1); // Advance 1 index in nor VBO for each vertex + } + + if (this.attrT3 != -1 && d.bindT3()) { + gl.enableVertexAttribArray(this.attrT3); + gl.vertexAttribPointer(this.attrT3, 4, gl.FLOAT, false, 0, 0); + gl.vertexAttribDivisor(this.attrT3, 1); // Advance 1 index in nor VBO for each vertex + } + + if (this.attrT4 != -1 && d.bindT4()) { + gl.enableVertexAttribArray(this.attrT4); + gl.vertexAttribPointer(this.attrT4, 4, gl.FLOAT, false, 0, 0); + gl.vertexAttribDivisor(this.attrT4, 1); // Advance 1 index in nor VBO for each vertex + } + if (this.attrUV != -1 && d.bindUV()) { gl.enableVertexAttribArray(this.attrUV); gl.vertexAttribPointer(this.attrUV, 2, gl.FLOAT, false, 0, 0); @@ -178,6 +211,10 @@ class ShaderProgram { if (this.attrCol != -1) gl.disableVertexAttribArray(this.attrCol); if (this.attrTranslate != -1) gl.disableVertexAttribArray(this.attrTranslate); if (this.attrUV != -1) gl.disableVertexAttribArray(this.attrUV); + if (this.attrT1 != -1) gl.disableVertexAttribArray(this.attrT1); + if (this.attrT2 != -1) gl.disableVertexAttribArray(this.attrT2); + if (this.attrT3 != -1) gl.disableVertexAttribArray(this.attrT3); + if (this.attrT4 != -1) gl.disableVertexAttribArray(this.attrT4); } }; diff --git a/src/shaders/flat-frag.glsl b/src/shaders/flat-frag.glsl index 99362d2..0e8bb25 100644 --- a/src/shaders/flat-frag.glsl +++ b/src/shaders/flat-frag.glsl @@ -8,6 +8,65 @@ uniform float u_Time; in vec2 fs_Pos; out vec4 out_Col; +float rand3D(vec3 p) { + return fract(sin(dot(p, vec3(dot(p,vec3(127.1, 311.7, 456.9)), + dot(p,vec3(269.5, 183.3, 236.6)), + dot(p, vec3(420.6, 631.2, 235.1)) + ))) * 438648.5453); +} + +float interpNoise3D(float x, float y, float z) { + int intX = int(floor(x)); + float fractX = fract(x); + int intY = int(floor(y)); + float fractY = fract(y); + int intZ = int(floor(z)); + float fractZ = fract(z); + + float v1 = rand3D(vec3(intX, intY, intZ)); + float v2 = rand3D(vec3(intX + 1, intY, intZ)); + float v3 = rand3D(vec3(intX, intY + 1, intZ)); + float v4 = rand3D(vec3(intX + 1, intY + 1, intZ)); + + float v5 = rand3D(vec3(intX, intY, intZ + 1)); + float v6 = rand3D(vec3(intX + 1, intY, intZ + 1)); + float v7 = rand3D(vec3(intX, intY + 1, intZ + 1)); + float v8 = rand3D(vec3(intX + 1, intY + 1, intZ + 1)); + + float i1 = mix(v1, v2, fractX); + float i2 = mix(v3, v4, fractX); + + float i3 = mix(v5, v6, fractX); + float i4 = mix(v7, v8, fractX); + + float i5 = mix(i1, i2, fractY); + float i6 = mix(i3, i4, fractY); + + float i7 = mix(i5, i6, fractZ); + + return i7; +} + +float fbm(float x, float y, float z) { + float total = 0.0; + float persistence = 0.5; + int octaves = 8; + + for(int i = 1; i <= octaves; i++) { + float freq = pow(2.0, float(i)); + float amp = pow(persistence, float(i)); + + total += interpNoise3D(x * freq, + y * freq, + z * freq) * amp; + } + return total; +} + + void main() { - out_Col = vec4(0.5 * (fs_Pos + vec2(1.0)), 0.0, 1.0); + float n = 1.0 - fbm(fs_Pos.x + 0.1 * sin(0.005 * float(u_Time)), fs_Pos.y + 0.1 * sin(0.005 * float(u_Time)), sin(0.005 * float(u_Time)) * fs_Pos.x); + //n = fbm(n,n,n); + //out_Col = vec4(0.5 * (fs_Pos + vec2(1.0)), 0.0, 1.0); + out_Col = vec4(n, n, n, 1.0); } diff --git a/src/shaders/flat-vert.glsl b/src/shaders/flat-vert.glsl index 7d913da..38371d4 100644 --- a/src/shaders/flat-vert.glsl +++ b/src/shaders/flat-vert.glsl @@ -2,7 +2,6 @@ precision highp float; // The vertex shader used to render the background of the scene - in vec4 vs_Pos; out vec2 fs_Pos; diff --git a/src/shaders/instanced-frag.glsl b/src/shaders/instanced-frag.glsl index 72e7460..39620fc 100644 --- a/src/shaders/instanced-frag.glsl +++ b/src/shaders/instanced-frag.glsl @@ -9,5 +9,5 @@ out vec4 out_Col; void main() { float dist = 1.0 - (length(fs_Pos.xyz) * 2.0); - out_Col = vec4(dist) * fs_Col; + out_Col = fs_Col; } diff --git a/src/shaders/instanced-vert.glsl b/src/shaders/instanced-vert.glsl index d8b8996..c0f4557 100644 --- a/src/shaders/instanced-vert.glsl +++ b/src/shaders/instanced-vert.glsl @@ -11,6 +11,10 @@ in vec4 vs_Nor; // Non-instanced, and presently unused in vec4 vs_Col; // An instanced rendering attribute; each particle instance has a different color in vec3 vs_Translate; // Another instance rendering attribute used to position each quad instance in the scene in vec2 vs_UV; // Non-instanced, and presently unused in main(). Feel free to use it for your meshes. +in vec4 vs_T1; +in vec4 vs_T2; +in vec4 vs_T3; +in vec4 vs_T4; out vec4 fs_Col; out vec4 fs_Pos; @@ -20,10 +24,12 @@ void main() fs_Col = vs_Col; fs_Pos = vs_Pos; - vec3 offset = vs_Translate; - offset.z = (sin((u_Time + offset.x) * 3.14159 * 0.1) + cos((u_Time + offset.y) * 3.14159 * 0.1)) * 1.5; + //vec3 offset = vs_Translate; + mat4 t = mat4(vs_T1, vs_T2, vs_T3, vs_T4); + //t = transpose(t); - vec3 billboardPos = offset + vs_Pos.x * u_CameraAxes[0] + vs_Pos.y * u_CameraAxes[1]; + vec4 newPos = t * vs_Pos; + //offset.z = (sin((u_Time + offset.x) * 3.14159 * 0.1) + cos((u_Time + offset.y) * 3.14159 * 0.1)) * 1.5; - gl_Position = u_ViewProj * vec4(billboardPos, 1.0); + gl_Position = u_ViewProj * newPos; } diff --git a/src/sphere.obj b/src/sphere.obj new file mode 100644 index 0000000..e298afc --- /dev/null +++ b/src/sphere.obj @@ -0,0 +1,1610 @@ +# This file uses centimeters as units for non-parametric coordinates. + +mtllib sphere.mtl +g default +v 0.103867 -0.689541 -0.033749 +v 0.088355 -0.689541 -0.064194 +v 0.064194 -0.689541 -0.088355 +v 0.033749 -0.689541 -0.103867 +v 0.000000 -0.689541 -0.109213 +v -0.033749 -0.689541 -0.103867 +v -0.064194 -0.689541 -0.088355 +v -0.088355 -0.689541 -0.064194 +v -0.103867 -0.689541 -0.033749 +v -0.109213 -0.689541 0.000000 +v -0.103867 -0.689541 0.033749 +v -0.088355 -0.689541 0.064194 +v -0.064194 -0.689541 0.088355 +v -0.033749 -0.689541 0.103867 +v -0.000000 -0.689541 0.109213 +v 0.033749 -0.689541 0.103867 +v 0.064194 -0.689541 0.088355 +v 0.088355 -0.689541 0.064194 +v 0.103867 -0.689541 0.033749 +v 0.109213 -0.689541 0.000000 +v 0.205177 -0.663967 -0.066666 +v 0.174534 -0.663967 -0.126806 +v 0.126806 -0.663967 -0.174534 +v 0.066666 -0.663967 -0.205177 +v 0.000000 -0.663967 -0.215736 +v -0.066666 -0.663967 -0.205177 +v -0.126806 -0.663967 -0.174534 +v -0.174534 -0.663967 -0.126806 +v -0.205177 -0.663967 -0.066666 +v -0.215736 -0.663967 0.000000 +v -0.205177 -0.663967 0.066666 +v -0.174534 -0.663967 0.126806 +v -0.126806 -0.663967 0.174534 +v -0.066666 -0.663967 0.205177 +v -0.000000 -0.663967 0.215736 +v 0.066666 -0.663967 0.205177 +v 0.126806 -0.663967 0.174534 +v 0.174534 -0.663967 0.126806 +v 0.205177 -0.663967 0.066666 +v 0.215736 -0.663967 0.000000 +v 0.301435 -0.622044 -0.097942 +v 0.256416 -0.622044 -0.186297 +v 0.186297 -0.622044 -0.256416 +v 0.097942 -0.622044 -0.301435 +v 0.000000 -0.622044 -0.316947 +v -0.097942 -0.622044 -0.301435 +v -0.186297 -0.622044 -0.256416 +v -0.256416 -0.622044 -0.186297 +v -0.301435 -0.622044 -0.097942 +v -0.316947 -0.622044 0.000000 +v -0.301435 -0.622044 0.097942 +v -0.256416 -0.622044 0.186297 +v -0.186297 -0.622044 0.256416 +v -0.097942 -0.622044 0.301435 +v -0.000000 -0.622044 0.316947 +v 0.097942 -0.622044 0.301435 +v 0.186297 -0.622044 0.256416 +v 0.256416 -0.622044 0.186297 +v 0.301435 -0.622044 0.097942 +v 0.316947 -0.622044 0.000000 +v 0.390270 -0.564804 -0.126806 +v 0.331984 -0.564804 -0.241200 +v 0.241200 -0.564804 -0.331984 +v 0.126806 -0.564804 -0.390270 +v 0.000000 -0.564804 -0.410354 +v -0.126806 -0.564804 -0.390270 +v -0.241200 -0.564804 -0.331984 +v -0.331984 -0.564804 -0.241200 +v -0.390270 -0.564804 -0.126806 +v -0.410354 -0.564804 0.000000 +v -0.390270 -0.564804 0.126806 +v -0.331984 -0.564804 0.241200 +v -0.241200 -0.564804 0.331984 +v -0.126806 -0.564804 0.390270 +v -0.000000 -0.564804 0.410354 +v 0.126806 -0.564804 0.390270 +v 0.241200 -0.564804 0.331984 +v 0.331984 -0.564804 0.241200 +v 0.390270 -0.564804 0.126806 +v 0.410354 -0.564804 0.000000 +v 0.469496 -0.493657 -0.152548 +v 0.399377 -0.493657 -0.290164 +v 0.290164 -0.493657 -0.399377 +v 0.152548 -0.493657 -0.469496 +v 0.000000 -0.493657 -0.493657 +v -0.152548 -0.493657 -0.469496 +v -0.290164 -0.493657 -0.399377 +v -0.399377 -0.493657 -0.290164 +v -0.469496 -0.493657 -0.152548 +v -0.493657 -0.493657 0.000000 +v -0.469496 -0.493657 0.152548 +v -0.399377 -0.493657 0.290164 +v -0.290164 -0.493657 0.399377 +v -0.152548 -0.493657 0.469496 +v -0.000000 -0.493657 0.493657 +v 0.152548 -0.493657 0.469496 +v 0.290164 -0.493657 0.399377 +v 0.399377 -0.493657 0.290164 +v 0.469496 -0.493657 0.152548 +v 0.493657 -0.493657 0.000000 +v 0.537161 -0.410354 -0.174534 +v 0.456936 -0.410354 -0.331984 +v 0.331984 -0.410354 -0.456936 +v 0.174534 -0.410354 -0.537161 +v 0.000000 -0.410354 -0.564804 +v -0.174534 -0.410354 -0.537161 +v -0.331984 -0.410354 -0.456936 +v -0.456936 -0.410354 -0.331984 +v -0.537161 -0.410354 -0.174534 +v -0.564804 -0.410354 0.000000 +v -0.537161 -0.410354 0.174534 +v -0.456936 -0.410354 0.331984 +v -0.331984 -0.410354 0.456936 +v -0.174534 -0.410354 0.537161 +v -0.000000 -0.410354 0.564804 +v 0.174534 -0.410354 0.537161 +v 0.331984 -0.410354 0.456936 +v 0.456936 -0.410354 0.331984 +v 0.537161 -0.410354 0.174534 +v 0.564804 -0.410354 0.000000 +v 0.591599 -0.316947 -0.192222 +v 0.503244 -0.316947 -0.365628 +v 0.365628 -0.316947 -0.503244 +v 0.192222 -0.316947 -0.591599 +v 0.000000 -0.316947 -0.622044 +v -0.192222 -0.316947 -0.591599 +v -0.365628 -0.316947 -0.503244 +v -0.503244 -0.316947 -0.365628 +v -0.591599 -0.316947 -0.192222 +v -0.622044 -0.316947 0.000000 +v -0.591599 -0.316947 0.192222 +v -0.503244 -0.316947 0.365628 +v -0.365628 -0.316947 0.503244 +v -0.192222 -0.316947 0.591599 +v -0.000000 -0.316947 0.622044 +v 0.192222 -0.316947 0.591599 +v 0.365628 -0.316947 0.503244 +v 0.503244 -0.316947 0.365628 +v 0.591599 -0.316947 0.192222 +v 0.622044 -0.316947 0.000000 +v 0.631471 -0.215736 -0.205177 +v 0.537161 -0.215736 -0.390270 +v 0.390270 -0.215736 -0.537161 +v 0.205177 -0.215736 -0.631471 +v 0.000000 -0.215736 -0.663967 +v -0.205177 -0.215736 -0.631470 +v -0.390270 -0.215736 -0.537161 +v -0.537161 -0.215736 -0.390270 +v -0.631470 -0.215736 -0.205177 +v -0.663967 -0.215736 0.000000 +v -0.631470 -0.215736 0.205177 +v -0.537161 -0.215736 0.390270 +v -0.390270 -0.215736 0.537161 +v -0.205177 -0.215736 0.631470 +v -0.000000 -0.215736 0.663967 +v 0.205177 -0.215736 0.631470 +v 0.390270 -0.215736 0.537161 +v 0.537161 -0.215736 0.390270 +v 0.631470 -0.215736 0.205177 +v 0.663967 -0.215736 0.000000 +v 0.655793 -0.109213 -0.213080 +v 0.557851 -0.109213 -0.405302 +v 0.405302 -0.109213 -0.557851 +v 0.213080 -0.109213 -0.655793 +v 0.000000 -0.109213 -0.689541 +v -0.213080 -0.109213 -0.655793 +v -0.405302 -0.109213 -0.557851 +v -0.557851 -0.109213 -0.405302 +v -0.655793 -0.109213 -0.213080 +v -0.689541 -0.109213 0.000000 +v -0.655793 -0.109213 0.213080 +v -0.557851 -0.109213 0.405302 +v -0.405302 -0.109213 0.557850 +v -0.213080 -0.109213 0.655793 +v -0.000000 -0.109213 0.689541 +v 0.213080 -0.109213 0.655793 +v 0.405302 -0.109213 0.557850 +v 0.557850 -0.109213 0.405302 +v 0.655793 -0.109213 0.213080 +v 0.689541 -0.109213 0.000000 +v 0.663967 0.000000 -0.215736 +v 0.564804 0.000000 -0.410354 +v 0.410354 0.000000 -0.564804 +v 0.215736 0.000000 -0.663967 +v 0.000000 0.000000 -0.698137 +v -0.215736 0.000000 -0.663967 +v -0.410354 0.000000 -0.564804 +v -0.564804 0.000000 -0.410354 +v -0.663967 0.000000 -0.215736 +v -0.698136 0.000000 0.000000 +v -0.663967 0.000000 0.215736 +v -0.564804 0.000000 0.410354 +v -0.410354 0.000000 0.564804 +v -0.215736 0.000000 0.663967 +v -0.000000 0.000000 0.698136 +v 0.215736 0.000000 0.663967 +v 0.410354 0.000000 0.564804 +v 0.564804 0.000000 0.410354 +v 0.663967 0.000000 0.215736 +v 0.698136 0.000000 0.000000 +v 0.655793 0.109213 -0.213080 +v 0.557851 0.109213 -0.405302 +v 0.405302 0.109213 -0.557851 +v 0.213080 0.109213 -0.655793 +v 0.000000 0.109213 -0.689541 +v -0.213080 0.109213 -0.655793 +v -0.405302 0.109213 -0.557851 +v -0.557851 0.109213 -0.405302 +v -0.655793 0.109213 -0.213080 +v -0.689541 0.109213 0.000000 +v -0.655793 0.109213 0.213080 +v -0.557851 0.109213 0.405302 +v -0.405302 0.109213 0.557850 +v -0.213080 0.109213 0.655793 +v -0.000000 0.109213 0.689541 +v 0.213080 0.109213 0.655793 +v 0.405302 0.109213 0.557850 +v 0.557850 0.109213 0.405302 +v 0.655793 0.109213 0.213080 +v 0.689541 0.109213 0.000000 +v 0.631471 0.215736 -0.205177 +v 0.537161 0.215736 -0.390270 +v 0.390270 0.215736 -0.537161 +v 0.205177 0.215736 -0.631471 +v 0.000000 0.215736 -0.663967 +v -0.205177 0.215736 -0.631470 +v -0.390270 0.215736 -0.537161 +v -0.537161 0.215736 -0.390270 +v -0.631470 0.215736 -0.205177 +v -0.663967 0.215736 0.000000 +v -0.631470 0.215736 0.205177 +v -0.537161 0.215736 0.390270 +v -0.390270 0.215736 0.537161 +v -0.205177 0.215736 0.631470 +v -0.000000 0.215736 0.663967 +v 0.205177 0.215736 0.631470 +v 0.390270 0.215736 0.537161 +v 0.537161 0.215736 0.390270 +v 0.631470 0.215736 0.205177 +v 0.663967 0.215736 0.000000 +v 0.591599 0.316947 -0.192222 +v 0.503244 0.316947 -0.365628 +v 0.365628 0.316947 -0.503244 +v 0.192222 0.316947 -0.591599 +v 0.000000 0.316947 -0.622044 +v -0.192222 0.316947 -0.591599 +v -0.365628 0.316947 -0.503244 +v -0.503244 0.316947 -0.365628 +v -0.591599 0.316947 -0.192222 +v -0.622044 0.316947 0.000000 +v -0.591599 0.316947 0.192222 +v -0.503244 0.316947 0.365628 +v -0.365628 0.316947 0.503244 +v -0.192222 0.316947 0.591599 +v -0.000000 0.316947 0.622044 +v 0.192222 0.316947 0.591599 +v 0.365628 0.316947 0.503244 +v 0.503244 0.316947 0.365628 +v 0.591599 0.316947 0.192222 +v 0.622044 0.316947 0.000000 +v 0.537161 0.410354 -0.174534 +v 0.456936 0.410354 -0.331984 +v 0.331984 0.410354 -0.456936 +v 0.174534 0.410354 -0.537161 +v 0.000000 0.410354 -0.564804 +v -0.174534 0.410354 -0.537161 +v -0.331984 0.410354 -0.456936 +v -0.456936 0.410354 -0.331984 +v -0.537161 0.410354 -0.174534 +v -0.564804 0.410354 0.000000 +v -0.537161 0.410354 0.174534 +v -0.456936 0.410354 0.331984 +v -0.331984 0.410354 0.456936 +v -0.174534 0.410354 0.537161 +v -0.000000 0.410354 0.564804 +v 0.174534 0.410354 0.537161 +v 0.331984 0.410354 0.456936 +v 0.456936 0.410354 0.331984 +v 0.537161 0.410354 0.174534 +v 0.564804 0.410354 0.000000 +v 0.469496 0.493657 -0.152548 +v 0.399377 0.493657 -0.290164 +v 0.290164 0.493657 -0.399377 +v 0.152548 0.493657 -0.469496 +v 0.000000 0.493657 -0.493657 +v -0.152548 0.493657 -0.469496 +v -0.290164 0.493657 -0.399377 +v -0.399377 0.493657 -0.290164 +v -0.469496 0.493657 -0.152548 +v -0.493657 0.493657 0.000000 +v -0.469496 0.493657 0.152548 +v -0.399377 0.493657 0.290164 +v -0.290164 0.493657 0.399377 +v -0.152548 0.493657 0.469496 +v -0.000000 0.493657 0.493657 +v 0.152548 0.493657 0.469496 +v 0.290164 0.493657 0.399377 +v 0.399377 0.493657 0.290164 +v 0.469496 0.493657 0.152548 +v 0.493657 0.493657 0.000000 +v 0.390270 0.564804 -0.126806 +v 0.331984 0.564804 -0.241200 +v 0.241200 0.564804 -0.331984 +v 0.126806 0.564804 -0.390270 +v 0.000000 0.564804 -0.410354 +v -0.126806 0.564804 -0.390270 +v -0.241200 0.564804 -0.331984 +v -0.331984 0.564804 -0.241200 +v -0.390270 0.564804 -0.126806 +v -0.410354 0.564804 0.000000 +v -0.390270 0.564804 0.126806 +v -0.331984 0.564804 0.241200 +v -0.241200 0.564804 0.331984 +v -0.126806 0.564804 0.390270 +v -0.000000 0.564804 0.410354 +v 0.126806 0.564804 0.390270 +v 0.241200 0.564804 0.331984 +v 0.331984 0.564804 0.241200 +v 0.390270 0.564804 0.126806 +v 0.410354 0.564804 0.000000 +v 0.301435 0.622044 -0.097942 +v 0.256416 0.622044 -0.186297 +v 0.186297 0.622044 -0.256416 +v 0.097942 0.622044 -0.301435 +v 0.000000 0.622044 -0.316947 +v -0.097942 0.622044 -0.301435 +v -0.186297 0.622044 -0.256416 +v -0.256416 0.622044 -0.186297 +v -0.301435 0.622044 -0.097942 +v -0.316947 0.622044 0.000000 +v -0.301435 0.622044 0.097942 +v -0.256416 0.622044 0.186297 +v -0.186297 0.622044 0.256416 +v -0.097942 0.622044 0.301435 +v -0.000000 0.622044 0.316947 +v 0.097942 0.622044 0.301435 +v 0.186297 0.622044 0.256416 +v 0.256416 0.622044 0.186297 +v 0.301435 0.622044 0.097942 +v 0.316947 0.622044 0.000000 +v 0.205177 0.663967 -0.066666 +v 0.174534 0.663967 -0.126806 +v 0.126806 0.663967 -0.174534 +v 0.066666 0.663967 -0.205177 +v 0.000000 0.663967 -0.215736 +v -0.066666 0.663967 -0.205177 +v -0.126806 0.663967 -0.174534 +v -0.174534 0.663967 -0.126806 +v -0.205177 0.663967 -0.066666 +v -0.215736 0.663967 0.000000 +v -0.205177 0.663967 0.066666 +v -0.174534 0.663967 0.126806 +v -0.126806 0.663967 0.174534 +v -0.066666 0.663967 0.205177 +v -0.000000 0.663967 0.215736 +v 0.066666 0.663967 0.205177 +v 0.126806 0.663967 0.174534 +v 0.174534 0.663967 0.126806 +v 0.205177 0.663967 0.066666 +v 0.215736 0.663967 0.000000 +v 0.103867 0.689541 -0.033749 +v 0.088355 0.689541 -0.064194 +v 0.064194 0.689541 -0.088355 +v 0.033749 0.689541 -0.103867 +v 0.000000 0.689541 -0.109213 +v -0.033749 0.689541 -0.103867 +v -0.064194 0.689541 -0.088355 +v -0.088355 0.689541 -0.064194 +v -0.103867 0.689541 -0.033749 +v -0.109213 0.689541 0.000000 +v -0.103867 0.689541 0.033749 +v -0.088355 0.689541 0.064194 +v -0.064194 0.689541 0.088355 +v -0.033749 0.689541 0.103867 +v -0.000000 0.689541 0.109213 +v 0.033749 0.689541 0.103867 +v 0.064194 0.689541 0.088355 +v 0.088355 0.689541 0.064194 +v 0.103867 0.689541 0.033749 +v 0.109213 0.689541 0.000000 +v 0.000000 -0.698136 0.000000 +v 0.000000 0.698136 0.000000 +vt 0.000000 0.050000 +vt 0.050000 0.050000 +vt 0.100000 0.050000 +vt 0.150000 0.050000 +vt 0.200000 0.050000 +vt 0.250000 0.050000 +vt 0.300000 0.050000 +vt 0.350000 0.050000 +vt 0.400000 0.050000 +vt 0.450000 0.050000 +vt 0.500000 0.050000 +vt 0.550000 0.050000 +vt 0.600000 0.050000 +vt 0.650000 0.050000 +vt 0.700000 0.050000 +vt 0.750000 0.050000 +vt 0.800000 0.050000 +vt 0.850000 0.050000 +vt 0.900000 0.050000 +vt 0.950000 0.050000 +vt 1.000000 0.050000 +vt 0.000000 0.100000 +vt 0.050000 0.100000 +vt 0.100000 0.100000 +vt 0.150000 0.100000 +vt 0.200000 0.100000 +vt 0.250000 0.100000 +vt 0.300000 0.100000 +vt 0.350000 0.100000 +vt 0.400000 0.100000 +vt 0.450000 0.100000 +vt 0.500000 0.100000 +vt 0.550000 0.100000 +vt 0.600000 0.100000 +vt 0.650000 0.100000 +vt 0.700000 0.100000 +vt 0.750000 0.100000 +vt 0.800000 0.100000 +vt 0.850000 0.100000 +vt 0.900000 0.100000 +vt 0.950000 0.100000 +vt 1.000000 0.100000 +vt 0.000000 0.150000 +vt 0.050000 0.150000 +vt 0.100000 0.150000 +vt 0.150000 0.150000 +vt 0.200000 0.150000 +vt 0.250000 0.150000 +vt 0.300000 0.150000 +vt 0.350000 0.150000 +vt 0.400000 0.150000 +vt 0.450000 0.150000 +vt 0.500000 0.150000 +vt 0.550000 0.150000 +vt 0.600000 0.150000 +vt 0.650000 0.150000 +vt 0.700000 0.150000 +vt 0.750000 0.150000 +vt 0.800000 0.150000 +vt 0.850000 0.150000 +vt 0.900000 0.150000 +vt 0.950000 0.150000 +vt 1.000000 0.150000 +vt 0.000000 0.200000 +vt 0.050000 0.200000 +vt 0.100000 0.200000 +vt 0.150000 0.200000 +vt 0.200000 0.200000 +vt 0.250000 0.200000 +vt 0.300000 0.200000 +vt 0.350000 0.200000 +vt 0.400000 0.200000 +vt 0.450000 0.200000 +vt 0.500000 0.200000 +vt 0.550000 0.200000 +vt 0.600000 0.200000 +vt 0.650000 0.200000 +vt 0.700000 0.200000 +vt 0.750000 0.200000 +vt 0.800000 0.200000 +vt 0.850000 0.200000 +vt 0.900000 0.200000 +vt 0.950000 0.200000 +vt 1.000000 0.200000 +vt 0.000000 0.250000 +vt 0.050000 0.250000 +vt 0.100000 0.250000 +vt 0.150000 0.250000 +vt 0.200000 0.250000 +vt 0.250000 0.250000 +vt 0.300000 0.250000 +vt 0.350000 0.250000 +vt 0.400000 0.250000 +vt 0.450000 0.250000 +vt 0.500000 0.250000 +vt 0.550000 0.250000 +vt 0.600000 0.250000 +vt 0.650000 0.250000 +vt 0.700000 0.250000 +vt 0.750000 0.250000 +vt 0.800000 0.250000 +vt 0.850000 0.250000 +vt 0.900000 0.250000 +vt 0.950000 0.250000 +vt 1.000000 0.250000 +vt 0.000000 0.300000 +vt 0.050000 0.300000 +vt 0.100000 0.300000 +vt 0.150000 0.300000 +vt 0.200000 0.300000 +vt 0.250000 0.300000 +vt 0.300000 0.300000 +vt 0.350000 0.300000 +vt 0.400000 0.300000 +vt 0.450000 0.300000 +vt 0.500000 0.300000 +vt 0.550000 0.300000 +vt 0.600000 0.300000 +vt 0.650000 0.300000 +vt 0.700000 0.300000 +vt 0.750000 0.300000 +vt 0.800000 0.300000 +vt 0.850000 0.300000 +vt 0.900000 0.300000 +vt 0.950000 0.300000 +vt 1.000000 0.300000 +vt 0.000000 0.350000 +vt 0.050000 0.350000 +vt 0.100000 0.350000 +vt 0.150000 0.350000 +vt 0.200000 0.350000 +vt 0.250000 0.350000 +vt 0.300000 0.350000 +vt 0.350000 0.350000 +vt 0.400000 0.350000 +vt 0.450000 0.350000 +vt 0.500000 0.350000 +vt 0.550000 0.350000 +vt 0.600000 0.350000 +vt 0.650000 0.350000 +vt 0.700000 0.350000 +vt 0.750000 0.350000 +vt 0.800000 0.350000 +vt 0.850000 0.350000 +vt 0.900000 0.350000 +vt 0.950000 0.350000 +vt 1.000000 0.350000 +vt 0.000000 0.400000 +vt 0.050000 0.400000 +vt 0.100000 0.400000 +vt 0.150000 0.400000 +vt 0.200000 0.400000 +vt 0.250000 0.400000 +vt 0.300000 0.400000 +vt 0.350000 0.400000 +vt 0.400000 0.400000 +vt 0.450000 0.400000 +vt 0.500000 0.400000 +vt 0.550000 0.400000 +vt 0.600000 0.400000 +vt 0.650000 0.400000 +vt 0.700000 0.400000 +vt 0.750000 0.400000 +vt 0.800000 0.400000 +vt 0.850000 0.400000 +vt 0.900000 0.400000 +vt 0.950000 0.400000 +vt 1.000000 0.400000 +vt 0.000000 0.450000 +vt 0.050000 0.450000 +vt 0.100000 0.450000 +vt 0.150000 0.450000 +vt 0.200000 0.450000 +vt 0.250000 0.450000 +vt 0.300000 0.450000 +vt 0.350000 0.450000 +vt 0.400000 0.450000 +vt 0.450000 0.450000 +vt 0.500000 0.450000 +vt 0.550000 0.450000 +vt 0.600000 0.450000 +vt 0.650000 0.450000 +vt 0.700000 0.450000 +vt 0.750000 0.450000 +vt 0.800000 0.450000 +vt 0.850000 0.450000 +vt 0.900000 0.450000 +vt 0.950000 0.450000 +vt 1.000000 0.450000 +vt 0.000000 0.500000 +vt 0.050000 0.500000 +vt 0.100000 0.500000 +vt 0.150000 0.500000 +vt 0.200000 0.500000 +vt 0.250000 0.500000 +vt 0.300000 0.500000 +vt 0.350000 0.500000 +vt 0.400000 0.500000 +vt 0.450000 0.500000 +vt 0.500000 0.500000 +vt 0.550000 0.500000 +vt 0.600000 0.500000 +vt 0.650000 0.500000 +vt 0.700000 0.500000 +vt 0.750000 0.500000 +vt 0.800000 0.500000 +vt 0.850000 0.500000 +vt 0.900000 0.500000 +vt 0.950000 0.500000 +vt 1.000000 0.500000 +vt 0.000000 0.550000 +vt 0.050000 0.550000 +vt 0.100000 0.550000 +vt 0.150000 0.550000 +vt 0.200000 0.550000 +vt 0.250000 0.550000 +vt 0.300000 0.550000 +vt 0.350000 0.550000 +vt 0.400000 0.550000 +vt 0.450000 0.550000 +vt 0.500000 0.550000 +vt 0.550000 0.550000 +vt 0.600000 0.550000 +vt 0.650000 0.550000 +vt 0.700000 0.550000 +vt 0.750000 0.550000 +vt 0.800000 0.550000 +vt 0.850000 0.550000 +vt 0.900000 0.550000 +vt 0.950000 0.550000 +vt 1.000000 0.550000 +vt 0.000000 0.600000 +vt 0.050000 0.600000 +vt 0.100000 0.600000 +vt 0.150000 0.600000 +vt 0.200000 0.600000 +vt 0.250000 0.600000 +vt 0.300000 0.600000 +vt 0.350000 0.600000 +vt 0.400000 0.600000 +vt 0.450000 0.600000 +vt 0.500000 0.600000 +vt 0.550000 0.600000 +vt 0.600000 0.600000 +vt 0.650000 0.600000 +vt 0.700000 0.600000 +vt 0.750000 0.600000 +vt 0.800000 0.600000 +vt 0.850000 0.600000 +vt 0.900000 0.600000 +vt 0.950000 0.600000 +vt 1.000000 0.600000 +vt 0.000000 0.650000 +vt 0.050000 0.650000 +vt 0.100000 0.650000 +vt 0.150000 0.650000 +vt 0.200000 0.650000 +vt 0.250000 0.650000 +vt 0.300000 0.650000 +vt 0.350000 0.650000 +vt 0.400000 0.650000 +vt 0.450000 0.650000 +vt 0.500000 0.650000 +vt 0.550000 0.650000 +vt 0.600000 0.650000 +vt 0.650000 0.650000 +vt 0.700000 0.650000 +vt 0.750000 0.650000 +vt 0.800000 0.650000 +vt 0.850000 0.650000 +vt 0.900000 0.650000 +vt 0.950000 0.650000 +vt 1.000000 0.650000 +vt 0.000000 0.700000 +vt 0.050000 0.700000 +vt 0.100000 0.700000 +vt 0.150000 0.700000 +vt 0.200000 0.700000 +vt 0.250000 0.700000 +vt 0.300000 0.700000 +vt 0.350000 0.700000 +vt 0.400000 0.700000 +vt 0.450000 0.700000 +vt 0.500000 0.700000 +vt 0.550000 0.700000 +vt 0.600000 0.700000 +vt 0.650000 0.700000 +vt 0.700000 0.700000 +vt 0.750000 0.700000 +vt 0.800000 0.700000 +vt 0.850000 0.700000 +vt 0.900000 0.700000 +vt 0.950000 0.700000 +vt 1.000000 0.700000 +vt 0.000000 0.750000 +vt 0.050000 0.750000 +vt 0.100000 0.750000 +vt 0.150000 0.750000 +vt 0.200000 0.750000 +vt 0.250000 0.750000 +vt 0.300000 0.750000 +vt 0.350000 0.750000 +vt 0.400000 0.750000 +vt 0.450000 0.750000 +vt 0.500000 0.750000 +vt 0.550000 0.750000 +vt 0.600000 0.750000 +vt 0.650000 0.750000 +vt 0.700000 0.750000 +vt 0.750000 0.750000 +vt 0.800000 0.750000 +vt 0.850000 0.750000 +vt 0.900000 0.750000 +vt 0.950000 0.750000 +vt 1.000000 0.750000 +vt 0.000000 0.800000 +vt 0.050000 0.800000 +vt 0.100000 0.800000 +vt 0.150000 0.800000 +vt 0.200000 0.800000 +vt 0.250000 0.800000 +vt 0.300000 0.800000 +vt 0.350000 0.800000 +vt 0.400000 0.800000 +vt 0.450000 0.800000 +vt 0.500000 0.800000 +vt 0.550000 0.800000 +vt 0.600000 0.800000 +vt 0.650000 0.800000 +vt 0.700000 0.800000 +vt 0.750000 0.800000 +vt 0.800000 0.800000 +vt 0.850000 0.800000 +vt 0.900000 0.800000 +vt 0.950000 0.800000 +vt 1.000000 0.800000 +vt 0.000000 0.850000 +vt 0.050000 0.850000 +vt 0.100000 0.850000 +vt 0.150000 0.850000 +vt 0.200000 0.850000 +vt 0.250000 0.850000 +vt 0.300000 0.850000 +vt 0.350000 0.850000 +vt 0.400000 0.850000 +vt 0.450000 0.850000 +vt 0.500000 0.850000 +vt 0.550000 0.850000 +vt 0.600000 0.850000 +vt 0.650000 0.850000 +vt 0.700000 0.850000 +vt 0.750000 0.850000 +vt 0.800000 0.850000 +vt 0.850000 0.850000 +vt 0.900000 0.850000 +vt 0.950000 0.850000 +vt 1.000000 0.850000 +vt 0.000000 0.900000 +vt 0.050000 0.900000 +vt 0.100000 0.900000 +vt 0.150000 0.900000 +vt 0.200000 0.900000 +vt 0.250000 0.900000 +vt 0.300000 0.900000 +vt 0.350000 0.900000 +vt 0.400000 0.900000 +vt 0.450000 0.900000 +vt 0.500000 0.900000 +vt 0.550000 0.900000 +vt 0.600000 0.900000 +vt 0.650000 0.900000 +vt 0.700000 0.900000 +vt 0.750000 0.900000 +vt 0.800000 0.900000 +vt 0.850000 0.900000 +vt 0.900000 0.900000 +vt 0.950000 0.900000 +vt 1.000000 0.900000 +vt 0.000000 0.950000 +vt 0.050000 0.950000 +vt 0.100000 0.950000 +vt 0.150000 0.950000 +vt 0.200000 0.950000 +vt 0.250000 0.950000 +vt 0.300000 0.950000 +vt 0.350000 0.950000 +vt 0.400000 0.950000 +vt 0.450000 0.950000 +vt 0.500000 0.950000 +vt 0.550000 0.950000 +vt 0.600000 0.950000 +vt 0.650000 0.950000 +vt 0.700000 0.950000 +vt 0.750000 0.950000 +vt 0.800000 0.950000 +vt 0.850000 0.950000 +vt 0.900000 0.950000 +vt 0.950000 0.950000 +vt 1.000000 0.950000 +vt 0.025000 0.000000 +vt 0.075000 0.000000 +vt 0.125000 0.000000 +vt 0.175000 0.000000 +vt 0.225000 0.000000 +vt 0.275000 0.000000 +vt 0.325000 0.000000 +vt 0.375000 0.000000 +vt 0.425000 0.000000 +vt 0.475000 0.000000 +vt 0.525000 0.000000 +vt 0.575000 0.000000 +vt 0.625000 0.000000 +vt 0.675000 0.000000 +vt 0.725000 0.000000 +vt 0.775000 0.000000 +vt 0.825000 0.000000 +vt 0.875000 0.000000 +vt 0.925000 0.000000 +vt 0.975000 0.000000 +vt 0.025000 1.000000 +vt 0.075000 1.000000 +vt 0.125000 1.000000 +vt 0.175000 1.000000 +vt 0.225000 1.000000 +vt 0.275000 1.000000 +vt 0.325000 1.000000 +vt 0.375000 1.000000 +vt 0.425000 1.000000 +vt 0.475000 1.000000 +vt 0.525000 1.000000 +vt 0.575000 1.000000 +vt 0.625000 1.000000 +vt 0.675000 1.000000 +vt 0.725000 1.000000 +vt 0.775000 1.000000 +vt 0.825000 1.000000 +vt 0.875000 1.000000 +vt 0.925000 1.000000 +vt 0.975000 1.000000 +vn 0.190555 -0.979722 -0.061915 +vn 0.162096 -0.979722 -0.117770 +vn 0.269870 -0.942722 -0.196072 +vn 0.317252 -0.942722 -0.103081 +vn 0.117769 -0.979722 -0.162095 +vn 0.196072 -0.942722 -0.269870 +vn 0.061915 -0.979722 -0.190555 +vn 0.103081 -0.942723 -0.317251 +vn -0.000000 -0.979722 -0.200361 +vn -0.000000 -0.942722 -0.333578 +vn -0.061915 -0.979722 -0.190555 +vn -0.103081 -0.942722 -0.317252 +vn -0.117769 -0.979722 -0.162096 +vn -0.196072 -0.942722 -0.269871 +vn -0.162096 -0.979722 -0.117770 +vn -0.269870 -0.942722 -0.196072 +vn -0.190555 -0.979722 -0.061915 +vn -0.317252 -0.942722 -0.103081 +vn -0.200361 -0.979722 0.000000 +vn -0.333578 -0.942722 -0.000000 +vn -0.190555 -0.979722 0.061915 +vn -0.317252 -0.942722 0.103081 +vn -0.162096 -0.979722 0.117769 +vn -0.269870 -0.942722 0.196072 +vn -0.117769 -0.979722 0.162095 +vn -0.196072 -0.942722 0.269870 +vn -0.061915 -0.979722 0.190555 +vn -0.103081 -0.942722 0.317252 +vn 0.000000 -0.979722 0.200361 +vn 0.000000 -0.942722 0.333578 +vn 0.061915 -0.979722 0.190555 +vn 0.103081 -0.942722 0.317252 +vn 0.117769 -0.979722 0.162096 +vn 0.196072 -0.942722 0.269870 +vn 0.162096 -0.979722 0.117769 +vn 0.269870 -0.942722 0.196072 +vn 0.190555 -0.979722 0.061915 +vn 0.317252 -0.942722 0.103081 +vn 0.200361 -0.979722 0.000001 +vn 0.333578 -0.942722 0.000000 +vn 0.380846 -0.882266 -0.276701 +vn 0.447711 -0.882266 -0.145470 +vn 0.276701 -0.882266 -0.380846 +vn 0.145470 -0.882266 -0.447711 +vn -0.000000 -0.882266 -0.470752 +vn -0.145470 -0.882266 -0.447711 +vn -0.276701 -0.882266 -0.380846 +vn -0.380846 -0.882266 -0.276701 +vn -0.447712 -0.882266 -0.145470 +vn -0.470752 -0.882266 0.000000 +vn -0.447712 -0.882266 0.145470 +vn -0.380846 -0.882266 0.276701 +vn -0.276701 -0.882266 0.380846 +vn -0.145470 -0.882266 0.447712 +vn 0.000000 -0.882266 0.470752 +vn 0.145470 -0.882266 0.447712 +vn 0.276701 -0.882266 0.380846 +vn 0.380846 -0.882266 0.276701 +vn 0.447712 -0.882266 0.145470 +vn 0.470752 -0.882266 0.000000 +vn 0.485138 -0.800252 -0.352474 +vn 0.570314 -0.800252 -0.185306 +vn 0.352473 -0.800252 -0.485138 +vn 0.185306 -0.800252 -0.570314 +vn -0.000000 -0.800252 -0.599664 +vn -0.185307 -0.800252 -0.570314 +vn -0.352474 -0.800252 -0.485138 +vn -0.485138 -0.800252 -0.352474 +vn -0.570314 -0.800252 -0.185306 +vn -0.599664 -0.800252 0.000000 +vn -0.570314 -0.800252 0.185306 +vn -0.485138 -0.800252 0.352474 +vn -0.352474 -0.800252 0.485139 +vn -0.185306 -0.800252 0.570314 +vn 0.000000 -0.800252 0.599664 +vn 0.185306 -0.800252 0.570314 +vn 0.352474 -0.800252 0.485139 +vn 0.485138 -0.800252 0.352474 +vn 0.570314 -0.800252 0.185306 +vn 0.599664 -0.800252 0.000001 +vn 0.578713 -0.698789 -0.420459 +vn 0.680318 -0.698789 -0.221048 +vn 0.420459 -0.698789 -0.578713 +vn 0.221049 -0.698789 -0.680318 +vn -0.000000 -0.698789 -0.715328 +vn -0.221049 -0.698789 -0.680318 +vn -0.420460 -0.698789 -0.578713 +vn -0.578713 -0.698789 -0.420459 +vn -0.680318 -0.698789 -0.221049 +vn -0.715328 -0.698788 -0.000000 +vn -0.680318 -0.698789 0.221049 +vn -0.578713 -0.698788 0.420460 +vn -0.420459 -0.698788 0.578713 +vn -0.221049 -0.698788 0.680318 +vn -0.000000 -0.698788 0.715328 +vn 0.221049 -0.698789 0.680318 +vn 0.420460 -0.698788 0.578713 +vn 0.578713 -0.698788 0.420459 +vn 0.680318 -0.698788 0.221049 +vn 0.715328 -0.698788 0.000001 +vn 0.658808 -0.580401 -0.478652 +vn 0.774475 -0.580401 -0.251641 +vn 0.478652 -0.580401 -0.658808 +vn 0.251642 -0.580401 -0.774475 +vn -0.000000 -0.580401 -0.814331 +vn -0.251642 -0.580401 -0.774475 +vn -0.478652 -0.580401 -0.658808 +vn -0.658808 -0.580401 -0.478652 +vn -0.774475 -0.580401 -0.251642 +vn -0.814331 -0.580401 -0.000000 +vn -0.774475 -0.580401 0.251642 +vn -0.658808 -0.580401 0.478652 +vn -0.478652 -0.580401 0.658808 +vn -0.251642 -0.580401 0.774475 +vn 0.000000 -0.580401 0.814331 +vn 0.251642 -0.580401 0.774475 +vn 0.478652 -0.580401 0.658808 +vn 0.658808 -0.580401 0.478652 +vn 0.774475 -0.580401 0.251642 +vn 0.814331 -0.580401 0.000001 +vn 0.723291 -0.447994 -0.525502 +vn 0.850280 -0.447994 -0.276272 +vn 0.525501 -0.447994 -0.723291 +vn 0.276272 -0.447994 -0.850279 +vn -0.000000 -0.447994 -0.894037 +vn -0.276273 -0.447994 -0.850279 +vn -0.525502 -0.447994 -0.723291 +vn -0.723291 -0.447994 -0.525501 +vn -0.850279 -0.447994 -0.276272 +vn -0.894037 -0.447994 -0.000000 +vn -0.850279 -0.447994 0.276272 +vn -0.723291 -0.447994 0.525502 +vn -0.525502 -0.447994 0.723291 +vn -0.276273 -0.447994 0.850279 +vn 0.000000 -0.447994 0.894037 +vn 0.276273 -0.447994 0.850279 +vn 0.525502 -0.447994 0.723291 +vn 0.723291 -0.447994 0.525502 +vn 0.850280 -0.447994 0.276273 +vn 0.894037 -0.447994 0.000001 +vn 0.770524 -0.304789 -0.559819 +vn 0.905806 -0.304789 -0.294313 +vn 0.559818 -0.304789 -0.770524 +vn 0.294314 -0.304789 -0.905805 +vn -0.000000 -0.304789 -0.952420 +vn -0.294314 -0.304789 -0.905805 +vn -0.559819 -0.304789 -0.770524 +vn -0.770524 -0.304789 -0.559818 +vn -0.905805 -0.304789 -0.294314 +vn -0.952420 -0.304789 -0.000000 +vn -0.905805 -0.304789 0.294314 +vn -0.770524 -0.304788 0.559819 +vn -0.559818 -0.304788 0.770524 +vn -0.294314 -0.304789 0.905805 +vn 0.000000 -0.304789 0.952420 +vn 0.294314 -0.304789 0.905805 +vn 0.559818 -0.304789 0.770524 +vn 0.770524 -0.304789 0.559818 +vn 0.905805 -0.304789 0.294314 +vn 0.952420 -0.304788 0.000001 +vn 0.799335 -0.154249 -0.580751 +vn 0.939675 -0.154249 -0.305318 +vn 0.580750 -0.154249 -0.799335 +vn 0.305319 -0.154249 -0.939674 +vn 0.000000 -0.154249 -0.988032 +vn -0.305319 -0.154249 -0.939674 +vn -0.580751 -0.154249 -0.799334 +vn -0.799335 -0.154249 -0.580751 +vn -0.939674 -0.154248 -0.305319 +vn -0.988032 -0.154248 0.000000 +vn -0.939674 -0.154248 0.305319 +vn -0.799335 -0.154248 0.580751 +vn -0.580751 -0.154249 0.799335 +vn -0.305319 -0.154249 0.939674 +vn 0.000000 -0.154249 0.988032 +vn 0.305319 -0.154249 0.939674 +vn 0.580751 -0.154249 0.799335 +vn 0.799335 -0.154249 0.580751 +vn 0.939674 -0.154249 0.305319 +vn 0.988032 -0.154249 0.000001 +vn 0.809017 0.000000 -0.587785 +vn 0.951057 -0.000000 -0.309016 +vn 0.587785 -0.000000 -0.809017 +vn 0.309017 -0.000000 -0.951057 +vn 0.000000 0.000000 -1.000000 +vn -0.309017 -0.000000 -0.951056 +vn -0.587785 -0.000000 -0.809017 +vn -0.809017 0.000000 -0.587785 +vn -0.951056 0.000000 -0.309017 +vn -1.000000 -0.000000 0.000000 +vn -0.951056 -0.000000 0.309017 +vn -0.809017 0.000000 0.587785 +vn -0.587785 -0.000000 0.809017 +vn -0.309017 -0.000000 0.951056 +vn 0.000000 0.000000 1.000000 +vn 0.309017 -0.000000 0.951056 +vn 0.587785 -0.000000 0.809017 +vn 0.809017 -0.000000 0.587785 +vn 0.951056 0.000000 0.309017 +vn 1.000000 0.000000 0.000001 +vn 0.799335 0.154249 -0.580751 +vn 0.939675 0.154249 -0.305318 +vn 0.580750 0.154249 -0.799335 +vn 0.305319 0.154249 -0.939674 +vn 0.000000 0.154249 -0.988032 +vn -0.305319 0.154249 -0.939674 +vn -0.580751 0.154249 -0.799334 +vn -0.799335 0.154249 -0.580751 +vn -0.939674 0.154248 -0.305319 +vn -0.988032 0.154248 0.000000 +vn -0.939674 0.154248 0.305319 +vn -0.799335 0.154248 0.580751 +vn -0.580751 0.154249 0.799335 +vn -0.305319 0.154249 0.939674 +vn 0.000000 0.154249 0.988032 +vn 0.305319 0.154249 0.939674 +vn 0.580751 0.154249 0.799335 +vn 0.799335 0.154249 0.580751 +vn 0.939674 0.154249 0.305319 +vn 0.988032 0.154249 0.000001 +vn 0.770524 0.304789 -0.559819 +vn 0.905806 0.304789 -0.294313 +vn 0.559818 0.304789 -0.770524 +vn 0.294314 0.304789 -0.905805 +vn -0.000000 0.304789 -0.952420 +vn -0.294314 0.304789 -0.905805 +vn -0.559819 0.304789 -0.770524 +vn -0.770524 0.304789 -0.559818 +vn -0.905805 0.304789 -0.294314 +vn -0.952420 0.304789 -0.000000 +vn -0.905805 0.304789 0.294314 +vn -0.770524 0.304788 0.559819 +vn -0.559818 0.304788 0.770524 +vn -0.294314 0.304789 0.905805 +vn 0.000000 0.304789 0.952420 +vn 0.294314 0.304789 0.905805 +vn 0.559818 0.304789 0.770524 +vn 0.770524 0.304789 0.559818 +vn 0.905805 0.304788 0.294314 +vn 0.952420 0.304788 0.000001 +vn 0.723291 0.447994 -0.525502 +vn 0.850280 0.447994 -0.276272 +vn 0.525501 0.447994 -0.723291 +vn 0.276272 0.447994 -0.850279 +vn -0.000000 0.447994 -0.894037 +vn -0.276273 0.447994 -0.850279 +vn -0.525502 0.447994 -0.723291 +vn -0.723291 0.447994 -0.525501 +vn -0.850279 0.447994 -0.276272 +vn -0.894037 0.447994 -0.000000 +vn -0.850279 0.447994 0.276273 +vn -0.723291 0.447994 0.525502 +vn -0.525502 0.447994 0.723291 +vn -0.276273 0.447994 0.850279 +vn 0.000000 0.447994 0.894037 +vn 0.276273 0.447994 0.850280 +vn 0.525502 0.447994 0.723291 +vn 0.723291 0.447994 0.525502 +vn 0.850280 0.447994 0.276273 +vn 0.894037 0.447994 0.000001 +vn 0.658808 0.580401 -0.478652 +vn 0.774475 0.580401 -0.251641 +vn 0.478652 0.580401 -0.658808 +vn 0.251642 0.580401 -0.774475 +vn -0.000000 0.580401 -0.814331 +vn -0.251642 0.580401 -0.774475 +vn -0.478652 0.580401 -0.658808 +vn -0.658808 0.580401 -0.478652 +vn -0.774475 0.580401 -0.251642 +vn -0.814331 0.580401 -0.000000 +vn -0.774475 0.580401 0.251642 +vn -0.658808 0.580401 0.478652 +vn -0.478652 0.580401 0.658808 +vn -0.251642 0.580401 0.774475 +vn 0.000000 0.580401 0.814331 +vn 0.251642 0.580401 0.774475 +vn 0.478652 0.580401 0.658808 +vn 0.658808 0.580401 0.478652 +vn 0.774475 0.580401 0.251642 +vn 0.814331 0.580401 0.000001 +vn 0.578712 0.698789 -0.420459 +vn 0.680318 0.698789 -0.221048 +vn 0.420459 0.698789 -0.578713 +vn 0.221049 0.698789 -0.680318 +vn -0.000000 0.698789 -0.715328 +vn -0.221049 0.698789 -0.680318 +vn -0.420460 0.698789 -0.578713 +vn -0.578713 0.698789 -0.420459 +vn -0.680318 0.698789 -0.221049 +vn -0.715328 0.698788 0.000000 +vn -0.680318 0.698789 0.221049 +vn -0.578713 0.698788 0.420460 +vn -0.420459 0.698788 0.578713 +vn -0.221049 0.698788 0.680318 +vn -0.000000 0.698788 0.715328 +vn 0.221049 0.698789 0.680318 +vn 0.420460 0.698788 0.578713 +vn 0.578713 0.698788 0.420460 +vn 0.680318 0.698788 0.221049 +vn 0.715328 0.698788 0.000001 +vn 0.485138 0.800252 -0.352474 +vn 0.570314 0.800252 -0.185306 +vn 0.352473 0.800252 -0.485139 +vn 0.185306 0.800252 -0.570314 +vn -0.000000 0.800252 -0.599664 +vn -0.185307 0.800252 -0.570314 +vn -0.352474 0.800252 -0.485138 +vn -0.485138 0.800252 -0.352474 +vn -0.570314 0.800252 -0.185306 +vn -0.599664 0.800252 0.000000 +vn -0.570314 0.800252 0.185306 +vn -0.485138 0.800252 0.352474 +vn -0.352474 0.800252 0.485138 +vn -0.185306 0.800252 0.570314 +vn 0.000000 0.800252 0.599664 +vn 0.185306 0.800252 0.570315 +vn 0.352474 0.800252 0.485139 +vn 0.485139 0.800252 0.352474 +vn 0.570314 0.800252 0.185306 +vn 0.599664 0.800252 0.000001 +vn 0.380846 0.882266 -0.276701 +vn 0.447711 0.882266 -0.145470 +vn 0.276701 0.882266 -0.380846 +vn 0.145470 0.882266 -0.447711 +vn -0.000000 0.882266 -0.470752 +vn -0.145470 0.882266 -0.447711 +vn -0.276701 0.882266 -0.380846 +vn -0.380846 0.882266 -0.276701 +vn -0.447712 0.882266 -0.145470 +vn -0.470752 0.882266 0.000000 +vn -0.447712 0.882266 0.145471 +vn -0.380846 0.882266 0.276701 +vn -0.276701 0.882266 0.380846 +vn -0.145470 0.882266 0.447712 +vn 0.000000 0.882266 0.470752 +vn 0.145470 0.882266 0.447712 +vn 0.276701 0.882266 0.380846 +vn 0.380846 0.882266 0.276701 +vn 0.447712 0.882266 0.145470 +vn 0.470752 0.882266 0.000000 +vn 0.269870 0.942722 -0.196073 +vn 0.317252 0.942722 -0.103081 +vn 0.196072 0.942722 -0.269871 +vn 0.103081 0.942722 -0.317252 +vn -0.000000 0.942723 -0.333578 +vn -0.103081 0.942722 -0.317251 +vn -0.196072 0.942722 -0.269870 +vn -0.269870 0.942722 -0.196072 +vn -0.317252 0.942722 -0.103081 +vn -0.333578 0.942722 0.000000 +vn -0.317252 0.942722 0.103082 +vn -0.269870 0.942722 0.196072 +vn -0.196072 0.942722 0.269870 +vn -0.103081 0.942722 0.317252 +vn 0.000000 0.942722 0.333578 +vn 0.103081 0.942722 0.317252 +vn 0.196072 0.942722 0.269870 +vn 0.269870 0.942722 0.196072 +vn 0.317252 0.942722 0.103081 +vn 0.333578 0.942722 0.000000 +vn 0.162096 0.979722 -0.117769 +vn 0.190555 0.979722 -0.061915 +vn 0.117769 0.979722 -0.162096 +vn 0.061915 0.979722 -0.190555 +vn -0.000000 0.979722 -0.200361 +vn -0.061915 0.979722 -0.190555 +vn -0.117769 0.979722 -0.162095 +vn -0.162096 0.979722 -0.117769 +vn -0.190555 0.979722 -0.061915 +vn -0.200361 0.979722 0.000000 +vn -0.190555 0.979722 0.061915 +vn -0.162096 0.979722 0.117769 +vn -0.117769 0.979722 0.162096 +vn -0.061915 0.979722 0.190555 +vn 0.000000 0.979722 0.200361 +vn 0.061915 0.979722 0.190555 +vn 0.117769 0.979722 0.162096 +vn 0.162096 0.979722 0.117769 +vn 0.190555 0.979722 0.061915 +vn 0.200361 0.979722 0.000001 +vn -0.000000 -1.000000 -0.000000 +vn -0.000000 1.000000 0.000000 +s 1 +g pSphere1 +usemtl initialShadingGroup +f 1/1/1 2/2/2 22/23/3 21/22/4 +f 2/2/2 3/3/5 23/24/6 22/23/3 +f 3/3/5 4/4/7 24/25/8 23/24/6 +f 4/4/7 5/5/9 25/26/10 24/25/8 +f 5/5/9 6/6/11 26/27/12 25/26/10 +f 6/6/11 7/7/13 27/28/14 26/27/12 +f 7/7/13 8/8/15 28/29/16 27/28/14 +f 8/8/15 9/9/17 29/30/18 28/29/16 +f 9/9/17 10/10/19 30/31/20 29/30/18 +f 10/10/19 11/11/21 31/32/22 30/31/20 +f 11/11/21 12/12/23 32/33/24 31/32/22 +f 12/12/23 13/13/25 33/34/26 32/33/24 +f 13/13/25 14/14/27 34/35/28 33/34/26 +f 14/14/27 15/15/29 35/36/30 34/35/28 +f 15/15/29 16/16/31 36/37/32 35/36/30 +f 16/16/31 17/17/33 37/38/34 36/37/32 +f 17/17/33 18/18/35 38/39/36 37/38/34 +f 18/18/35 19/19/37 39/40/38 38/39/36 +f 19/19/37 20/20/39 40/41/40 39/40/38 +f 20/20/39 1/21/1 21/42/4 40/41/40 +f 21/22/4 22/23/3 42/44/41 41/43/42 +f 22/23/3 23/24/6 43/45/43 42/44/41 +f 23/24/6 24/25/8 44/46/44 43/45/43 +f 24/25/8 25/26/10 45/47/45 44/46/44 +f 25/26/10 26/27/12 46/48/46 45/47/45 +f 26/27/12 27/28/14 47/49/47 46/48/46 +f 27/28/14 28/29/16 48/50/48 47/49/47 +f 28/29/16 29/30/18 49/51/49 48/50/48 +f 29/30/18 30/31/20 50/52/50 49/51/49 +f 30/31/20 31/32/22 51/53/51 50/52/50 +f 31/32/22 32/33/24 52/54/52 51/53/51 +f 32/33/24 33/34/26 53/55/53 52/54/52 +f 33/34/26 34/35/28 54/56/54 53/55/53 +f 34/35/28 35/36/30 55/57/55 54/56/54 +f 35/36/30 36/37/32 56/58/56 55/57/55 +f 36/37/32 37/38/34 57/59/57 56/58/56 +f 37/38/34 38/39/36 58/60/58 57/59/57 +f 38/39/36 39/40/38 59/61/59 58/60/58 +f 39/40/38 40/41/40 60/62/60 59/61/59 +f 40/41/40 21/42/4 41/63/42 60/62/60 +f 41/43/42 42/44/41 62/65/61 61/64/62 +f 42/44/41 43/45/43 63/66/63 62/65/61 +f 43/45/43 44/46/44 64/67/64 63/66/63 +f 44/46/44 45/47/45 65/68/65 64/67/64 +f 45/47/45 46/48/46 66/69/66 65/68/65 +f 46/48/46 47/49/47 67/70/67 66/69/66 +f 47/49/47 48/50/48 68/71/68 67/70/67 +f 48/50/48 49/51/49 69/72/69 68/71/68 +f 49/51/49 50/52/50 70/73/70 69/72/69 +f 50/52/50 51/53/51 71/74/71 70/73/70 +f 51/53/51 52/54/52 72/75/72 71/74/71 +f 52/54/52 53/55/53 73/76/73 72/75/72 +f 53/55/53 54/56/54 74/77/74 73/76/73 +f 54/56/54 55/57/55 75/78/75 74/77/74 +f 55/57/55 56/58/56 76/79/76 75/78/75 +f 56/58/56 57/59/57 77/80/77 76/79/76 +f 57/59/57 58/60/58 78/81/78 77/80/77 +f 58/60/58 59/61/59 79/82/79 78/81/78 +f 59/61/59 60/62/60 80/83/80 79/82/79 +f 60/62/60 41/63/42 61/84/62 80/83/80 +f 61/64/62 62/65/61 82/86/81 81/85/82 +f 62/65/61 63/66/63 83/87/83 82/86/81 +f 63/66/63 64/67/64 84/88/84 83/87/83 +f 64/67/64 65/68/65 85/89/85 84/88/84 +f 65/68/65 66/69/66 86/90/86 85/89/85 +f 66/69/66 67/70/67 87/91/87 86/90/86 +f 67/70/67 68/71/68 88/92/88 87/91/87 +f 68/71/68 69/72/69 89/93/89 88/92/88 +f 69/72/69 70/73/70 90/94/90 89/93/89 +f 70/73/70 71/74/71 91/95/91 90/94/90 +f 71/74/71 72/75/72 92/96/92 91/95/91 +f 72/75/72 73/76/73 93/97/93 92/96/92 +f 73/76/73 74/77/74 94/98/94 93/97/93 +f 74/77/74 75/78/75 95/99/95 94/98/94 +f 75/78/75 76/79/76 96/100/96 95/99/95 +f 76/79/76 77/80/77 97/101/97 96/100/96 +f 77/80/77 78/81/78 98/102/98 97/101/97 +f 78/81/78 79/82/79 99/103/99 98/102/98 +f 79/82/79 80/83/80 100/104/100 99/103/99 +f 80/83/80 61/84/62 81/105/82 100/104/100 +f 81/85/82 82/86/81 102/107/101 101/106/102 +f 82/86/81 83/87/83 103/108/103 102/107/101 +f 83/87/83 84/88/84 104/109/104 103/108/103 +f 84/88/84 85/89/85 105/110/105 104/109/104 +f 85/89/85 86/90/86 106/111/106 105/110/105 +f 86/90/86 87/91/87 107/112/107 106/111/106 +f 87/91/87 88/92/88 108/113/108 107/112/107 +f 88/92/88 89/93/89 109/114/109 108/113/108 +f 89/93/89 90/94/90 110/115/110 109/114/109 +f 90/94/90 91/95/91 111/116/111 110/115/110 +f 91/95/91 92/96/92 112/117/112 111/116/111 +f 92/96/92 93/97/93 113/118/113 112/117/112 +f 93/97/93 94/98/94 114/119/114 113/118/113 +f 94/98/94 95/99/95 115/120/115 114/119/114 +f 95/99/95 96/100/96 116/121/116 115/120/115 +f 96/100/96 97/101/97 117/122/117 116/121/116 +f 97/101/97 98/102/98 118/123/118 117/122/117 +f 98/102/98 99/103/99 119/124/119 118/123/118 +f 99/103/99 100/104/100 120/125/120 119/124/119 +f 100/104/100 81/105/82 101/126/102 120/125/120 +f 101/106/102 102/107/101 122/128/121 121/127/122 +f 102/107/101 103/108/103 123/129/123 122/128/121 +f 103/108/103 104/109/104 124/130/124 123/129/123 +f 104/109/104 105/110/105 125/131/125 124/130/124 +f 105/110/105 106/111/106 126/132/126 125/131/125 +f 106/111/106 107/112/107 127/133/127 126/132/126 +f 107/112/107 108/113/108 128/134/128 127/133/127 +f 108/113/108 109/114/109 129/135/129 128/134/128 +f 109/114/109 110/115/110 130/136/130 129/135/129 +f 110/115/110 111/116/111 131/137/131 130/136/130 +f 111/116/111 112/117/112 132/138/132 131/137/131 +f 112/117/112 113/118/113 133/139/133 132/138/132 +f 113/118/113 114/119/114 134/140/134 133/139/133 +f 114/119/114 115/120/115 135/141/135 134/140/134 +f 115/120/115 116/121/116 136/142/136 135/141/135 +f 116/121/116 117/122/117 137/143/137 136/142/136 +f 117/122/117 118/123/118 138/144/138 137/143/137 +f 118/123/118 119/124/119 139/145/139 138/144/138 +f 119/124/119 120/125/120 140/146/140 139/145/139 +f 120/125/120 101/126/102 121/147/122 140/146/140 +f 121/127/122 122/128/121 142/149/141 141/148/142 +f 122/128/121 123/129/123 143/150/143 142/149/141 +f 123/129/123 124/130/124 144/151/144 143/150/143 +f 124/130/124 125/131/125 145/152/145 144/151/144 +f 125/131/125 126/132/126 146/153/146 145/152/145 +f 126/132/126 127/133/127 147/154/147 146/153/146 +f 127/133/127 128/134/128 148/155/148 147/154/147 +f 128/134/128 129/135/129 149/156/149 148/155/148 +f 129/135/129 130/136/130 150/157/150 149/156/149 +f 130/136/130 131/137/131 151/158/151 150/157/150 +f 131/137/131 132/138/132 152/159/152 151/158/151 +f 132/138/132 133/139/133 153/160/153 152/159/152 +f 133/139/133 134/140/134 154/161/154 153/160/153 +f 134/140/134 135/141/135 155/162/155 154/161/154 +f 135/141/135 136/142/136 156/163/156 155/162/155 +f 136/142/136 137/143/137 157/164/157 156/163/156 +f 137/143/137 138/144/138 158/165/158 157/164/157 +f 138/144/138 139/145/139 159/166/159 158/165/158 +f 139/145/139 140/146/140 160/167/160 159/166/159 +f 140/146/140 121/147/122 141/168/142 160/167/160 +f 141/148/142 142/149/141 162/170/161 161/169/162 +f 142/149/141 143/150/143 163/171/163 162/170/161 +f 143/150/143 144/151/144 164/172/164 163/171/163 +f 144/151/144 145/152/145 165/173/165 164/172/164 +f 145/152/145 146/153/146 166/174/166 165/173/165 +f 146/153/146 147/154/147 167/175/167 166/174/166 +f 147/154/147 148/155/148 168/176/168 167/175/167 +f 148/155/148 149/156/149 169/177/169 168/176/168 +f 149/156/149 150/157/150 170/178/170 169/177/169 +f 150/157/150 151/158/151 171/179/171 170/178/170 +f 151/158/151 152/159/152 172/180/172 171/179/171 +f 152/159/152 153/160/153 173/181/173 172/180/172 +f 153/160/153 154/161/154 174/182/174 173/181/173 +f 154/161/154 155/162/155 175/183/175 174/182/174 +f 155/162/155 156/163/156 176/184/176 175/183/175 +f 156/163/156 157/164/157 177/185/177 176/184/176 +f 157/164/157 158/165/158 178/186/178 177/185/177 +f 158/165/158 159/166/159 179/187/179 178/186/178 +f 159/166/159 160/167/160 180/188/180 179/187/179 +f 160/167/160 141/168/142 161/189/162 180/188/180 +f 161/169/162 162/170/161 182/191/181 181/190/182 +f 162/170/161 163/171/163 183/192/183 182/191/181 +f 163/171/163 164/172/164 184/193/184 183/192/183 +f 164/172/164 165/173/165 185/194/185 184/193/184 +f 165/173/165 166/174/166 186/195/186 185/194/185 +f 166/174/166 167/175/167 187/196/187 186/195/186 +f 167/175/167 168/176/168 188/197/188 187/196/187 +f 168/176/168 169/177/169 189/198/189 188/197/188 +f 169/177/169 170/178/170 190/199/190 189/198/189 +f 170/178/170 171/179/171 191/200/191 190/199/190 +f 171/179/171 172/180/172 192/201/192 191/200/191 +f 172/180/172 173/181/173 193/202/193 192/201/192 +f 173/181/173 174/182/174 194/203/194 193/202/193 +f 174/182/174 175/183/175 195/204/195 194/203/194 +f 175/183/175 176/184/176 196/205/196 195/204/195 +f 176/184/176 177/185/177 197/206/197 196/205/196 +f 177/185/177 178/186/178 198/207/198 197/206/197 +f 178/186/178 179/187/179 199/208/199 198/207/198 +f 179/187/179 180/188/180 200/209/200 199/208/199 +f 180/188/180 161/189/162 181/210/182 200/209/200 +f 181/190/182 182/191/181 202/212/201 201/211/202 +f 182/191/181 183/192/183 203/213/203 202/212/201 +f 183/192/183 184/193/184 204/214/204 203/213/203 +f 184/193/184 185/194/185 205/215/205 204/214/204 +f 185/194/185 186/195/186 206/216/206 205/215/205 +f 186/195/186 187/196/187 207/217/207 206/216/206 +f 187/196/187 188/197/188 208/218/208 207/217/207 +f 188/197/188 189/198/189 209/219/209 208/218/208 +f 189/198/189 190/199/190 210/220/210 209/219/209 +f 190/199/190 191/200/191 211/221/211 210/220/210 +f 191/200/191 192/201/192 212/222/212 211/221/211 +f 192/201/192 193/202/193 213/223/213 212/222/212 +f 193/202/193 194/203/194 214/224/214 213/223/213 +f 194/203/194 195/204/195 215/225/215 214/224/214 +f 195/204/195 196/205/196 216/226/216 215/225/215 +f 196/205/196 197/206/197 217/227/217 216/226/216 +f 197/206/197 198/207/198 218/228/218 217/227/217 +f 198/207/198 199/208/199 219/229/219 218/228/218 +f 199/208/199 200/209/200 220/230/220 219/229/219 +f 200/209/200 181/210/182 201/231/202 220/230/220 +f 201/211/202 202/212/201 222/233/221 221/232/222 +f 202/212/201 203/213/203 223/234/223 222/233/221 +f 203/213/203 204/214/204 224/235/224 223/234/223 +f 204/214/204 205/215/205 225/236/225 224/235/224 +f 205/215/205 206/216/206 226/237/226 225/236/225 +f 206/216/206 207/217/207 227/238/227 226/237/226 +f 207/217/207 208/218/208 228/239/228 227/238/227 +f 208/218/208 209/219/209 229/240/229 228/239/228 +f 209/219/209 210/220/210 230/241/230 229/240/229 +f 210/220/210 211/221/211 231/242/231 230/241/230 +f 211/221/211 212/222/212 232/243/232 231/242/231 +f 212/222/212 213/223/213 233/244/233 232/243/232 +f 213/223/213 214/224/214 234/245/234 233/244/233 +f 214/224/214 215/225/215 235/246/235 234/245/234 +f 215/225/215 216/226/216 236/247/236 235/246/235 +f 216/226/216 217/227/217 237/248/237 236/247/236 +f 217/227/217 218/228/218 238/249/238 237/248/237 +f 218/228/218 219/229/219 239/250/239 238/249/238 +f 219/229/219 220/230/220 240/251/240 239/250/239 +f 220/230/220 201/231/202 221/252/222 240/251/240 +f 221/232/222 222/233/221 242/254/241 241/253/242 +f 222/233/221 223/234/223 243/255/243 242/254/241 +f 223/234/223 224/235/224 244/256/244 243/255/243 +f 224/235/224 225/236/225 245/257/245 244/256/244 +f 225/236/225 226/237/226 246/258/246 245/257/245 +f 226/237/226 227/238/227 247/259/247 246/258/246 +f 227/238/227 228/239/228 248/260/248 247/259/247 +f 228/239/228 229/240/229 249/261/249 248/260/248 +f 229/240/229 230/241/230 250/262/250 249/261/249 +f 230/241/230 231/242/231 251/263/251 250/262/250 +f 231/242/231 232/243/232 252/264/252 251/263/251 +f 232/243/232 233/244/233 253/265/253 252/264/252 +f 233/244/233 234/245/234 254/266/254 253/265/253 +f 234/245/234 235/246/235 255/267/255 254/266/254 +f 235/246/235 236/247/236 256/268/256 255/267/255 +f 236/247/236 237/248/237 257/269/257 256/268/256 +f 237/248/237 238/249/238 258/270/258 257/269/257 +f 238/249/238 239/250/239 259/271/259 258/270/258 +f 239/250/239 240/251/240 260/272/260 259/271/259 +f 240/251/240 221/252/222 241/273/242 260/272/260 +f 241/253/242 242/254/241 262/275/261 261/274/262 +f 242/254/241 243/255/243 263/276/263 262/275/261 +f 243/255/243 244/256/244 264/277/264 263/276/263 +f 244/256/244 245/257/245 265/278/265 264/277/264 +f 245/257/245 246/258/246 266/279/266 265/278/265 +f 246/258/246 247/259/247 267/280/267 266/279/266 +f 247/259/247 248/260/248 268/281/268 267/280/267 +f 248/260/248 249/261/249 269/282/269 268/281/268 +f 249/261/249 250/262/250 270/283/270 269/282/269 +f 250/262/250 251/263/251 271/284/271 270/283/270 +f 251/263/251 252/264/252 272/285/272 271/284/271 +f 252/264/252 253/265/253 273/286/273 272/285/272 +f 253/265/253 254/266/254 274/287/274 273/286/273 +f 254/266/254 255/267/255 275/288/275 274/287/274 +f 255/267/255 256/268/256 276/289/276 275/288/275 +f 256/268/256 257/269/257 277/290/277 276/289/276 +f 257/269/257 258/270/258 278/291/278 277/290/277 +f 258/270/258 259/271/259 279/292/279 278/291/278 +f 259/271/259 260/272/260 280/293/280 279/292/279 +f 260/272/260 241/273/242 261/294/262 280/293/280 +f 261/274/262 262/275/261 282/296/281 281/295/282 +f 262/275/261 263/276/263 283/297/283 282/296/281 +f 263/276/263 264/277/264 284/298/284 283/297/283 +f 264/277/264 265/278/265 285/299/285 284/298/284 +f 265/278/265 266/279/266 286/300/286 285/299/285 +f 266/279/266 267/280/267 287/301/287 286/300/286 +f 267/280/267 268/281/268 288/302/288 287/301/287 +f 268/281/268 269/282/269 289/303/289 288/302/288 +f 269/282/269 270/283/270 290/304/290 289/303/289 +f 270/283/270 271/284/271 291/305/291 290/304/290 +f 271/284/271 272/285/272 292/306/292 291/305/291 +f 272/285/272 273/286/273 293/307/293 292/306/292 +f 273/286/273 274/287/274 294/308/294 293/307/293 +f 274/287/274 275/288/275 295/309/295 294/308/294 +f 275/288/275 276/289/276 296/310/296 295/309/295 +f 276/289/276 277/290/277 297/311/297 296/310/296 +f 277/290/277 278/291/278 298/312/298 297/311/297 +f 278/291/278 279/292/279 299/313/299 298/312/298 +f 279/292/279 280/293/280 300/314/300 299/313/299 +f 280/293/280 261/294/262 281/315/282 300/314/300 +f 281/295/282 282/296/281 302/317/301 301/316/302 +f 282/296/281 283/297/283 303/318/303 302/317/301 +f 283/297/283 284/298/284 304/319/304 303/318/303 +f 284/298/284 285/299/285 305/320/305 304/319/304 +f 285/299/285 286/300/286 306/321/306 305/320/305 +f 286/300/286 287/301/287 307/322/307 306/321/306 +f 287/301/287 288/302/288 308/323/308 307/322/307 +f 288/302/288 289/303/289 309/324/309 308/323/308 +f 289/303/289 290/304/290 310/325/310 309/324/309 +f 290/304/290 291/305/291 311/326/311 310/325/310 +f 291/305/291 292/306/292 312/327/312 311/326/311 +f 292/306/292 293/307/293 313/328/313 312/327/312 +f 293/307/293 294/308/294 314/329/314 313/328/313 +f 294/308/294 295/309/295 315/330/315 314/329/314 +f 295/309/295 296/310/296 316/331/316 315/330/315 +f 296/310/296 297/311/297 317/332/317 316/331/316 +f 297/311/297 298/312/298 318/333/318 317/332/317 +f 298/312/298 299/313/299 319/334/319 318/333/318 +f 299/313/299 300/314/300 320/335/320 319/334/319 +f 300/314/300 281/315/282 301/336/302 320/335/320 +f 301/316/302 302/317/301 322/338/321 321/337/322 +f 302/317/301 303/318/303 323/339/323 322/338/321 +f 303/318/303 304/319/304 324/340/324 323/339/323 +f 304/319/304 305/320/305 325/341/325 324/340/324 +f 305/320/305 306/321/306 326/342/326 325/341/325 +f 306/321/306 307/322/307 327/343/327 326/342/326 +f 307/322/307 308/323/308 328/344/328 327/343/327 +f 308/323/308 309/324/309 329/345/329 328/344/328 +f 309/324/309 310/325/310 330/346/330 329/345/329 +f 310/325/310 311/326/311 331/347/331 330/346/330 +f 311/326/311 312/327/312 332/348/332 331/347/331 +f 312/327/312 313/328/313 333/349/333 332/348/332 +f 313/328/313 314/329/314 334/350/334 333/349/333 +f 314/329/314 315/330/315 335/351/335 334/350/334 +f 315/330/315 316/331/316 336/352/336 335/351/335 +f 316/331/316 317/332/317 337/353/337 336/352/336 +f 317/332/317 318/333/318 338/354/338 337/353/337 +f 318/333/318 319/334/319 339/355/339 338/354/338 +f 319/334/319 320/335/320 340/356/340 339/355/339 +f 320/335/320 301/336/302 321/357/322 340/356/340 +f 321/337/322 322/338/321 342/359/341 341/358/342 +f 322/338/321 323/339/323 343/360/343 342/359/341 +f 323/339/323 324/340/324 344/361/344 343/360/343 +f 324/340/324 325/341/325 345/362/345 344/361/344 +f 325/341/325 326/342/326 346/363/346 345/362/345 +f 326/342/326 327/343/327 347/364/347 346/363/346 +f 327/343/327 328/344/328 348/365/348 347/364/347 +f 328/344/328 329/345/329 349/366/349 348/365/348 +f 329/345/329 330/346/330 350/367/350 349/366/349 +f 330/346/330 331/347/331 351/368/351 350/367/350 +f 331/347/331 332/348/332 352/369/352 351/368/351 +f 332/348/332 333/349/333 353/370/353 352/369/352 +f 333/349/333 334/350/334 354/371/354 353/370/353 +f 334/350/334 335/351/335 355/372/355 354/371/354 +f 335/351/335 336/352/336 356/373/356 355/372/355 +f 336/352/336 337/353/337 357/374/357 356/373/356 +f 337/353/337 338/354/338 358/375/358 357/374/357 +f 338/354/338 339/355/339 359/376/359 358/375/358 +f 339/355/339 340/356/340 360/377/360 359/376/359 +f 340/356/340 321/357/322 341/378/342 360/377/360 +f 341/358/342 342/359/341 362/380/361 361/379/362 +f 342/359/341 343/360/343 363/381/363 362/380/361 +f 343/360/343 344/361/344 364/382/364 363/381/363 +f 344/361/344 345/362/345 365/383/365 364/382/364 +f 345/362/345 346/363/346 366/384/366 365/383/365 +f 346/363/346 347/364/347 367/385/367 366/384/366 +f 347/364/347 348/365/348 368/386/368 367/385/367 +f 348/365/348 349/366/349 369/387/369 368/386/368 +f 349/366/349 350/367/350 370/388/370 369/387/369 +f 350/367/350 351/368/351 371/389/371 370/388/370 +f 351/368/351 352/369/352 372/390/372 371/389/371 +f 352/369/352 353/370/353 373/391/373 372/390/372 +f 353/370/353 354/371/354 374/392/374 373/391/373 +f 354/371/354 355/372/355 375/393/375 374/392/374 +f 355/372/355 356/373/356 376/394/376 375/393/375 +f 356/373/356 357/374/357 377/395/377 376/394/376 +f 357/374/357 358/375/358 378/396/378 377/395/377 +f 358/375/358 359/376/359 379/397/379 378/396/378 +f 359/376/359 360/377/360 380/398/380 379/397/379 +f 360/377/360 341/378/342 361/399/362 380/398/380 +f 2/2/2 1/1/1 381/400/381 +f 3/3/5 2/2/2 381/401/381 +f 4/4/7 3/3/5 381/402/381 +f 5/5/9 4/4/7 381/403/381 +f 6/6/11 5/5/9 381/404/381 +f 7/7/13 6/6/11 381/405/381 +f 8/8/15 7/7/13 381/406/381 +f 9/9/17 8/8/15 381/407/381 +f 10/10/19 9/9/17 381/408/381 +f 11/11/21 10/10/19 381/409/381 +f 12/12/23 11/11/21 381/410/381 +f 13/13/25 12/12/23 381/411/381 +f 14/14/27 13/13/25 381/412/381 +f 15/15/29 14/14/27 381/413/381 +f 16/16/31 15/15/29 381/414/381 +f 17/17/33 16/16/31 381/415/381 +f 18/18/35 17/17/33 381/416/381 +f 19/19/37 18/18/35 381/417/381 +f 20/20/39 19/19/37 381/418/381 +f 1/21/1 20/20/39 381/419/381 +f 361/379/362 362/380/361 382/420/382 +f 362/380/361 363/381/363 382/421/382 +f 363/381/363 364/382/364 382/422/382 +f 364/382/364 365/383/365 382/423/382 +f 365/383/365 366/384/366 382/424/382 +f 366/384/366 367/385/367 382/425/382 +f 367/385/367 368/386/368 382/426/382 +f 368/386/368 369/387/369 382/427/382 +f 369/387/369 370/388/370 382/428/382 +f 370/388/370 371/389/371 382/429/382 +f 371/389/371 372/390/372 382/430/382 +f 372/390/372 373/391/373 382/431/382 +f 373/391/373 374/392/374 382/432/382 +f 374/392/374 375/393/375 382/433/382 +f 375/393/375 376/394/376 382/434/382 +f 376/394/376 377/395/377 382/435/382 +f 377/395/377 378/396/378 382/436/382 +f 378/396/378 379/397/379 382/437/382 +f 379/397/379 380/398/380 382/438/382 +f 380/398/380 361/399/362 382/439/382