├── .DS_Store ├── .gitignore ├── .vscode └── settings.json ├── README.md ├── docs ├── index.css ├── index.html ├── index.js └── mathquill │ ├── font │ └── Symbola.woff2 │ ├── mathquill.css │ ├── mathquill.js │ └── mathquill.min.js ├── lispsmos-experiments ├── .DS_Store ├── .gitignore ├── .vscode │ └── settings.json ├── 4d-minecraft │ ├── .DS_Store │ ├── lispsmos │ │ └── main.lisp │ ├── package.json │ ├── src │ │ ├── file-server.mts │ │ └── index.ts │ └── tsconfig.json ├── common │ └── common.ts ├── package-lock.json ├── package.json ├── ptgi │ ├── .DS_Store │ ├── assets │ │ ├── demo.blend │ │ ├── demo.blend1 │ │ ├── untitled.mtl │ │ └── untitled.obj │ ├── lispsmos-src │ │ ├── binary-decode.lisp │ │ └── main.lisp │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── exec-if.ts │ │ ├── file-server.mts │ │ └── index.ts │ ├── stuff-that-is-no-longer-useful │ │ └── flatmap.ts │ ├── test.json │ └── tsconfig.json └── sample │ └── index.mjs ├── module ├── .DS_Store ├── .npmignore ├── dist │ └── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── builtins.ts │ ├── compiler-utils.ts │ ├── compiler.ts │ ├── expression-compiler.ts │ ├── graphics-macros.ts │ ├── index.ts │ ├── procedural-macros.ts │ └── utility-macros.ts └── tsconfig.json ├── racket-impl ├── .DS_Store ├── casted-shadows │ ├── casted-shadows-v2.rkt │ ├── casted-shadows-v3.rkt │ ├── casted-shadows.rkt │ ├── mirrors.mtl │ ├── mirrors.obj │ ├── mirrors.rkt │ ├── scene.blend │ ├── scene.blend1 │ ├── scene.mtl │ ├── scene.obj │ ├── scene2.mtl │ ├── scene2.obj │ ├── scene3.mtl │ ├── scene3.obj │ ├── triangle-intersect-test.rkt │ └── triangle-intersect.rkt ├── desmOS │ ├── desmOS-asm-compiler.rkt │ ├── desmOS.rkt │ └── test.desmossembly ├── lispsmos-racket │ ├── builtins.rkt │ ├── expression-compiler.rkt │ ├── lispsmos-3d.rkt │ ├── lispsmos.rkt │ └── obj-parser.rkt ├── minecraft │ ├── .DS_Store │ ├── assets │ │ └── texture.png │ └── src │ │ ├── image-helpers.rkt │ │ ├── main.rkt │ │ ├── test.json │ │ └── ts │ │ ├── dist │ │ ├── image-edge.js │ │ ├── image-edge.mjs │ │ ├── index.js │ │ └── index.mjs │ │ ├── package.json │ │ ├── src │ │ ├── image-edge.mts │ │ └── index.mts │ │ └── tsconfig.json ├── pixel-grid-raytracer │ ├── assets │ │ ├── ball.mtl │ │ ├── ball.obj │ │ ├── ball2.mtl │ │ ├── ball2.obj │ │ ├── bright_ball.mtl │ │ ├── bright_ball.obj │ │ ├── diamonds.mtl │ │ ├── diamonds.obj │ │ ├── emission-map.png │ │ ├── grass_block.webp │ │ ├── icosahedron.mtl │ │ ├── icosahedron.obj │ │ ├── icosahedron2.mtl │ │ ├── icosahedron2.obj │ │ ├── minecraft.mtl │ │ ├── minecraft.obj │ │ ├── red_green_cube_complex.mtl │ │ ├── red_green_cube_complex.obj │ │ ├── red_green_cube_complex_optimized.mtl │ │ ├── red_green_cube_complex_optimized.obj │ │ ├── red_green_cube_complexer.mtl │ │ ├── red_green_cube_complexer.obj │ │ ├── red_green_cube_complexish.mtl │ │ ├── red_green_cube_complexish.obj │ │ ├── red_green_cube_simple.mtl │ │ ├── red_green_cube_simple.obj │ │ ├── terrain.png │ │ ├── terrain.webp │ │ ├── terrain2.png │ │ ├── text.mtl │ │ ├── text.obj │ │ ├── text2.mtl │ │ ├── text2.obj │ │ ├── texture-mapping-test-2.mtl │ │ ├── texture-mapping-test-2.obj │ │ ├── texture-mapping-test.mtl │ │ └── texture-mapping-test.obj │ ├── diffuse-map.png │ ├── emissive-map.png │ ├── pixel-grid-raytracer.rkt │ ├── specular-map.png │ └── specular-roughness-map.png └── test-lispsmos.rkt └── test ├── .DS_Store ├── .gitignore ├── balls.lisp ├── desmos-plane-2 ├── .DS_Store ├── assets │ ├── .gitignore │ ├── Camera.ply │ ├── Light.ply │ ├── better_airplane.ply │ ├── better_assets.blend │ ├── better_assets.blend1 │ ├── blank-image.jpg │ ├── canyon_1.ply │ ├── canyon_10.ply │ ├── canyon_10_viewbox.ply │ ├── canyon_11.ply │ ├── canyon_11_viewbox.ply │ ├── canyon_12.ply │ ├── canyon_12_viewbox.ply │ ├── canyon_13.ply │ ├── canyon_13_viewbox.ply │ ├── canyon_14.ply │ ├── canyon_14_viewbox.ply │ ├── canyon_15.ply │ ├── canyon_15_viewbox.ply │ ├── canyon_16.ply │ ├── canyon_16_viewbox.ply │ ├── canyon_17.ply │ ├── canyon_17_viewbox.ply │ ├── canyon_18.ply │ ├── canyon_18_viewbox.ply │ ├── canyon_19.ply │ ├── canyon_19_viewbox.001.ply │ ├── canyon_19_viewbox.ply │ ├── canyon_1_viewbox.ply │ ├── canyon_2.ply │ ├── canyon_20.ply │ ├── canyon_20_viewbox.ply │ ├── canyon_21.ply │ ├── canyon_21_viewbox.ply │ ├── canyon_22.ply │ ├── canyon_22_viewbox.ply │ ├── canyon_23.ply │ ├── canyon_23_viewbox.ply │ ├── canyon_24.ply │ ├── canyon_24_viewbox.ply │ ├── canyon_25.ply │ ├── canyon_25_viewbox.ply │ ├── canyon_26.ply │ ├── canyon_26_viewbox.ply │ ├── canyon_2_viewbox.ply │ ├── canyon_3.ply │ ├── canyon_3_viewbox.ply │ ├── canyon_4.ply │ ├── canyon_4_viewbox.ply │ ├── canyon_5.ply │ ├── canyon_5_viewbox.ply │ ├── canyon_6.ply │ ├── canyon_6_viewbox.ply │ ├── canyon_7.ply │ ├── canyon_7_viewbox.ply │ ├── canyon_8.ply │ ├── canyon_8_viewbox.ply │ ├── canyon_9.001.ply │ ├── canyon_9.ply │ ├── canyon_9_viewbox.ply │ ├── checkpoint_1_collider.ply │ ├── checkpoint_1_location.ply │ ├── checkpoint_1_velocity.ply │ ├── checkpoint_2_collider.ply │ ├── checkpoint_2_location.ply │ ├── checkpoint_2_velocity.ply │ ├── checkpoint_3_collider.ply │ ├── checkpoint_3_location.ply │ ├── checkpoint_3_velocity.ply │ ├── checkpoint_4_collider.ply │ ├── checkpoint_4_location.ply │ ├── checkpoint_4_velocity.ply │ ├── checkpoint_5_collider.ply │ ├── checkpoint_5_location.ply │ ├── checkpoint_5_velocity.ply │ ├── checkpoint_6_collider.ply │ ├── checkpoint_6_location.ply │ ├── checkpoint_6_velocity.ply │ ├── even_better_assets.blend │ ├── even_better_assets.blend1 │ ├── light_1.ply │ ├── light_2.ply │ ├── light_3.ply │ ├── menu_scene.001.ply │ ├── menu_scene.ply │ ├── menu_scene_viewbox.ply │ ├── star.ply │ ├── star_1_location.ply │ ├── star_1_viewbox.ply │ ├── star_2_location.ply │ ├── star_2_viewbox.ply │ ├── sun_occluder_1.ply │ ├── tall_house.ply │ ├── tree.ply │ ├── triangle.ply │ ├── yet_even_better_assets.blend │ └── yet_even_better_assets.blend1 ├── better_airplane.ply ├── canyon_1.ply ├── canyon_2.ply ├── dummy-expression-perf.lisp ├── fast-exporter │ └── ply-export-utility.py ├── import-helpers.lisp ├── linalg.lisp ├── main-minimal.lisp ├── main-performance.lisp ├── main.lisp ├── test.tex └── yeeg2.ply ├── desmos-plane ├── .DS_Store ├── 3d-utility-macros.lisp ├── assets.blend ├── assets.blend1 ├── assets │ ├── .gitignore │ ├── Camera.ply │ ├── Light.ply │ ├── better_airplane.ply │ ├── better_assets.blend │ ├── better_assets.blend1 │ ├── canyon_1.ply │ ├── canyon_1_viewbox.ply │ ├── canyon_2.ply │ ├── canyon_2_viewbox.ply │ ├── canyon_3.ply │ ├── canyon_3_viewbox.ply │ ├── canyon_4.ply │ ├── canyon_4_viewbox.ply │ ├── canyon_5.ply │ ├── canyon_5_viewbox.ply │ ├── canyon_6.ply │ ├── canyon_6_viewbox.ply │ ├── canyon_7.ply │ ├── canyon_7_viewbox.ply │ ├── canyon_8.ply │ ├── canyon_8_viewbox.ply │ ├── canyon_9.ply │ ├── canyon_9_viewbox.ply │ ├── checkpoint_2_collider.ply │ ├── checkpoint_2_location.ply │ ├── checkpoint_2_velocity.ply │ ├── checkpoint_3_collider.ply │ ├── checkpoint_3_location.ply │ ├── checkpoint_3_velocity.ply │ ├── menu_scene.001.ply │ ├── menu_scene.ply │ ├── menu_scene_viewbox.ply │ ├── star.ply │ ├── star_1_location.ply │ ├── star_1_viewbox.ply │ ├── star_2_location.ply │ ├── star_2_viewbox.ply │ ├── sun_occluder_1.ply │ └── triangle.ply ├── fast-exporter │ └── ply-export-utility.py ├── graphics-library.lisp ├── gui.lisp ├── import-helpers.lisp ├── linear-algebra.lisp ├── main-NUMBERMATRICES.lisp ├── main-RENDERPROXYBACKUP.lisp ├── main.lisp ├── perftest.lisp └── test.js ├── desmos-racer ├── .DS_Store ├── assets │ ├── Camera.ply │ ├── Light.ply │ ├── better_airplane.ply │ ├── better_assets.blend │ ├── better_assets.blend1 │ ├── canyon_1.ply │ ├── canyon_1_viewbox.ply │ ├── canyon_2.ply │ ├── canyon_2_viewbox.ply │ ├── canyon_3.ply │ ├── canyon_3_viewbox.ply │ ├── canyon_4.ply │ ├── canyon_4_viewbox.ply │ ├── canyon_5.ply │ ├── canyon_5_viewbox.ply │ ├── canyon_6.ply │ ├── canyon_6_viewbox.ply │ ├── canyon_7.ply │ ├── canyon_7_viewbox.ply │ ├── canyon_8.ply │ ├── canyon_8_viewbox.ply │ ├── canyon_9.ply │ ├── canyon_9_viewbox.ply │ ├── checkpoint_1_collider.ply │ ├── checkpoint_1_location.ply │ ├── checkpoint_1_velocity.ply │ ├── checkpoint_2_collider.ply │ ├── checkpoint_2_location.ply │ ├── checkpoint_2_velocity.ply │ ├── checkpoint_3_collider.ply │ ├── checkpoint_3_location.ply │ ├── checkpoint_3_velocity.ply │ ├── even_better_assets.blend │ ├── even_better_assets.blend1 │ ├── light_1.ply │ ├── light_2.ply │ ├── menu_scene.001.ply │ ├── menu_scene.ply │ ├── menu_scene_viewbox.ply │ ├── star.ply │ ├── star_1_location.ply │ ├── star_1_viewbox.ply │ ├── star_2_location.ply │ ├── star_2_viewbox.ply │ ├── sun_occluder_1.ply │ ├── tree.ply │ └── triangle.ply ├── fast-exporter │ └── ply-export-utility.py ├── import-helpers.lisp ├── linalg.lisp ├── main-minimal.lisp ├── main-performance.lisp ├── main.lisp ├── test.tex └── yeeg2.ply ├── file-server.mjs ├── index.mjs ├── internal ├── 3dproj.json ├── 3dproj.lisp ├── old │ ├── another-test.lisp │ ├── cg3d-2.lisp │ ├── cg3d-2.tex │ ├── chaos-game-3d.lisp │ ├── chaos-game-3d.tex │ ├── comprehension.json │ ├── comprehension.lisp │ ├── desmos.tex │ ├── getstate-reverse-engineering.json │ ├── iftest.lisp │ ├── iftest.tex │ ├── main-BACKUP2.lisp │ ├── main-OLDVERSION.lisp │ ├── main_withlightingcode.lisp │ ├── old-overlap-code.lisp │ ├── pool.json │ ├── pool.lisp │ ├── pool.tex │ ├── sample.json │ ├── test-include.lisp │ ├── while.lisp │ └── while.tex ├── procedure2.json └── procedure2.lisp ├── me-when-no-desmos-recursion.lisp ├── multilayer-function.lisp ├── package-lock.json ├── package.json └── quadtree.lisp /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Dependency directories 20 | node_modules/ 21 | jspm_packages/ 22 | 23 | # TypeScript cache 24 | *.tsbuildinfo 25 | 26 | # Optional npm cache directory 27 | .npm 28 | 29 | # Optional REPL history 30 | .node_repl_history 31 | 32 | # Output of 'npm pack' 33 | *.tgz 34 | 35 | # dotenv environment variables file 36 | .env 37 | .env.test 38 | .env.production 39 | 40 | # Stores VSCode versions used for testing VSCode extensions 41 | .vscode-test 42 | 43 | vscode-extension -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /docs/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | line-height: 1.4; 4 | background: #000000; 5 | color: #FFFFFF; 6 | margin: 0px; 7 | } 8 | 9 | button { 10 | background: #333333; 11 | color: white; 12 | } 13 | 14 | a { 15 | color: #bed3f2; 16 | } 17 | a:visited { 18 | color: #d4b9ff; 19 | } 20 | 21 | 22 | code, pre { 23 | background: #333333; 24 | border-radius: 5px; 25 | padding: 2px; 26 | } 27 | 28 | h1 { 29 | text-align: center; 30 | } 31 | 32 | nav { 33 | position: fixed; 34 | top: 10px; 35 | left: 10px; 36 | } 37 | 38 | table, th, td { 39 | border: 1px solid #444444; 40 | border-collapse: collapse; 41 | } 42 | 43 | table { 44 | margin: auto; 45 | } 46 | 47 | td { 48 | text-align: left; 49 | } 50 | 51 | td code { 52 | margin: 2px; 53 | } 54 | 55 | .block-code { 56 | display: block; 57 | } 58 | 59 | .collapser { 60 | width: 100%; 61 | border: none; 62 | border-radius: 5px; 63 | background: #222222; 64 | text-align: left; 65 | font-size: 1em; 66 | font-weight: bold; 67 | } 68 | 69 | .equation { 70 | color: white; 71 | border-color: #333333; 72 | border-radius: 5px; 73 | } 74 | 75 | .equation * { 76 | border-color: white; 77 | } 78 | 79 | 80 | 81 | .collapsible p { 82 | width: 85%; 83 | margin-left: 8%; 84 | } 85 | 86 | h3 { 87 | margin-left: 4%; 88 | } 89 | 90 | section { 91 | width: 60%; 92 | margin: auto; 93 | margin-bottom: 15px; 94 | } 95 | 96 | section:nth-child(2n) { 97 | background: #181818; 98 | border-radius: 5px; 99 | } 100 | section:nth-child(2n+1) { 101 | background: #0b0b0b; 102 | border-radius: 5px; 103 | } 104 | 105 | h2 { 106 | margin-top: 0; 107 | } 108 | 109 | .standalone-code-block { 110 | margin: auto; 111 | width: 75%; 112 | margin-top: 25px; 113 | margin-bottom: 25px; 114 | } -------------------------------------------------------------------------------- /docs/index.js: -------------------------------------------------------------------------------- 1 | 2 | let MQ = MathQuill.getInterface(2); 3 | 4 | Array.from(document.querySelectorAll(".equation")).forEach(eqn => { 5 | let content = eqn.innerText; 6 | let mathField = MQ.MathField(eqn, { 7 | //autoOperatorNames: "pi theta" 8 | //spaceBehavesLikeTab: true, // configurable 9 | // handlers: { 10 | // edit: function() { // useful event handlers 11 | // latexSpan.textContent = mathField.latex(); // simple API 12 | // } 13 | // } 14 | }); 15 | mathField.latex(content); 16 | }); 17 | 18 | Array.from(document.querySelectorAll(".collapsible")).forEach(div => { 19 | div.style.display = "none"; 20 | let collapser = document.createElement("button"); 21 | collapser.className = "collapser"; 22 | let expanded = false; 23 | collapser.onclick = () => { 24 | expanded = !expanded; 25 | if (expanded) { 26 | div.style.display = ""; 27 | collapser.style.background = "#363636"; 28 | } else { 29 | div.style.display = "none"; 30 | collapser.style.background = ""; 31 | } 32 | } 33 | let header = div.previousElementSibling; 34 | let headerText = header.innerText; 35 | header.innerText = ""; 36 | collapser.innerText = headerText; 37 | header.appendChild(collapser); 38 | }); 39 | 40 | document.getElementById("expand-all").onclick = function () { 41 | Array.from(document.querySelectorAll(".collapsible")).forEach(div => { 42 | div.style.display = ""; 43 | }); 44 | Array.from(document.querySelectorAll(".collapser")).forEach(collapser => { 45 | collapser.style.background = "#363636"; 46 | }); 47 | } 48 | document.getElementById("collapse-all").onclick = function () { 49 | Array.from(document.querySelectorAll(".collapsible")).forEach(div => { 50 | div.style.display = "none"; 51 | }); 52 | Array.from(document.querySelectorAll(".collapser")).forEach(collapser => { 53 | collapser.style.background = ""; 54 | }); 55 | } 56 | -------------------------------------------------------------------------------- /docs/mathquill/font/Symbola.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/docs/mathquill/font/Symbola.woff2 -------------------------------------------------------------------------------- /lispsmos-experiments/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/lispsmos-experiments/.DS_Store -------------------------------------------------------------------------------- /lispsmos-experiments/.gitignore: -------------------------------------------------------------------------------- 1 | dist/* -------------------------------------------------------------------------------- /lispsmos-experiments/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2 3 | } -------------------------------------------------------------------------------- /lispsmos-experiments/4d-minecraft/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/lispsmos-experiments/4d-minecraft/.DS_Store -------------------------------------------------------------------------------- /lispsmos-experiments/4d-minecraft/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "4d-minecraft", 3 | "version": "0.1.0", 4 | "description": "4d minecraft in desmos", 5 | "main": "file-server.mts", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "npx tsc --watch", 9 | "start": "node dist/file-server.mjs" 10 | }, 11 | "author": "radian628", 12 | "license": "MIT", 13 | "type": "module" 14 | } 15 | -------------------------------------------------------------------------------- /lispsmos-experiments/4d-minecraft/src/file-server.mts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs/promises"; 2 | import * as http from "http"; 3 | import * as path from "path"; 4 | //@ts-ignore 5 | import * as mime from "mime-types"; 6 | import * as build from "./index.js"; 7 | 8 | let server = http.createServer(async (req, res) => { 9 | res.setHeader("Access-Control-Allow-Origin", "*"); 10 | res.setHeader("Cross-Origin-Resource-Policy", "cross-origin"); 11 | res.setHeader("Content-Type", mime.lookup(req.url)); 12 | let url = req.url; 13 | if (url.match(/build$/g)) { 14 | res.end(JSON.stringify(await build.default())); 15 | return; 16 | } 17 | let fileLocation = path.join("../", url); 18 | fs.readFile(fileLocation) 19 | .then(file => { 20 | res.end(file); 21 | }) 22 | .catch(err => { 23 | res.statusCode = 404; 24 | res.end("Not found."); 25 | }); 26 | 27 | }); 28 | 29 | //@ts-ignore 30 | server.listen("8081", "localhost"); -------------------------------------------------------------------------------- /lispsmos-experiments/4d-minecraft/src/index.ts: -------------------------------------------------------------------------------- 1 | import { compiler, utilityMacros, compilerUtils } from "lispsmos"; 2 | //@ts-ignore 3 | import * as OBJFile from "obj-file-parser"; 4 | import * as fs from "node:fs/promises"; 5 | import * as path from "node:path"; 6 | import { fileURLToPath } from "node:url"; 7 | 8 | export default async function () { 9 | let lc = new compiler.LispsmosCompiler(); 10 | utilityMacros.register(lc); 11 | lc.registerImporter(async (lc, location) => { 12 | try { 13 | let sourceCode = await fs.readFile(location); 14 | return { payload: sourceCode.toString(), success: true }; 15 | } catch (err) { 16 | return { payload: undefined, success: false }; 17 | } 18 | }); 19 | let sourceCode = await fs.readFile(path.join(path.dirname(fileURLToPath(import.meta.url)), "../lispsmos/main.lisp")); 20 | let result = await lc.compile(sourceCode.toString()); 21 | return result; 22 | } -------------------------------------------------------------------------------- /lispsmos-experiments/4d-minecraft/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "es2020", 4 | "lib": ["es2015"], 5 | "noImplicitAny": true, 6 | "removeComments": true, 7 | "preserveConstEnums": true, 8 | "sourceMap": true, 9 | "declarationMap": true, 10 | "declaration": true, 11 | "outDir": "dist", 12 | "allowJs": true, 13 | "moduleResolution": "node", 14 | "types": ["node"], 15 | "downlevelIteration": true 16 | }, 17 | "include": ["src/"] 18 | } -------------------------------------------------------------------------------- /lispsmos-experiments/common/common.ts: -------------------------------------------------------------------------------- 1 | import { compilerUtils } from "lispsmos"; 2 | 3 | export function ensureArray(value: compilerUtils.ASTNode, msg: string): Array { 4 | if (!Array.isArray(value)) { 5 | throw msg; 6 | } 7 | return value; 8 | } 9 | export function ensureSymbol(value: compilerUtils.ASTNode, msg: string): string { 10 | if (Array.isArray(value)) { 11 | throw msg; 12 | } 13 | return value; 14 | } 15 | 16 | export function removeQuotes(str: string) { 17 | if (str.charAt(0) == "\"" && str.charAt(str.length - 1) == "\"") return str.slice(1, -1); 18 | return str; 19 | } 20 | export function noScientific(x: number) { 21 | return x.toLocaleString("fullwide", { useGrouping: false }); 22 | } 23 | 24 | export function findAndReplaceAST(original: compilerUtils.ASTNode, find: string, replace: compilerUtils.ASTNode): compilerUtils.ASTNode { 25 | if (Array.isArray(original)) { 26 | return original.map(child => findAndReplaceAST(child, find, replace)); 27 | } else { 28 | return (original == find) ? replace : original; 29 | } 30 | } -------------------------------------------------------------------------------- /lispsmos-experiments/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@types/node": "^17.0.15", 4 | "lispsmos": "file:../module", 5 | "mime-types": "^2.1.34", 6 | "typescript": "^4.5.5" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/lispsmos-experiments/ptgi/.DS_Store -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/assets/demo.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/lispsmos-experiments/ptgi/assets/demo.blend -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/assets/demo.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/lispsmos-experiments/ptgi/assets/demo.blend1 -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/assets/untitled.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'None' 2 | # Material Count: 2 3 | 4 | newmtl Material 5 | Ns 323.999994 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.205652 0.166288 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl Material.001 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.800000 0.800000 0.800000 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/assets/untitled.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.92.0 OBJ File: '' 2 | # www.blender.org 3 | mtllib untitled.mtl 4 | o Cube 5 | v 1.000000 1.000000 -1.000000 6 | v 1.000000 -1.000000 -1.000000 7 | v 1.000000 1.000000 1.000000 8 | v 1.000000 -1.000000 1.000000 9 | v -1.000000 1.000000 -1.000000 10 | v -1.000000 -1.000000 -1.000000 11 | v -1.000000 1.000000 1.000000 12 | v -1.000000 -1.000000 1.000000 13 | vt 0.625000 0.500000 14 | vt 0.875000 0.500000 15 | vt 0.875000 0.750000 16 | vt 0.625000 0.750000 17 | vt 0.375000 0.000000 18 | vt 0.625000 0.000000 19 | vt 0.625000 0.250000 20 | vt 0.375000 0.250000 21 | vt 0.375000 0.500000 22 | vt 0.375000 0.750000 23 | vt 0.625000 1.000000 24 | vt 0.375000 1.000000 25 | vt 0.125000 0.500000 26 | vt 0.125000 0.750000 27 | vn 0.0000 1.0000 0.0000 28 | vn -1.0000 0.0000 0.0000 29 | vn 0.0000 0.0000 -1.0000 30 | vn 0.0000 0.0000 1.0000 31 | vn 0.0000 -1.0000 0.0000 32 | vn 1.0000 0.0000 0.0000 33 | usemtl Material 34 | s off 35 | f 1/1/1 5/2/1 7/3/1 3/4/1 36 | f 8/5/2 7/6/2 5/7/2 6/8/2 37 | f 6/8/3 5/7/3 1/1/3 2/9/3 38 | usemtl Material.001 39 | f 4/10/4 3/4/4 7/11/4 8/12/4 40 | f 6/13/5 2/9/5 4/10/5 8/14/5 41 | f 2/9/6 1/1/6 3/4/6 4/10/6 42 | -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/lispsmos-src/binary-decode.lisp: -------------------------------------------------------------------------------- 1 | (defineFindAndReplace binStoreAmt x ((floor (/ 52 x)))) 2 | 3 | (defineFindAndReplace binaryDecodeSection src srcAbsOffset srcOffset elemCount bitCount bitOffset signOffset 4 | ( 5 | (comprehension 6 | (/ (- (mod 7 | (floor (/ ([] src 8 | (+ 9 | 1 10 | srcAbsOffset 11 | (ceil (/ srcOffset (binStoreAmt bitCount))) 12 | (floor (/ i (binStoreAmt bitCount))) 13 | ) 14 | ) (^ 2 (* bitCount (mod i (binStoreAmt bitCount)))))) 15 | (^ 2 bitCount) 16 | ) (^ 2 signOffset)) (^ 2 bitOffset)) 17 | (i (- (list 1 ... elemCount) 1)) 18 | ) 19 | ) 20 | ) 21 | 22 | (binaryDecodeSection obj 2 0 ([] obj 1) 26 10 25) 23 | (binaryDecodeSection obj 2 ([] obj 1) ([] obj 1) 26 10 25) 24 | (binaryDecodeSection obj 2 (* 2 ([] obj 1)) ([] obj 1) 26 10 25) -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "desmos-ptgi", 3 | "version": "1.0.0", 4 | "description": "Desmos Path-traced Global Illumination", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "npx tsc --watch" 9 | }, 10 | "type": "module", 11 | "author": "radian628", 12 | "license": "MIT", 13 | "dependencies": { 14 | "@types/node": "^17.0.13", 15 | "lispsmos": "file:../lispsmos/module", 16 | "mime-types": "^2.1.34", 17 | "obj-file-parser": "^0.5.3", 18 | "ts-loader": "^9.2.6", 19 | "typescript": "^4.5.5" 20 | }, 21 | "devDependencies": { 22 | "webpack-cli": "^4.9.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/src/exec-if.ts: -------------------------------------------------------------------------------- 1 | import { compiler, utilityMacros, compilerUtils } from "lispsmos"; 2 | 3 | export default function (c: compiler.LispsmosCompiler) { 4 | c.registerMacro("execIf", (ast, compiler) => { 5 | let condition = ast[1]; 6 | let indexOfSummation = ast[2]; 7 | let value = ast[3]; 8 | let conditionPiecewise = ["piecewise", 9 | [condition, "0"], 10 | ["-1"] 11 | ]; 12 | return [["sum", indexOfSummation, "0", conditionPiecewise, value]]; 13 | }) 14 | } -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/src/file-server.mts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs/promises"; 2 | import * as http from "http"; 3 | import * as path from "path"; 4 | //@ts-ignore 5 | import * as mime from "mime-types"; 6 | import * as build from "./index.js"; 7 | 8 | let server = http.createServer(async (req, res) => { 9 | res.setHeader("Access-Control-Allow-Origin", "*"); 10 | res.setHeader("Cross-Origin-Resource-Policy", "cross-origin"); 11 | res.setHeader("Content-Type", mime.lookup(req.url)); 12 | let url = req.url; 13 | if (url.match(/build$/g)) { 14 | res.end(JSON.stringify(await build.default())); 15 | return; 16 | } 17 | let fileLocation = path.join("../", url); 18 | fs.readFile(fileLocation) 19 | .then(file => { 20 | res.end(file); 21 | }) 22 | .catch(err => { 23 | res.statusCode = 404; 24 | res.end("Not found."); 25 | }); 26 | 27 | }); 28 | 29 | //@ts-ignore 30 | server.listen("8081", "localhost"); -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | "mag1", 3 | ["sqrt", ["+", ["*", "x1", "x1"], ["*", "y1", "y1"], ["*", "z1", "z1"]]], 4 | "mag2", 5 | ["sqrt", ["+", ["*", "x2", "x2"], ["*", "y2", "y2"], ["*", "z2", "z2"]]], 6 | "result", 7 | [ 8 | "+", 9 | ["*", ["/", "x1", "mag1"], ["/", "x2", "mag2"]], 10 | ["*", ["/", "y1", "mag1"], ["/", "y2", "mag2"]], 11 | ["*", ["/", "z1", "mag1"], ["/", "z2", "mag2"]] 12 | ] 13 | ] 14 | -------------------------------------------------------------------------------- /lispsmos-experiments/ptgi/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "es2020", 4 | "lib": ["es2015"], 5 | "noImplicitAny": true, 6 | "removeComments": true, 7 | "preserveConstEnums": true, 8 | "sourceMap": true, 9 | "declarationMap": true, 10 | "declaration": true, 11 | "outDir": "dist", 12 | "allowJs": true, 13 | "moduleResolution": "node", 14 | "types": ["node"], 15 | "downlevelIteration": true 16 | }, 17 | "include": ["src/"] 18 | } -------------------------------------------------------------------------------- /lispsmos-experiments/sample/index.mjs: -------------------------------------------------------------------------------- 1 | import * as lispsmos from "lispsmos"; 2 | 3 | lispsmos.buildServer(async () => { 4 | let compiler = new lispsmos.compiler.LispsmosCompiler(); 5 | return await compiler.compile("(= y (^ x 2))") 6 | }) -------------------------------------------------------------------------------- /module/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/module/.DS_Store -------------------------------------------------------------------------------- /module/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/module/.npmignore -------------------------------------------------------------------------------- /module/dist/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | */ 3 | !.gitignore -------------------------------------------------------------------------------- /module/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lispsmos", 3 | "version": "0.1.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "lispsmos", 9 | "version": "0.1.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "@types/node": "^16.11.10", 13 | "typescript": "^4.5.2" 14 | } 15 | }, 16 | "node_modules/@types/node": { 17 | "version": "16.11.10", 18 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", 19 | "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", 20 | "dev": true 21 | }, 22 | "node_modules/typescript": { 23 | "version": "4.5.2", 24 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", 25 | "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", 26 | "dev": true, 27 | "bin": { 28 | "tsc": "bin/tsc", 29 | "tsserver": "bin/tsserver" 30 | }, 31 | "engines": { 32 | "node": ">=4.2.0" 33 | } 34 | } 35 | }, 36 | "dependencies": { 37 | "@types/node": { 38 | "version": "16.11.10", 39 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", 40 | "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", 41 | "dev": true 42 | }, 43 | "typescript": { 44 | "version": "4.5.2", 45 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", 46 | "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", 47 | "dev": true 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lispsmos", 3 | "version": "0.2.3", 4 | "description": "A LISP-like programming language which compiles to Desmos expressions.", 5 | "main": "dist/index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "npx tsc --watch", 9 | "prepublish": "npx tsc" 10 | }, 11 | "author": "radian628", 12 | "license": "MIT", 13 | "type": "module", 14 | "devDependencies": { 15 | "@types/node": "^16.11.10", 16 | "typescript": "^4.5.2" 17 | }, 18 | "types": "dist/index.d.ts" 19 | } 20 | -------------------------------------------------------------------------------- /module/src/builtins.ts: -------------------------------------------------------------------------------- 1 | export let builtins = [ 2 | "min", 3 | "max", 4 | "join", 5 | "sin", 6 | "cos", 7 | "tan", 8 | "csc", 9 | "sec", 10 | "cot", 11 | "sinh", 12 | "cosh", 13 | "tanh", 14 | "csch", 15 | "sech", 16 | "coth", 17 | "total", 18 | "length", 19 | "mean", 20 | "median", 21 | "min", 22 | "max", 23 | "quartile", 24 | "quantile", 25 | "stdev", 26 | "stdevp", 27 | "mad", 28 | "var", 29 | "cov", 30 | "corr", 31 | "spearman", 32 | "ncr", 33 | "npr", 34 | "stats", 35 | "ttest", 36 | "tscore", 37 | "ittest", 38 | "join", 39 | "sort", 40 | "shuffle", 41 | "lcm", 42 | "gcd", 43 | "mod", 44 | "ceil", 45 | "floor", 46 | "round", 47 | "sign", 48 | "exp", 49 | "ln", 50 | "polygon", 51 | "log", 52 | "random", 53 | "rgb", 54 | "hsv", 55 | "arcsin", 56 | "arccos", 57 | "arctan", 58 | "abs" 59 | ] -------------------------------------------------------------------------------- /module/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as http from "node:http"; 2 | 3 | export * as compiler from "./compiler.js"; 4 | export * as compilerUtils from "./compiler-utils.js"; 5 | export * as utilityMacros from "./utility-macros.js"; 6 | export * as proceduralMacros from "./procedural-macros.js"; 7 | export * as graphicsMacros from "./graphics-macros.js"; 8 | 9 | export function buildServer(requestCallback: () => Promise, port?: number, hostname?: string) { 10 | const server = http.createServer(async (req, res) => { 11 | let response: string; 12 | res.setHeader("Access-Control-Allow-Origin", "*"); 13 | try { 14 | response = JSON.stringify(await requestCallback()) 15 | } catch (err) { 16 | response = JSON.stringify({ 17 | isError: true, 18 | message: err.message 19 | }); 20 | } 21 | res.end(response); 22 | }) 23 | if (port === undefined) port = 8090; 24 | if (hostname === undefined) hostname = "localhost"; 25 | console.log(`LISPsmos build server running on '${hostname}' with port ${port}.`); 26 | server.listen(port, hostname); 27 | } -------------------------------------------------------------------------------- /module/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "es2020", 4 | "lib": ["es2015", "dom"], 5 | "noImplicitAny": true, 6 | "preserveConstEnums": true, 7 | "sourceMap": true, 8 | "declarationMap": true, 9 | "declaration": true, 10 | "outDir": "dist", 11 | "allowJs": true, 12 | "moduleResolution": "node", 13 | "types": ["node"], 14 | "downlevelIteration": true, 15 | "removeComments": false 16 | }, 17 | "include": ["src/"] 18 | } -------------------------------------------------------------------------------- /racket-impl/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/.DS_Store -------------------------------------------------------------------------------- /racket-impl/casted-shadows/mirrors.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'scene.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 359.999993 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/mirrors.obj: -------------------------------------------------------------------------------- 1 | # Blender v3.2.0 OBJ File: 'scene.blend' 2 | # www.blender.org 3 | mtllib mirrors.mtl 4 | o Cube.001 5 | v -3.347426 6.469981 10.840327 6 | v 8.013290 -8.137761 7.693819 7 | v 11.873796 10.670977 9.157947 8 | v -0.849393 6.290047 -2.578169 9 | v -3.282063 -5.140658 6.455651 10 | v 1.180029 9.029118 9.443802 11 | vt 0.136582 0.234487 12 | vt 0.197523 0.269671 13 | vt 0.197523 0.340040 14 | vt 0.136582 0.234487 15 | vt 0.197523 0.269671 16 | vt 0.197523 0.340040 17 | vn -0.1378 0.1050 -0.9849 18 | vn 0.9550 -0.2802 -0.0974 19 | usemtl Material 20 | s off 21 | f 1/1/1 3/2/1 2/3/1 22 | f 4/4/2 6/5/2 5/6/2 23 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/casted-shadows/scene.blend -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/casted-shadows/scene.blend1 -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'scene.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 359.999993 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene.obj: -------------------------------------------------------------------------------- 1 | # Blender v3.2.0 OBJ File: 'scene.blend' 2 | # www.blender.org 3 | mtllib scene.mtl 4 | o Cube 5 | v 9.705658 2.407420 7.356535 6 | v 5.800457 1.440258 0.425213 7 | v -1.082950 0.453769 4.812649 8 | v 6.666482 1.440258 1.925214 9 | v 6.969383 -0.200740 -5.758358 10 | v 4.934432 1.440258 1.925213 11 | v 5.800457 3.980033 1.425213 12 | v 5.421072 1.863668 2.214407 13 | v 5.421072 5.510095 3.214407 14 | v 4.555046 1.863668 3.714407 15 | v 6.287097 1.863668 3.714407 16 | vt 0.250000 0.490000 17 | vt 0.250000 0.250000 18 | vt 0.457846 0.130000 19 | vt 0.750000 0.490000 20 | vt 0.957846 0.130000 21 | vt 0.542154 0.130000 22 | vt 0.042154 0.130000 23 | vt 0.042154 0.130000 24 | vt 0.250000 0.250000 25 | vt 0.250000 0.490000 26 | vt 0.750000 0.490000 27 | vt 0.957846 0.130000 28 | vt 0.542154 0.130000 29 | vt 0.042154 0.130000 30 | vt 0.250000 0.250000 31 | vt 0.250000 0.490000 32 | vt 0.457846 0.130000 33 | vn 0.8497 0.1932 -0.4906 34 | vn 0.0000 -1.0000 0.0000 35 | vn -0.0000 0.1932 0.9812 36 | vn -0.1378 0.9765 -0.1654 37 | vn -0.8497 0.1932 -0.4906 38 | vn -0.8580 0.1358 -0.4954 39 | vn -0.0000 0.1358 0.9907 40 | vn 0.8580 0.1358 -0.4954 41 | usemtl Material 42 | s off 43 | f 2/1/1 7/2/1 4/3/1 44 | f 2/4/2 4/5/2 6/6/2 45 | f 4/3/3 7/2/3 6/7/3 46 | f 3/8/4 1/9/4 5/10/4 47 | f 8/11/2 11/12/2 10/13/2 48 | f 6/7/5 7/2/5 2/1/5 49 | f 10/14/6 9/15/6 8/16/6 50 | f 11/17/7 9/15/7 10/14/7 51 | f 8/16/8 9/15/8 11/17/8 52 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'scene.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 359.999993 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/scene3.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'scene.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 359.999993 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/casted-shadows/triangle-intersect-test.rkt: -------------------------------------------------------------------------------- 1 | #lang racket 2 | 3 | (require 4 | "../lispsmos-racket/lispsmos.rkt" 5 | "../lispsmos-racket/obj-parser.rkt" 6 | "../lispsmos-racket/lispsmos-3d.rkt" 7 | "triangle-intersect.rkt") 8 | 9 | (define lispsmos-code `( 10 | ,@triangle-intersect-formula 11 | (display (= triangle-point-1 (point 0 0))) 12 | (display (= triangle-point-2 (point 1 0))) 13 | (display (= triangle-point-3 (point -0.5 2))) 14 | (display (= triangle-point-4 (point 0 1))) 15 | (display (= triangle-point-5 (point 2 0))) 16 | (display (= triangle-point-6 (point 0 -1))) 17 | 18 | (display (polygon triangle-point-1 triangle-point-2 triangle-point-3)) 19 | (display (polygon triangle-point-4 triangle-point-5 triangle-point-6)) 20 | (display (polygon (get-triangle-triangle-intersection-polygon 21 | triangle-point-1 triangle-point-2 triangle-point-3 22 | triangle-point-4 triangle-point-5 triangle-point-6 23 | ))) 24 | )) 25 | 26 | (define compiled-lispsmos-code (compile-lispsmos lispsmos-code)) 27 | 28 | (require web-server/http web-server/servlet-env) 29 | 30 | (define (hello req) 31 | (response/output 32 | (lambda (out) 33 | (display compiled-lispsmos-code out)) 34 | #:headers (list (header #"Access-Control-Allow-Origin" #"*")) 35 | )) 36 | 37 | (serve/servlet hello 38 | #:listen-ip "localhost" 39 | #:port 8080 40 | ) -------------------------------------------------------------------------------- /racket-impl/desmOS/desmOS-asm-compiler.rkt: -------------------------------------------------------------------------------- 1 | #lang racket 2 | 3 | (require racket/hash) 4 | 5 | ; register names: 6 | ; ip = instruction pointr 7 | 8 | (define (is-register str) 9 | (equal? (substring str 0 1) "r")) 10 | 11 | (define (get-reg-num str) 12 | (string->number (substring str 1))) 13 | 14 | (define (math-binop binop-name line) 15 | (define oprr (string->symbol (string-append binop-name "rr"))) 16 | (define opri (string->symbol (string-append binop-name "ri"))) 17 | (define op1 (cadr line)) 18 | (define op2 (caddr line)) 19 | (match (is-register op2) 20 | (#t (list oprr (get-reg-num op1) (get-reg-num op2))) 21 | (#f (list opri (get-reg-num op1) (string->number op2))))) 22 | 23 | (define (compile-asm asm-source) 24 | ; separate lines 25 | (define lines (map string-trim (string-split asm-source "\n"))) 26 | 27 | ; separate tokens 28 | (define (split-line line) (string-split line #rx"\\s+")) 29 | (define split-lines (map split-line lines)) 30 | 31 | (define (create-alias-map-entry line map) 32 | (match (length line) 33 | (0 map) 34 | (n 35 | (match (car line) 36 | ("alias" (hash-union map (hash (cadr map) (caddr map)))) 37 | (s map) 38 | ))) 39 | ) 40 | (define alias-map (foldl create-alias-map-entry (hash) split-lines)) 41 | 42 | (define (set-alias token) 43 | (hash-ref alias-map token token)) 44 | 45 | (define (decode-assembly-instruction line line-no prev-lines) 46 | (match (length line) 47 | (0 prev-lines) 48 | (n 49 | (append prev-lines (list (match (car line) 50 | 51 | ; math instructions 52 | ("add" (math-binop "add" line)) 53 | ("sub" (math-binop "sub" line)) 54 | ("mul" (math-binop "mul" line)) 55 | ("div" (math-binop "div" line)) 56 | ("mov" (math-binop "mov" line)) 57 | ("mod" (math-binop "mod" line)) 58 | (str (string->symbol str)) 59 | ))))) 60 | ) 61 | 62 | 63 | (foldl decode-assembly-instruction '() split-lines (stream->list (in-range (length split-lines))))) 64 | 65 | (define test-file (open-input-file "test.desmossembly")) 66 | (compile-asm (read-string 99999999 test-file)) 67 | -------------------------------------------------------------------------------- /racket-impl/desmOS/test.desmossembly: -------------------------------------------------------------------------------- 1 | alias primes_remaining r0 2 | alias primes_count r1 3 | alias current_number r2 4 | alias current_number_for_testing 5 | 6 | alias inner_loop_counter 7 | alias is_prime 8 | 9 | alias test_number 10 | 11 | alias prime_output_pointer 12 | 13 | mov primes_count 10 14 | mov primes_remaining primes_count 15 | mov current_number 2 16 | 17 | dst _prime_finding_loop 18 | 19 | mov inner_loop_counter current_number 20 | sub inner_loop_counter 2 21 | mov is_prime 1 22 | mov test_number 2 23 | dst _prime_checking_loop 24 | 25 | mod current_number_for_testing test_number 26 | add test_number 1 27 | 28 | jnz inner_loop_counter _prime_checking_loop 29 | 30 | mov is_prime 0 31 | 32 | dst _prime_found 33 | 34 | jz is_prime _skip_decrement_primes_found 35 | 36 | sub primes_remaining 1 37 | mov @prime_output_pointer current_number 38 | add prime_output_pointer 1 39 | 40 | dst _skip_decrement_primes_found 41 | 42 | add current_number 1 43 | jnz primes_remaining _prime_finding_loop -------------------------------------------------------------------------------- /racket-impl/lispsmos-racket/builtins.rkt: -------------------------------------------------------------------------------- 1 | #lang racket 2 | 3 | (define builtins (list 4 | 'min 5 | 'max 6 | 'join 7 | 'sin 8 | 'cos 9 | 'tan 10 | 'csc 11 | 'sec 12 | 'cot 13 | 'sinh 14 | 'cosh 15 | 'tanh 16 | 'csch 17 | 'sech 18 | 'coth 19 | 'total 20 | 'length 21 | 'mean 22 | 'median 23 | 'min 24 | 'max 25 | 'quartile 26 | 'quantile 27 | 'stdev 28 | 'stdevp 29 | 'mad 30 | 'var 31 | 'cov 32 | 'corr 33 | 'spearman 34 | 'ncr 35 | 'npr 36 | 'stats 37 | 'ttest 38 | 'tscore 39 | 'ittest 40 | 'join 41 | 'sort 42 | 'shuffle 43 | 'lcm 44 | 'gcd 45 | 'mod 46 | 'ceil 47 | 'floor 48 | 'round 49 | 'sign 50 | 'exp 51 | 'ln 52 | 'polygon 53 | 'log 54 | 'random 55 | 'rgb 56 | 'hsv 57 | 'arcsin 58 | 'arccos 59 | 'arctan 60 | 'abs 61 | )) 62 | 63 | (provide builtins) -------------------------------------------------------------------------------- /racket-impl/minecraft/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/minecraft/.DS_Store -------------------------------------------------------------------------------- /racket-impl/minecraft/assets/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/minecraft/assets/texture.png -------------------------------------------------------------------------------- /racket-impl/minecraft/src/ts/dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.__esModule = true; 3 | var process_1 = require("process"); 4 | var image_edge_1 = require("./image-edge"); 5 | var bufferData = []; 6 | process.stdin.on("data", function (buffer) { 7 | bufferData.push(buffer); 8 | }); 9 | process.stdin.end(function () { 10 | var input = JSON.parse(Buffer.concat(bufferData).toString()); 11 | var output = {}; 12 | for (var _i = 0, _a = Object.entries(input); _i < _a.length; _i++) { 13 | var _b = _a[_i], k = _b[0], v = _b[1]; 14 | if (v.type == "image-edges") { 15 | output[k] = (0, image_edge_1.findImageEdges)(v); 16 | } 17 | } 18 | process_1.stdout.write(JSON.stringify(output)); 19 | process_1.stdout.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /racket-impl/minecraft/src/ts/dist/index.mjs: -------------------------------------------------------------------------------- 1 | var __asyncValues = (this && this.__asyncValues) || function (o) { 2 | if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 3 | var m = o[Symbol.asyncIterator], i; 4 | return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); 5 | function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } 6 | function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } 7 | }; 8 | import { stdout } from "process"; 9 | import { findImageEdges } from "./image-edge.mjs"; 10 | async function read(stream) { 11 | var e_1, _a; 12 | const chunks = []; 13 | try { 14 | for (var stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = await stream_1.next(), !stream_1_1.done;) { 15 | const chunk = stream_1_1.value; 16 | chunks.push(chunk); 17 | } 18 | } 19 | catch (e_1_1) { e_1 = { error: e_1_1 }; } 20 | finally { 21 | try { 22 | if (stream_1_1 && !stream_1_1.done && (_a = stream_1.return)) await _a.call(stream_1); 23 | } 24 | finally { if (e_1) throw e_1.error; } 25 | } 26 | return Buffer.concat(chunks).toString('utf-8'); 27 | } 28 | const input = JSON.parse((await read(process.stdin))); 29 | console.error(input); 30 | const output = {}; 31 | for (const [k, v] of Object.entries(input)) { 32 | if (v.type == "image-edges") { 33 | output[k] = findImageEdges(v); 34 | } 35 | } 36 | stdout.write(JSON.stringify(output), () => { 37 | stdout.end(); 38 | process.exit(); 39 | }); 40 | -------------------------------------------------------------------------------- /racket-impl/minecraft/src/ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "npx tsc --watch" 4 | } 5 | } -------------------------------------------------------------------------------- /racket-impl/minecraft/src/ts/src/index.mts: -------------------------------------------------------------------------------- 1 | import { stdout } from "process"; 2 | import { findImageEdges, ImageEdgesInput, ImageEdgesOutput } from "./image-edge.mjs"; 3 | import * as fs from "node:fs/promises" 4 | import { Readable } from "stream"; 5 | 6 | type IPCMessageInput = ImageEdgesInput; 7 | 8 | type IPCMessageInputSet = { 9 | [key: string]: IPCMessageInput 10 | } 11 | 12 | type IPCMessageOutput = ImageEdgesOutput; 13 | 14 | type IPCMessageOutputSet = { 15 | [key: string]: IPCMessageOutput 16 | }; 17 | 18 | async function read(stream: Readable) { 19 | const chunks = []; 20 | for await (const chunk of stream) chunks.push(chunk); 21 | return Buffer.concat(chunks).toString('utf-8'); 22 | } 23 | 24 | const input: IPCMessageInputSet = JSON.parse((await read(process.stdin))); 25 | 26 | console.error(input); 27 | 28 | const output: IPCMessageOutputSet = {}; 29 | for (const [k, v] of Object.entries(input)) { 30 | if (v.type == "image-edges") { 31 | output[k] = findImageEdges(v); 32 | } 33 | } 34 | 35 | stdout.write(JSON.stringify(output), () => { 36 | stdout.end(); 37 | process.exit(); 38 | }); 39 | -------------------------------------------------------------------------------- /racket-impl/minecraft/src/ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "outDir": "dist", 5 | "module": "ESNext", 6 | "moduleResolution": "node", 7 | "target": "es2017" 8 | }, 9 | "include": ["src/*"] 10 | } -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/ball.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl orange 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.387038 0.108524 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/ball2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl orange 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.387038 0.108524 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/bright_ball.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl BRIGHTEMITSLIGHT 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 6.900000 6.900000 6.900000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/diamonds.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl Minecraft 5 | Ns 323.999994 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/emission-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/assets/emission-map.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/grass_block.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/assets/grass_block.webp -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/icosahedron.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'None' 2 | # Material Count: 1 3 | 4 | newmtl None 5 | Ns 500 6 | Ka 0.8 0.8 0.8 7 | Kd 0.8 0.8 0.8 8 | Ks 0.8 0.8 0.8 9 | d 1 10 | illum 2 11 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/icosahedron.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.93.1 OBJ File: '' 2 | # www.blender.org 3 | mtllib icosahedron.mtl 4 | o Icosphere 5 | v 0.000000 -1.000000 0.000000 6 | v 0.723600 -0.447215 0.525720 7 | v -0.276385 -0.447215 0.850640 8 | v -0.894425 -0.447215 0.000000 9 | v -0.276385 -0.447215 -0.850640 10 | v 0.723600 -0.447215 -0.525720 11 | v 0.276385 0.447215 0.850640 12 | v -0.723600 0.447215 0.525720 13 | v -0.723600 0.447215 -0.525720 14 | v 0.276385 0.447215 -0.850640 15 | v 0.894425 0.447215 0.000000 16 | v 0.000000 1.000000 0.000000 17 | vt 0.181819 0.000000 18 | vt 0.272728 0.157461 19 | vt 0.090910 0.157461 20 | vt 0.363637 0.000000 21 | vt 0.454546 0.157461 22 | vt 0.909091 0.000000 23 | vt 1.000000 0.157461 24 | vt 0.818182 0.157461 25 | vt 0.727273 0.000000 26 | vt 0.636364 0.157461 27 | vt 0.545455 0.000000 28 | vt 0.363637 0.314921 29 | vt 0.181819 0.314921 30 | vt 0.909091 0.314921 31 | vt 0.727273 0.314921 32 | vt 0.545455 0.314921 33 | vt 0.000000 0.314921 34 | vt 0.272728 0.472382 35 | vt 0.090910 0.472382 36 | vt 0.818182 0.472382 37 | vt 0.636364 0.472382 38 | vt 0.454546 0.472382 39 | vn 0.1876 -0.7947 0.5774 40 | vn 0.6071 -0.7947 0.0000 41 | vn -0.4911 -0.7947 0.3568 42 | vn -0.4911 -0.7947 -0.3568 43 | vn 0.1876 -0.7947 -0.5774 44 | vn 0.9822 -0.1876 0.0000 45 | vn 0.3035 -0.1876 0.9342 46 | vn -0.7946 -0.1876 0.5774 47 | vn -0.7946 -0.1876 -0.5774 48 | vn 0.3035 -0.1876 -0.9342 49 | vn 0.7946 0.1876 0.5774 50 | vn -0.3035 0.1876 0.9342 51 | vn -0.9822 0.1876 0.0000 52 | vn -0.3035 0.1876 -0.9342 53 | vn 0.7946 0.1876 -0.5774 54 | vn 0.4911 0.7947 0.3568 55 | vn -0.1876 0.7947 0.5774 56 | vn -0.6071 0.7947 0.0000 57 | vn -0.1876 0.7947 -0.5774 58 | vn 0.4911 0.7947 -0.3568 59 | usemtl None 60 | s off 61 | f 1/1/1 2/2/1 3/3/1 62 | f 2/2/2 1/4/2 6/5/2 63 | f 1/6/3 3/7/3 4/8/3 64 | f 1/9/4 4/8/4 5/10/4 65 | f 1/11/5 5/10/5 6/5/5 66 | f 2/2/6 6/5/6 11/12/6 67 | f 3/3/7 2/2/7 7/13/7 68 | f 4/8/8 3/7/8 8/14/8 69 | f 5/10/9 4/8/9 9/15/9 70 | f 6/5/10 5/10/10 10/16/10 71 | f 2/2/11 11/12/11 7/13/11 72 | f 3/3/12 7/13/12 8/17/12 73 | f 4/8/13 8/14/13 9/15/13 74 | f 5/10/14 9/15/14 10/16/14 75 | f 6/5/15 10/16/15 11/12/15 76 | f 7/13/16 11/12/16 12/18/16 77 | f 8/17/17 7/13/17 12/19/17 78 | f 9/15/18 8/14/18 12/20/18 79 | f 10/16/19 9/15/19 12/21/19 80 | f 11/12/20 10/16/20 12/22/20 81 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/icosahedron2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 2 3 | 4 | newmtl Material.001 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.000000 0.800000 0.003851 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl Material.002 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.800000 0.001522 0.000000 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/icosahedron2.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.93.1 OBJ File: 'untitled.blend' 2 | # www.blender.org 3 | mtllib icosahedron2.mtl 4 | o Icosphere 5 | v -1.842862 -0.793465 -0.337982 6 | v -1.119262 -0.240680 0.187738 7 | v -2.119247 -0.240680 0.512658 8 | v -2.737288 -0.240680 -0.337982 9 | v -2.119247 -0.240680 -1.188622 10 | v -1.119262 -0.240680 -0.863702 11 | v -1.566478 0.653750 0.512658 12 | v -2.566463 0.653750 0.187738 13 | v -2.566463 0.653750 -0.863702 14 | v -1.566478 0.653750 -1.188622 15 | v -0.948438 0.653750 -0.337982 16 | v -1.842862 1.206535 -0.337982 17 | vt 0.181819 0.000000 18 | vt 0.272728 0.157461 19 | vt 0.090910 0.157461 20 | vt 0.909091 0.000000 21 | vt 1.000000 0.157461 22 | vt 0.818182 0.157461 23 | vt 0.363637 0.314921 24 | vt 0.181819 0.314921 25 | vt 0.000000 0.314921 26 | vt 0.909091 0.314921 27 | vt 0.727273 0.314921 28 | vt 0.272728 0.472382 29 | vt 0.818182 0.472382 30 | vt 0.363637 0.000000 31 | vt 0.454546 0.157461 32 | vt 0.727273 0.000000 33 | vt 0.636364 0.157461 34 | vt 0.545455 0.000000 35 | vt 0.545455 0.314921 36 | vt 0.090910 0.472382 37 | vt 0.636364 0.472382 38 | vt 0.454546 0.472382 39 | vn 0.1876 -0.7947 0.5774 40 | vn -0.4911 -0.7947 0.3568 41 | vn 0.7946 0.1876 0.5774 42 | vn -0.3035 0.1876 0.9342 43 | vn -0.9822 0.1876 0.0000 44 | vn 0.4911 0.7947 0.3568 45 | vn -0.6071 0.7947 0.0000 46 | vn 0.6071 -0.7947 0.0000 47 | vn -0.4911 -0.7947 -0.3568 48 | vn 0.1876 -0.7947 -0.5774 49 | vn 0.9822 -0.1876 0.0000 50 | vn 0.3035 -0.1876 0.9342 51 | vn -0.7946 -0.1876 0.5774 52 | vn -0.7946 -0.1876 -0.5774 53 | vn 0.3035 -0.1876 -0.9342 54 | vn -0.3035 0.1876 -0.9342 55 | vn 0.7946 0.1876 -0.5774 56 | vn -0.1876 0.7947 0.5774 57 | vn -0.1876 0.7947 -0.5774 58 | vn 0.4911 0.7947 -0.3568 59 | usemtl Material.001 60 | s off 61 | f 1/1/1 2/2/1 3/3/1 62 | f 1/4/2 3/5/2 4/6/2 63 | f 2/2/3 11/7/3 7/8/3 64 | f 3/3/4 7/8/4 8/9/4 65 | f 4/6/5 8/10/5 9/11/5 66 | f 7/8/6 11/7/6 12/12/6 67 | f 9/11/7 8/10/7 12/13/7 68 | usemtl Material.002 69 | f 2/2/8 1/14/8 6/15/8 70 | f 1/16/9 4/6/9 5/17/9 71 | f 1/18/10 5/17/10 6/15/10 72 | f 2/2/11 6/15/11 11/7/11 73 | f 3/3/12 2/2/12 7/8/12 74 | f 4/6/13 3/5/13 8/10/13 75 | f 5/17/14 4/6/14 9/11/14 76 | f 6/15/15 5/17/15 10/19/15 77 | f 5/17/16 9/11/16 10/19/16 78 | f 6/15/17 10/19/17 11/7/17 79 | f 8/9/18 7/8/18 12/20/18 80 | f 10/19/19 9/11/19 12/21/19 81 | f 11/7/20 10/19/20 12/22/20 82 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/minecraft.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl material 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | map_Kd /Users/adrian/racket-test/diffuse-map.png 14 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/red_green_cube_complex.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 4 3 | 4 | newmtl bright 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.525171 0.230292 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 4.100000 4.100000 4.100000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl green 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.017809 0.800000 0.054755 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | 24 | newmtl red 25 | Ns 225.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Kd 0.800000 0.045645 0.026867 28 | Ks 0.500000 0.500000 0.500000 29 | Ke 0.000000 0.000000 0.000000 30 | Ni 1.450000 31 | d 1.000000 32 | illum 2 33 | 34 | newmtl white 35 | Ns 225.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Kd 0.800000 0.800000 0.800000 38 | Ks 0.500000 0.500000 0.500000 39 | Ke 0.000000 0.000000 0.000000 40 | Ni 1.450000 41 | d 1.000000 42 | illum 2 43 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/red_green_cube_complex_optimized.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 4 3 | 4 | newmtl bright 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.525171 0.230292 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 4.100000 4.100000 4.100000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl green 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.017809 0.800000 0.054755 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | 24 | newmtl red 25 | Ns 225.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Kd 0.800000 0.045645 0.026867 28 | Ks 0.500000 0.500000 0.500000 29 | Ke 0.000000 0.000000 0.000000 30 | Ni 1.450000 31 | d 1.000000 32 | illum 2 33 | 34 | newmtl white 35 | Ns 225.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Kd 0.800000 0.800000 0.800000 38 | Ks 0.500000 0.500000 0.500000 39 | Ke 0.000000 0.000000 0.000000 40 | Ni 1.450000 41 | d 1.000000 42 | illum 2 43 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/red_green_cube_complexer.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 4 3 | 4 | newmtl bright 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.525171 0.230292 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 4.100000 4.100000 4.100000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl green 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.017809 0.800000 0.054755 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | 24 | newmtl red 25 | Ns 225.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Kd 0.800000 0.045645 0.026867 28 | Ks 0.500000 0.500000 0.500000 29 | Ke 0.000000 0.000000 0.000000 30 | Ni 1.450000 31 | d 1.000000 32 | illum 2 33 | 34 | newmtl white 35 | Ns 225.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Kd 0.800000 0.800000 0.800000 38 | Ks 0.500000 0.500000 0.500000 39 | Ke 0.000000 0.000000 0.000000 40 | Ni 1.450000 41 | d 1.000000 42 | illum 2 43 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/red_green_cube_complexish.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 4 3 | 4 | newmtl bright 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.525171 0.230292 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 4.100000 4.100000 4.100000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl green 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.017809 0.800000 0.054755 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | 24 | newmtl red 25 | Ns 225.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Kd 0.800000 0.045645 0.026867 28 | Ks 0.500000 0.500000 0.500000 29 | Ke 0.000000 0.000000 0.000000 30 | Ni 1.450000 31 | d 1.000000 32 | illum 2 33 | 34 | newmtl white 35 | Ns 225.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Kd 0.800000 0.800000 0.800000 38 | Ks 0.500000 0.500000 0.500000 39 | Ke 0.000000 0.000000 0.000000 40 | Ni 1.450000 41 | d 1.000000 42 | illum 2 43 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/red_green_cube_simple.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 4 3 | 4 | newmtl bright 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.525171 0.230292 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 4.100000 4.100000 4.100000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | 14 | newmtl green 15 | Ns 225.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Kd 0.017809 0.800000 0.054755 18 | Ks 0.500000 0.500000 0.500000 19 | Ke 0.000000 0.000000 0.000000 20 | Ni 1.450000 21 | d 1.000000 22 | illum 2 23 | 24 | newmtl red 25 | Ns 225.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Kd 0.800000 0.045645 0.026867 28 | Ks 0.500000 0.500000 0.500000 29 | Ke 0.000000 0.000000 0.000000 30 | Ni 1.450000 31 | d 1.000000 32 | illum 2 33 | 34 | newmtl white 35 | Ns 225.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Kd 0.800000 0.800000 0.800000 38 | Ks 0.500000 0.500000 0.500000 39 | Ke 0.000000 0.000000 0.000000 40 | Ni 1.450000 41 | d 1.000000 42 | illum 2 43 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/assets/terrain.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/terrain.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/assets/terrain.webp -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/terrain2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/assets/terrain2.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/text.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl None 5 | Ns 500 6 | Ka 0.8 0.8 0.8 7 | Kd 0.8 0.8 0.8 8 | Ks 0.8 0.8 0.8 9 | d 1 10 | illum 2 11 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/text2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl None 5 | Ns 500 6 | Ka 0.8 0.8 0.8 7 | Kd 0.8 0.8 0.8 8 | Ks 0.8 0.8 0.8 9 | d 1 10 | illum 2 11 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/texture-mapping-test-2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl material 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | map_Kd terrain2.png 14 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/assets/texture-mapping-test.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'untitled.blend' 2 | # Material Count: 1 3 | 4 | newmtl material 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/diffuse-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/diffuse-map.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/emissive-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/emissive-map.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/specular-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/specular-map.png -------------------------------------------------------------------------------- /racket-impl/pixel-grid-raytracer/specular-roughness-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/racket-impl/pixel-grid-raytracer/specular-roughness-map.png -------------------------------------------------------------------------------- /test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/.DS_Store -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/.gitignore -------------------------------------------------------------------------------- /test/desmos-plane-2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/.DS_Store -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/.gitignore: -------------------------------------------------------------------------------- 1 | *.ply -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/better_assets.blend -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/blank-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/blank-image.jpg -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_18_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 159.563431 -41.299355 7.953485 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 159.563431 -7.808392 7.953485 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 159.563431 -7.808392 -18.474501 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 159.563431 -41.299355 -18.474501 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 159.563431 -41.299355 -18.474501 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 159.563431 -7.808392 -18.474501 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 127.466042 -7.808392 -18.474501 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 127.466042 -41.299355 -18.474501 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 127.466042 -41.299355 -18.474501 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 127.466042 -7.808392 -18.474501 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 127.466042 -7.808392 7.953485 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 127.466042 -41.299355 7.953485 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 127.466042 -41.299355 7.953485 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 127.466042 -7.808392 7.953485 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 159.563431 -7.808392 7.953485 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 159.563431 -41.299355 7.953485 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 159.563431 -41.299355 -18.474501 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 127.466042 -41.299355 -18.474501 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 127.466042 -41.299355 7.953485 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 159.563431 -41.299355 7.953485 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 127.466042 -7.808392 -18.474501 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 159.563431 -7.808392 -18.474501 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 159.563431 -7.808392 7.953485 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 127.466042 -7.808392 7.953485 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_19_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 152.981506 -50.428535 17.341114 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 152.981506 -27.176544 17.341114 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 152.981506 -27.176544 -4.487727 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 152.981506 -50.428535 -4.487727 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 152.981506 -50.428535 -4.487727 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 152.981506 -27.176544 -4.487727 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 130.697037 -27.176544 -4.487727 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 130.697037 -50.428535 -4.487727 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 130.697037 -50.428535 -4.487727 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 130.697037 -27.176544 -4.487727 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 130.697037 -27.176544 17.341114 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 130.697037 -50.428535 17.341114 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 130.697037 -50.428535 17.341114 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 130.697037 -27.176544 17.341114 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 152.981506 -27.176544 17.341114 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 152.981506 -50.428535 17.341114 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 152.981506 -50.428535 -4.487727 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 130.697037 -50.428535 -4.487727 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 130.697037 -50.428535 17.341114 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 152.981506 -50.428535 17.341114 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 130.697037 -27.176544 -4.487727 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 152.981506 -27.176544 -4.487727 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 152.981506 -27.176544 17.341114 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 130.697037 -27.176544 17.341114 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_20_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 154.661896 -50.428535 25.081049 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 154.661896 -27.176544 25.081049 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 154.661896 -27.176544 3.252209 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 154.661896 -50.428535 3.252209 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 154.661896 -50.428535 3.252209 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 154.661896 -27.176544 3.252209 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 132.377411 -27.176544 3.252209 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 132.377411 -50.428535 3.252209 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 132.377411 -50.428535 3.252209 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 132.377411 -27.176544 3.252209 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 132.377411 -27.176544 25.081049 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 132.377411 -50.428535 25.081049 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 132.377411 -50.428535 25.081049 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 132.377411 -27.176544 25.081049 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 154.661896 -27.176544 25.081049 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 154.661896 -50.428535 25.081049 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 154.661896 -50.428535 3.252209 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 132.377411 -50.428535 3.252209 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 132.377411 -50.428535 25.081049 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 154.661896 -50.428535 25.081049 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 132.377411 -27.176544 3.252209 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 154.661896 -27.176544 3.252209 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 154.661896 -27.176544 25.081049 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 132.377411 -27.176544 25.081049 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_21_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 154.491943 -66.473999 62.875072 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 154.491943 -11.131079 62.875072 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 154.491943 -11.131079 10.919445 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 154.491943 -66.473999 10.919445 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 154.491943 -66.473999 10.919445 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 154.491943 -11.131079 10.919445 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 101.451859 -11.131079 10.919445 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 101.451859 -66.473999 10.919445 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 101.451859 -66.473999 10.919445 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 101.451859 -11.131079 10.919445 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 101.451859 -11.131079 62.875072 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 101.451859 -66.473999 62.875072 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 101.451859 -66.473999 62.875072 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 101.451859 -11.131079 62.875072 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 154.491943 -11.131079 62.875072 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 154.491943 -66.473999 62.875072 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 154.491943 -66.473999 10.919445 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 101.451859 -66.473999 10.919445 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 101.451859 -66.473999 62.875072 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 154.491943 -66.473999 62.875072 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 101.451859 -11.131079 10.919445 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 154.491943 -11.131079 10.919445 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 154.491943 -11.131079 62.875072 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 101.451859 -11.131079 62.875072 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_22_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 164.711288 -66.473999 83.094421 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 164.711288 -11.131079 83.094421 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 164.711288 -11.131079 31.138794 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 164.711288 -66.473999 31.138794 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 164.711288 -66.473999 31.138794 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 164.711288 -11.131079 31.138794 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 111.671188 -11.131079 31.138794 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 111.671188 -66.473999 31.138794 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 111.671188 -66.473999 31.138794 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 111.671188 -11.131079 31.138794 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 111.671188 -11.131079 83.094421 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 111.671188 -66.473999 83.094421 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 111.671188 -66.473999 83.094421 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 111.671188 -11.131079 83.094421 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 164.711288 -11.131079 83.094421 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 164.711288 -66.473999 83.094421 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 164.711288 -66.473999 31.138794 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 111.671188 -66.473999 31.138794 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 111.671188 -66.473999 83.094421 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 164.711288 -66.473999 83.094421 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 111.671188 -11.131079 31.138794 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 164.711288 -11.131079 31.138794 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 164.711288 -11.131079 83.094421 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 111.671188 -11.131079 83.094421 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_25_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 208.939240 -86.985809 177.495483 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 208.939240 9.380730 177.495483 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 208.939240 9.380730 95.105682 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 208.939240 -86.985809 95.105682 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 208.939240 -86.985809 95.105682 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 208.939240 9.380730 95.105682 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 116.582542 9.380730 95.105682 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 116.582542 -86.985809 95.105682 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 116.582542 -86.985809 95.105682 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 116.582542 9.380730 95.105682 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 116.582542 9.380730 177.495483 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 116.582542 -86.985809 177.495483 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 116.582542 -86.985809 177.495483 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 116.582542 9.380730 177.495483 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 208.939240 9.380730 177.495483 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 208.939240 -86.985809 177.495483 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 208.939240 -86.985809 95.105682 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 116.582542 -86.985809 95.105682 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 116.582542 -86.985809 177.495483 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 208.939240 -86.985809 177.495483 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 116.582542 9.380730 95.105682 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 208.939240 9.380730 95.105682 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 208.939240 9.380730 177.495483 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 116.582542 9.380730 177.495483 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_26_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 209.796524 -86.985809 193.783829 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 209.796524 9.380730 193.783829 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 209.796524 9.380730 111.394028 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 209.796524 -86.985809 111.394028 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 209.796524 -86.985809 111.394028 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 209.796524 9.380730 111.394028 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 117.439827 9.380730 111.394028 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 117.439827 -86.985809 111.394028 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 117.439827 -86.985809 111.394028 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 117.439827 9.380730 111.394028 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 117.439827 9.380730 193.783829 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 117.439827 -86.985809 193.783829 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 117.439827 -86.985809 193.783829 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 117.439827 9.380730 193.783829 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 209.796524 9.380730 193.783829 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 209.796524 -86.985809 193.783829 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 209.796524 -86.985809 111.394028 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 117.439827 -86.985809 111.394028 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 117.439827 -86.985809 193.783829 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 209.796524 -86.985809 193.783829 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 117.439827 9.380730 111.394028 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 209.796524 9.380730 111.394028 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 209.796524 9.380730 193.783829 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 117.439827 9.380730 193.783829 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_2_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 35.844608 -9.106717 -44.258804 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 35.844608 8.212806 -44.258804 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 35.844608 8.212806 -2.760302 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 35.844608 -9.106717 -2.760302 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 35.844608 -9.106717 -2.760302 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 35.844608 8.212806 -2.760302 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 10.231773 8.212806 -2.760302 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 10.231773 -9.106717 -2.760302 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 10.231773 -9.106717 -2.760302 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 10.231773 8.212806 -2.760302 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 10.231773 8.212806 -44.258804 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 10.231773 -9.106717 -44.258804 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 10.231773 -9.106717 -44.258804 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 10.231773 8.212806 -44.258804 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 35.844608 8.212806 -44.258804 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 35.844608 -9.106717 -44.258804 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 35.844608 -9.106717 -2.760302 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 10.231773 -9.106717 -2.760302 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 10.231773 -9.106717 -44.258804 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 35.844608 -9.106717 -44.258804 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 10.231773 8.212806 -2.760302 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 35.844608 8.212806 -2.760302 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 35.844608 8.212806 -44.258804 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 10.231773 8.212806 -44.258804 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_3_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 80.024155 -24.042435 -55.294125 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 80.024155 10.097390 -55.294125 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 80.024155 10.097390 -25.607994 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 80.024155 -24.042435 -25.607994 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 80.024155 -24.042435 -25.607994 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 80.024155 10.097390 -25.607994 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 8.229689 10.097390 -25.607994 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 8.229689 -24.042435 -25.607994 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 8.229689 -24.042435 -25.607994 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 8.229689 10.097390 -25.607994 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 8.229689 10.097390 -55.294125 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 8.229689 -24.042435 -55.294125 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 8.229689 -24.042435 -55.294125 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 8.229689 10.097390 -55.294125 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 80.024155 10.097390 -55.294125 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 80.024155 -24.042435 -55.294125 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 80.024155 -24.042435 -25.607994 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 8.229689 -24.042435 -25.607994 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 8.229689 -24.042435 -55.294125 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 80.024155 -24.042435 -55.294125 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 8.229689 10.097390 -25.607994 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 80.024155 10.097390 -25.607994 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 80.024155 10.097390 -55.294125 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 8.229689 10.097390 -55.294125 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_4_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 109.004379 -29.441181 -71.827538 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 109.004379 4.698644 -71.827538 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 109.004379 4.698644 -28.526434 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 109.004379 -29.441181 -28.526434 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 109.004379 -29.441181 -28.526434 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 109.004379 4.698644 -28.526434 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 54.451439 4.698644 -28.526434 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 54.451439 -29.441181 -28.526434 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 54.451439 -29.441181 -28.526434 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 54.451439 4.698644 -28.526434 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 54.451439 4.698644 -71.827538 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 54.451439 -29.441181 -71.827538 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 54.451439 -29.441181 -71.827538 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 54.451439 4.698644 -71.827538 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 109.004379 4.698644 -71.827538 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 109.004379 -29.441181 -71.827538 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 109.004379 -29.441181 -28.526434 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 54.451439 -29.441181 -28.526434 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 54.451439 -29.441181 -71.827538 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 109.004379 -29.441181 -71.827538 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 54.451439 4.698644 -28.526434 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 109.004379 4.698644 -28.526434 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 109.004379 4.698644 -71.827538 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 54.451439 4.698644 -71.827538 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/canyon_6_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 130.878250 -32.588226 -99.397537 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 130.878250 1.551600 -99.397537 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 130.878250 1.551600 -144.987869 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 130.878250 -32.588226 -144.987869 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 130.878250 -32.588226 -144.987869 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 130.878250 1.551600 -144.987869 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 93.825386 1.551600 -144.987869 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 93.825386 -32.588226 -144.987869 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 93.825386 -32.588226 -144.987869 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 93.825386 1.551600 -144.987869 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 93.825386 1.551600 -99.397537 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 93.825386 -32.588226 -99.397537 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 93.825386 -32.588226 -99.397537 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 93.825386 1.551600 -99.397537 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 130.878250 1.551600 -99.397537 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 130.878250 -32.588226 -99.397537 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 130.878250 -32.588226 -144.987869 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 93.825386 -32.588226 -144.987869 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 93.825386 -32.588226 -99.397537 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 130.878250 -32.588226 -99.397537 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 93.825386 1.551600 -144.987869 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 130.878250 1.551600 -144.987869 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 130.878250 1.551600 -99.397537 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 93.825386 1.551600 -99.397537 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_1_collider.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 16.448689 -23.461176 -4.899327 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 16.448689 1.220090 -4.899327 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 16.448689 1.220090 10.659554 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 16.448689 -23.461176 10.659554 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 16.448689 -23.461176 10.659554 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 16.448689 1.220090 10.659554 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -3.782253 1.220090 10.659554 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -3.782253 -23.461176 10.659554 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -3.782253 -23.461176 10.659554 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -3.782253 1.220090 10.659554 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -3.782253 1.220090 -4.899327 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -3.782253 -23.461176 -4.899327 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -3.782253 -23.461176 -4.899327 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -3.782253 1.220090 -4.899327 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 16.448689 1.220090 -4.899327 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 16.448689 -23.461176 -4.899327 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 16.448689 -23.461176 10.659554 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -3.782253 -23.461176 10.659554 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -3.782253 -23.461176 -4.899327 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 16.448689 -23.461176 -4.899327 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -3.782253 1.220090 10.659554 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 16.448689 1.220090 10.659554 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 16.448689 1.220090 -4.899327 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -3.782253 1.220090 -4.899327 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_1_location.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 1.000000 -2.404274 -1.000000 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 1.000000 -0.404274 -1.000000 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 1.000000 -0.404274 1.000000 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 1.000000 -2.404274 1.000000 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 1.000000 -2.404274 1.000000 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 1.000000 -0.404274 1.000000 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -1.000000 -0.404274 1.000000 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -1.000000 -2.404274 1.000000 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -1.000000 -2.404274 1.000000 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -1.000000 -0.404274 1.000000 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -1.000000 -0.404274 -1.000000 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -1.000000 -2.404274 -1.000000 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -1.000000 -2.404274 -1.000000 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -1.000000 -0.404274 -1.000000 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 1.000000 -0.404274 -1.000000 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 1.000000 -2.404274 -1.000000 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 1.000000 -2.404274 1.000000 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -1.000000 -2.404274 1.000000 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -1.000000 -2.404274 -1.000000 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 1.000000 -2.404274 -1.000000 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -1.000000 -0.404274 1.000000 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 1.000000 -0.404274 1.000000 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 1.000000 -0.404274 -1.000000 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -1.000000 -0.404274 -1.000000 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_1_velocity.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 2.671485 -2.404274 -0.937437 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 2.671485 -0.404274 -0.937437 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 2.671485 -0.404274 1.062563 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 2.671485 -2.404274 1.062563 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 2.671485 -2.404274 1.062563 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 2.671485 -0.404274 1.062563 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 0.671485 -0.404274 1.062563 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 0.671485 -2.404274 1.062563 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 0.671485 -2.404274 1.062563 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 0.671485 -0.404274 1.062563 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 0.671485 -0.404274 -0.937437 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 0.671485 -2.404274 -0.937437 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 0.671485 -2.404274 -0.937437 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 0.671485 -0.404274 -0.937437 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 2.671485 -0.404274 -0.937437 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 2.671485 -2.404274 -0.937437 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 2.671485 -2.404274 1.062563 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 0.671485 -2.404274 1.062563 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 0.671485 -2.404274 -0.937437 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 2.671485 -2.404274 -0.937437 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 0.671485 -0.404274 1.062563 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 2.671485 -0.404274 1.062563 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 2.671485 -0.404274 -0.937437 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 0.671485 -0.404274 -0.937437 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_2_collider.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 87.452866 -20.276369 -56.152416 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 87.452866 4.404897 -56.152416 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 87.452866 4.404897 -40.593533 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 87.452866 -20.276369 -40.593533 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 87.452866 -20.276369 -40.593533 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 87.452866 4.404897 -40.593533 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 73.888557 4.404897 -40.593533 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 73.888557 -20.276369 -40.593533 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 73.888557 -20.276369 -40.593533 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 73.888557 4.404897 -40.593533 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 73.888557 4.404897 -56.152416 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 73.888557 -20.276369 -56.152416 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 73.888557 -20.276369 -56.152416 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 73.888557 4.404897 -56.152416 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 87.452866 4.404897 -56.152416 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 87.452866 -20.276369 -56.152416 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 87.452866 -20.276369 -40.593533 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 73.888557 -20.276369 -40.593533 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 73.888557 -20.276369 -56.152416 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 87.452866 -20.276369 -56.152416 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 73.888557 4.404897 -40.593533 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 87.452866 4.404897 -40.593533 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 87.452866 4.404897 -56.152416 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 73.888557 4.404897 -56.152416 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_2_location.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 81.001663 -9.636604 -49.669613 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 81.001663 -7.636604 -49.669613 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 81.001663 -7.636604 -47.669613 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 81.001663 -9.636604 -47.669613 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 81.001663 -9.636604 -47.669613 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 81.001663 -7.636604 -47.669613 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 79.001663 -7.636604 -47.669613 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 79.001663 -9.636604 -47.669613 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 79.001663 -9.636604 -47.669613 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 79.001663 -7.636604 -47.669613 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 79.001663 -7.636604 -49.669613 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 79.001663 -9.636604 -49.669613 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 79.001663 -9.636604 -49.669613 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 79.001663 -7.636604 -49.669613 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 81.001663 -7.636604 -49.669613 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 81.001663 -9.636604 -49.669613 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 81.001663 -9.636604 -47.669613 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 79.001663 -9.636604 -47.669613 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 79.001663 -9.636604 -49.669613 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 81.001663 -9.636604 -49.669613 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 79.001663 -7.636604 -47.669613 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 81.001663 -7.636604 -47.669613 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 81.001663 -7.636604 -49.669613 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 79.001663 -7.636604 -49.669613 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/checkpoint_2_velocity.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 83.363068 -9.636604 -49.655807 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 83.363068 -7.636604 -49.655807 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 83.363068 -7.636604 -47.655807 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 83.363068 -9.636604 -47.655807 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 83.363068 -9.636604 -47.655807 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 83.363068 -7.636604 -47.655807 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 81.363068 -7.636604 -47.655807 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 81.363068 -9.636604 -47.655807 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 81.363068 -9.636604 -47.655807 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 81.363068 -7.636604 -47.655807 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 81.363068 -7.636604 -49.655807 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 81.363068 -9.636604 -49.655807 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 81.363068 -9.636604 -49.655807 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 81.363068 -7.636604 -49.655807 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 83.363068 -7.636604 -49.655807 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 83.363068 -9.636604 -49.655807 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 83.363068 -9.636604 -47.655807 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 81.363068 -9.636604 -47.655807 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 81.363068 -9.636604 -49.655807 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 83.363068 -9.636604 -49.655807 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 81.363068 -7.636604 -47.655807 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 83.363068 -7.636604 -47.655807 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 83.363068 -7.636604 -49.655807 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 81.363068 -7.636604 -49.655807 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/even_better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/even_better_assets.blend -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/even_better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/even_better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/star_1_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 31.705128 -7.882124 -5.119452 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 31.705128 3.993608 -5.119452 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 31.705128 3.993608 6.756279 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 31.705128 -7.882124 6.756279 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 31.705128 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 31.705128 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -9.980280 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -9.980280 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -9.980280 -7.882124 6.756279 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -9.980280 3.993608 6.756279 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -9.980280 3.993608 -5.119452 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -9.980280 -7.882124 -5.119452 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -9.980280 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -9.980280 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 31.705128 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 31.705128 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 31.705128 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -9.980280 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -9.980280 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 31.705128 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -9.980280 3.993608 6.756279 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 31.705128 3.993608 6.756279 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 31.705128 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -9.980280 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/sun_occluder_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 51.493824 -30.408215 8.692553 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 51.493824 -2.110556 8.692553 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 51.493824 -2.110556 26.038294 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 51.493824 -30.408215 26.038294 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 51.493824 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 51.493824 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 32.160374 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 32.160374 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 32.160374 -30.408215 26.038294 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 32.160374 -2.110556 26.038294 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 32.160374 -2.110556 8.692553 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 32.160374 -30.408215 8.692553 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 32.160374 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 32.160374 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 51.493824 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 51.493824 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 51.493824 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 32.160374 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 32.160374 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 51.493824 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 32.160374 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 51.493824 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 51.493824 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 32.160374 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/triangle.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 4 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | property uchar red 14 | property uchar green 15 | property uchar blue 16 | property uchar alpha 17 | element face 1 18 | property list uchar uint vertex_indices 19 | end_header 20 | 3.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 0.000000 0.000000 109 255 143 255 21 | 1.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 1.000000 0.000000 111 255 144 255 22 | 1.347760 -3.219050 -3.357359 0.000000 1.000000 0.000000 1.000000 0.009273 111 255 143 255 23 | 3.347760 -3.219050 -1.375905 0.000000 1.000000 0.000000 0.000000 1.000000 115 255 146 255 24 | 4 0 1 2 3 25 | -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/yet_even_better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/yet_even_better_assets.blend -------------------------------------------------------------------------------- /test/desmos-plane-2/assets/yet_even_better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane-2/assets/yet_even_better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-plane-2/dummy-expression-perf.lisp: -------------------------------------------------------------------------------- 1 | (folder ((title "Bulk Data (DO NOT OPEN)")) 2 | (inlineJS " 3 | return new Array(100000).fill(0).map((e, i) => { 4 | return ['+','1','1']; 5 | }); 6 | ") 7 | ) -------------------------------------------------------------------------------- /test/desmos-plane-2/fast-exporter/ply-export-utility.py: -------------------------------------------------------------------------------- 1 | bl_info = { 2 | "name": "PLY Exporter Utility for Desmos Plane", 3 | "blender": (2, 92, 0), 4 | "category": "Object", 5 | } 6 | 7 | import bpy 8 | 9 | # class ExportVisibleMenu(bpy.types.Menu): 10 | # bl_idname = "view3D.export_visible" 11 | # bl_label = "Export Visible as PLY" 12 | 13 | # def draw(self, context): 14 | # layout = self.layout 15 | 16 | # layout.operator("mesh.primitive_cube_add") 17 | # layout.operator("object.duplicate_move") 18 | # # layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE' 19 | 20 | class VIEW3D_OT_export_visible(bpy.types.Operator): 21 | bl_idname = "mesh.export_visible" 22 | bl_label = "Export Visible Objects as PLY" 23 | 24 | def execute(self, context): 25 | print("PLY EXPORT: ") 26 | for obj in context.scene.objects: 27 | obj.select_set(False) 28 | if obj.visible_get(): 29 | print("Exporting " + obj.name +" ...") 30 | obj.select_set(True) 31 | bpy.ops.export_mesh.ply( 32 | filepath=bpy.path.abspath("//" + obj.name + ".ply"), 33 | use_selection=True, 34 | check_existing=False, 35 | use_ascii=True, 36 | axis_forward="Z", 37 | axis_up="Y" 38 | ) 39 | obj.select_set(False) 40 | 41 | 42 | return {'FINISHED'} 43 | 44 | 45 | def draw_export_visible(self, context): 46 | self.layout.operator(VIEW3D_OT_export_visible.bl_idname, text=VIEW3D_OT_export_visible.bl_label) 47 | 48 | def register(): 49 | bpy.utils.register_class(VIEW3D_OT_export_visible) 50 | bpy.types.VIEW3D_MT_object.append(draw_export_visible) 51 | print("GOT HERE") 52 | #bpy.ops.wm.call_menu(name=ExportVisibleMenu.bl_idname) 53 | 54 | def unregister(): 55 | bpy.types.VIEW3D_MT_object.remove(draw_export_visible) 56 | bpy.utils.unregister_class(VIEW3D_OT_export_visible) 57 | 58 | if __name__ == "__main__": register() -------------------------------------------------------------------------------- /test/desmos-plane-2/import-helpers.lisp: -------------------------------------------------------------------------------- 1 | 2 | (inlineJS " 3 | compiler.macroState.desmosPlane.rootPath = 'http://localhost:8080/desmos-plane-2/'; 4 | compiler.macroState.desmosPlane.assetPath = 'http://localhost:8080/desmos-plane-2/assets/'; 5 | return []; 6 | " 7 | ) 8 | (evalMacro withAssetPath 9 | " 10 | let url = '\u0022' + compiler.macroState.desmosPlane.assetPath + args[2].slice(1, args[2].length-1) + '\u0022'; 11 | console.log(url); 12 | return [[args[1], url, ...(args.slice(3))]]; 13 | " 14 | ) 15 | (evalMacro withRootPath 16 | " 17 | let url = '\u0022' + compiler.macroState.desmosPlane.assetPath + args[2].slice(1, args[2].length-1) + '\u0022'; 18 | console.log(url); 19 | return [[args[1], url, ...(args.slice(3))]]; 20 | " 21 | ) 22 | (defineFindAndReplace PLYGet fileVar elementType propertyType 23 | ((concatTokens fileVar ELEM elementType PROP propertyType)) 24 | ) 25 | (fn indexedMean property indices 26 | (comprehension ( 27 | (mean 28 | ([] property ([] indices (+ n -2))) 29 | ([] property ([] indices (+ n -1))) 30 | ([] property ([] indices (+ n 0))) 31 | ) 32 | ) 33 | (n (* 3 (list 1 ... (/ (floor (length indices)) 3))))) 34 | ) 35 | (defineFindAndReplace getFaceColors plyName ( 36 | (= (PLYGet plyName face red) (indexedMean (PLYGet plyName vertex red) (PLYGet plyName face vertexunderscoreindices))) 37 | (= (PLYGet plyName face green) (indexedMean (PLYGet plyName vertex green) (PLYGet plyName face vertexunderscoreindices))) 38 | (= (PLYGet plyName face blue) (indexedMean (PLYGet plyName vertex blue) (PLYGet plyName face vertexunderscoreindices))) 39 | )) 40 | (inlineJS 41 | "return [['triggerFlag', 'IMPORT_HELPERS_LOADED']]" 42 | ) 43 | (triggerFlag IMPORT_HELPERS_LOADED) -------------------------------------------------------------------------------- /test/desmos-plane-2/linalg.lisp: -------------------------------------------------------------------------------- 1 | (folder ((title "Linear Algebra")) 2 | 3 | 4 | 5 | (multilayerFn dotNormalized x1 y1 z1 x2 y2 z2 6 | ( 7 | (mag1 (sqrt (+ (* x1 x1) (* y1 y1) (* z1 z1)))) 8 | (mag2 (sqrt (+ (* x2 x2) (* y2 y2) (* z2 z2)))) 9 | (result (+ (* (/ x1 mag1) (/ x2 mag2)) (* (/ y1 mag1) (/ y2 mag2)) (* (/ z1 mag1) (/ z2 mag2)))) 10 | ) 11 | ) 12 | (fn normalizeList L 13 | (/ L (sqrt (+ (* ([] L 1) ([] L 1)) (* ([] L 2) ([] L 2)) (* ([] L 3) ([] L 3))))) 14 | ) 15 | 16 | (= a 1) 17 | (dotNormalized 2 2 2 -3 -3 -3) 18 | 19 | (defineFindAndReplace xStaticCross ax ay az bx by bz 20 | ((- (* ay bz) (* az by))) 21 | ) 22 | (defineFindAndReplace yStaticCross ax ay az bx by bz 23 | ((- (* az bx) (* ax bz))) 24 | ) 25 | (defineFindAndReplace zStaticCross ax ay az bx by bz 26 | ((- (* ax by) (* ay bx))) 27 | ) 28 | (defineFindAndReplace staticDot x1 y1 z1 x2 y2 z2 29 | ((+ (* x1 x2) (* y1 y2) (* z1 z2))) 30 | ) 31 | (multilayerFn mullerTrumbore 32 | xRay yRay zRay 33 | xDir yDir zDir 34 | xTri1 yTri1 zTri1 35 | xTri2 yTri2 zTri2 36 | xTri3 yTri3 zTri3 37 | ( 38 | (xE1 (- xTri2 xTri1)) 39 | (yE1 (- yTri2 yTri1)) 40 | (zE1 (- zTri2 zTri1)) 41 | (xE2 (- xTri3 xTri1)) 42 | (yE2 (- yTri3 yTri1)) 43 | (zE2 (- zTri3 zTri1)) 44 | (xN (xStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 45 | (yN (yStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 46 | (zN (zStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 47 | (det (* -1 (staticDot xDir yDir zDir xN yN zN))) 48 | (invdet (/ 1 det)) 49 | (xAO (- xRay xTri1)) 50 | (yAO (- yRay yTri1)) 51 | (zAO (- zRay zTri1)) 52 | (xDAO (xStaticCross xAO yAO zAO xDir yDir zDir)) 53 | (yDAO (yStaticCross xAO yAO zAO xDir yDir zDir)) 54 | (zDAO (zStaticCross xAO yAO zAO xDir yDir zDir)) 55 | (u (* (staticDot xE2 yE2 zE2 xDAO yDAO zDAO) invdet)) 56 | (v (* -1 (staticDot xE1 yE1 zE1 xDAO yDAO zDAO) invdet)) 57 | (t (* (staticDot xAO yAO zAO xN yN zN) invdet)) 58 | (return (piecewise 59 | ((< det 0.00001) -1) 60 | ((< t 0) -1) 61 | ((< u 0) -1) 62 | ((< v 0) -1) 63 | ((> (+ u v) 1) -1) 64 | (t) 65 | )) 66 | ;(return det) 67 | ) 68 | ) 69 | ) -------------------------------------------------------------------------------- /test/desmos-plane/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/.DS_Store -------------------------------------------------------------------------------- /test/desmos-plane/assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/assets.blend -------------------------------------------------------------------------------- /test/desmos-plane/assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/assets.blend1 -------------------------------------------------------------------------------- /test/desmos-plane/assets/.gitignore: -------------------------------------------------------------------------------- 1 | *.ply -------------------------------------------------------------------------------- /test/desmos-plane/assets/Camera.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 0 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | element face 0 12 | property list uchar uint vertex_indices 13 | end_header 14 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/Light.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 0 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | element face 0 12 | property list uchar uint vertex_indices 13 | end_header 14 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/assets/better_assets.blend -------------------------------------------------------------------------------- /test/desmos-plane/assets/better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/assets/better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_1_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 31.705128 -7.882124 -5.119452 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 31.705128 3.993608 -5.119452 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 31.705128 3.993608 6.756279 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 31.705128 -7.882124 6.756279 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 31.705128 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 31.705128 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -9.980280 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -9.980280 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -9.980280 -7.882124 6.756279 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -9.980280 3.993608 6.756279 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -9.980280 3.993608 -5.119452 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -9.980280 -7.882124 -5.119452 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -9.980280 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -9.980280 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 31.705128 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 31.705128 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 31.705128 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -9.980280 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -9.980280 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 31.705128 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -9.980280 3.993608 6.756279 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 31.705128 3.993608 6.756279 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 31.705128 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -9.980280 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_2_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 30.429953 -9.789210 -4.670620 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 30.429953 3.993608 -4.670620 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 30.429953 3.993608 20.662380 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 30.429953 -9.789210 20.662380 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 30.429953 -9.789210 20.662380 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 30.429953 3.993608 20.662380 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 12.564945 3.993608 20.662380 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 12.564945 -9.789210 20.662380 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 12.564945 -9.789210 20.662380 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 12.564945 3.993608 20.662380 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 12.564945 3.993608 -4.670620 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 12.564945 -9.789210 -4.670620 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 12.564945 -9.789210 -4.670620 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 12.564945 3.993608 -4.670620 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 30.429953 3.993608 -4.670620 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 30.429953 -9.789210 -4.670620 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 30.429953 -9.789210 20.662380 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 12.564945 -9.789210 20.662380 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 12.564945 -9.789210 -4.670620 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 30.429953 -9.789210 -4.670620 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 12.564945 3.993608 20.662380 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 30.429953 3.993608 20.662380 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 30.429953 3.993608 -4.670620 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 12.564945 3.993608 -4.670620 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_3_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 45.654224 -21.699911 9.987393 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 45.654224 3.993608 9.987393 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 45.654224 3.993608 26.038294 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 45.654224 -21.699911 26.038294 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 45.654224 -21.699911 26.038294 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 45.654224 3.993608 26.038294 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 15.903553 3.993608 26.038294 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 15.903553 -21.699911 26.038294 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 15.903553 -21.699911 26.038294 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 15.903553 3.993608 26.038294 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 15.903553 3.993608 9.987393 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 15.903553 -21.699911 9.987393 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 15.903553 -21.699911 9.987393 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 15.903553 3.993608 9.987393 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 45.654224 3.993608 9.987393 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 45.654224 -21.699911 9.987393 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 45.654224 -21.699911 26.038294 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 15.903553 -21.699911 26.038294 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 15.903553 -21.699911 9.987393 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 45.654224 -21.699911 9.987393 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 15.903553 3.993608 26.038294 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 45.654224 3.993608 26.038294 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 45.654224 3.993608 9.987393 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 15.903553 3.993608 9.987393 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_4_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 51.493824 -30.408215 4.148141 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 51.493824 -2.110556 4.148141 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 51.493824 -2.110556 26.038294 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 51.493824 -30.408215 26.038294 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 51.493824 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 51.493824 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 31.138721 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 31.138721 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 31.138721 -30.408215 26.038294 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 31.138721 -2.110556 26.038294 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 31.138721 -2.110556 4.148141 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 31.138721 -30.408215 4.148141 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 31.138721 -30.408215 4.148141 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 31.138721 -2.110556 4.148141 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 51.493824 -2.110556 4.148141 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 51.493824 -30.408215 4.148141 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 51.493824 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 31.138721 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 31.138721 -30.408215 4.148141 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 51.493824 -30.408215 4.148141 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 31.138721 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 51.493824 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 51.493824 -2.110556 4.148141 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 31.138721 -2.110556 4.148141 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_5_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 60.288872 -33.932014 -34.995197 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 60.288872 -15.369076 -34.995197 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 60.288872 -15.369076 17.529812 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 60.288872 -33.932014 17.529812 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 60.288872 -33.932014 17.529812 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 60.288872 -15.369076 17.529812 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 39.909309 -15.369076 17.529812 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 39.909309 -33.932014 17.529812 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 39.909309 -33.932014 17.529812 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 39.909309 -15.369076 17.529812 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 39.909309 -15.369076 -34.995197 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 39.909309 -33.932014 -34.995197 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 39.909309 -33.932014 -34.995197 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 39.909309 -15.369076 -34.995197 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 60.288872 -15.369076 -34.995197 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 60.288872 -33.932014 -34.995197 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 60.288872 -33.932014 17.529812 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 39.909309 -33.932014 17.529812 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 39.909309 -33.932014 -34.995197 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 60.288872 -33.932014 -34.995197 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 39.909309 -15.369076 17.529812 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 60.288872 -15.369076 17.529812 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 60.288872 -15.369076 -34.995197 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 39.909309 -15.369076 -34.995197 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/canyon_6_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 80.846245 -34.944389 -56.240852 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 80.846245 -13.485834 -56.240852 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 80.846245 -13.485834 -21.554026 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 80.846245 -34.944389 -21.554026 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 80.846245 -34.944389 -21.554026 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 80.846245 -13.485834 -21.554026 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 43.932793 -13.485834 -21.554026 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 43.932793 -34.944389 -21.554026 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 43.932793 -34.944389 -21.554026 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 43.932793 -13.485834 -21.554026 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 43.932793 -13.485834 -56.240852 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 43.932793 -34.944389 -56.240852 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 43.932793 -34.944389 -56.240852 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 43.932793 -13.485834 -56.240852 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 80.846245 -13.485834 -56.240852 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 80.846245 -34.944389 -56.240852 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 80.846245 -34.944389 -21.554026 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 43.932793 -34.944389 -21.554026 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 43.932793 -34.944389 -56.240852 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 80.846245 -34.944389 -56.240852 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 43.932793 -13.485834 -21.554026 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 80.846245 -13.485834 -21.554026 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 80.846245 -13.485834 -56.240852 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 43.932793 -13.485834 -56.240852 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/checkpoint_2_collider.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 63.618927 -36.991177 -10.732491 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 63.618927 -12.309911 -10.732491 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 63.618927 -12.309911 4.826391 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 63.618927 -36.991177 4.826391 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 63.618927 -36.991177 4.826391 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 63.618927 -12.309911 4.826391 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 36.554798 -12.309911 4.826391 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 36.554798 -36.991177 4.826391 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 36.554798 -36.991177 4.826391 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 36.554798 -12.309911 4.826391 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 36.554798 -12.309911 -10.732491 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 36.554798 -36.991177 -10.732491 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 36.554798 -36.991177 -10.732491 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 36.554798 -12.309911 -10.732491 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 63.618927 -12.309911 -10.732491 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 63.618927 -36.991177 -10.732491 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 63.618927 -36.991177 4.826391 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 36.554798 -36.991177 4.826391 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 36.554798 -36.991177 -10.732491 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 63.618927 -36.991177 -10.732491 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 36.554798 -12.309911 4.826391 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 63.618927 -12.309911 4.826391 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 63.618927 -12.309911 -10.732491 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 36.554798 -12.309911 -10.732491 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/checkpoint_2_location.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 49.350079 -27.326485 3.845224 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 49.350079 -25.326485 3.845224 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 49.350079 -25.326485 5.845224 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 49.350079 -27.326485 5.845224 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 49.350079 -27.326485 5.845224 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 49.350079 -25.326485 5.845224 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 47.350079 -25.326485 5.845224 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 47.350079 -27.326485 5.845224 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 47.350079 -27.326485 5.845224 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 47.350079 -25.326485 5.845224 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 47.350079 -25.326485 3.845224 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 47.350079 -27.326485 3.845224 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 47.350079 -27.326485 3.845224 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 47.350079 -25.326485 3.845224 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 49.350079 -25.326485 3.845224 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 49.350079 -27.326485 3.845224 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 49.350079 -27.326485 5.845224 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 47.350079 -27.326485 5.845224 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 47.350079 -27.326485 3.845224 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 49.350079 -27.326485 3.845224 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 47.350079 -25.326485 5.845224 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 49.350079 -25.326485 5.845224 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 49.350079 -25.326485 3.845224 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 47.350079 -25.326485 3.845224 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/checkpoint_2_velocity.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 49.350079 -27.326485 0.306883 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 49.350079 -25.326485 0.306883 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 49.350079 -25.326485 2.306883 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 49.350079 -27.326485 2.306883 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 49.350079 -27.326485 2.306883 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 49.350079 -25.326485 2.306883 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 47.350079 -25.326485 2.306883 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 47.350079 -27.326485 2.306883 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 47.350079 -27.326485 2.306883 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 47.350079 -25.326485 2.306883 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 47.350079 -25.326485 0.306883 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 47.350079 -27.326485 0.306883 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 47.350079 -27.326485 0.306883 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 47.350079 -25.326485 0.306883 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 49.350079 -25.326485 0.306883 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 49.350079 -27.326485 0.306883 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 49.350079 -27.326485 2.306883 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 47.350079 -27.326485 2.306883 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 47.350079 -27.326485 0.306883 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 49.350079 -27.326485 0.306883 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 47.350079 -25.326485 2.306883 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 49.350079 -25.326485 2.306883 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 49.350079 -25.326485 0.306883 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 47.350079 -25.326485 0.306883 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/menu_scene_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | -35.895309 -12.801314 36.133404 1.000000 0.000000 0.000000 0.375000 0.000000 17 | -35.895309 5.761622 36.133404 1.000000 0.000000 0.000000 0.625000 0.000000 18 | -35.895309 5.761622 64.227188 1.000000 0.000000 0.000000 0.625000 0.250000 19 | -35.895309 -12.801314 64.227188 1.000000 0.000000 0.000000 0.375000 0.250000 20 | -35.895309 -12.801314 64.227188 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | -35.895309 5.761622 64.227188 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -66.425362 5.761622 64.227188 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -66.425362 -12.801314 64.227188 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -66.425362 -12.801314 64.227188 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -66.425362 5.761622 64.227188 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -66.425362 5.761622 36.133404 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -66.425362 -12.801314 36.133404 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -66.425362 -12.801314 36.133404 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -66.425362 5.761622 36.133404 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | -35.895309 5.761622 36.133404 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | -35.895309 -12.801314 36.133404 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | -35.895309 -12.801314 64.227188 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -66.425362 -12.801314 64.227188 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -66.425362 -12.801314 36.133404 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | -35.895309 -12.801314 36.133404 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -66.425362 5.761622 64.227188 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | -35.895309 5.761622 64.227188 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | -35.895309 5.761622 36.133404 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -66.425362 5.761622 36.133404 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/star_1_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 31.705128 -7.882124 -5.119452 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 31.705128 3.993608 -5.119452 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 31.705128 3.993608 6.756279 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 31.705128 -7.882124 6.756279 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 31.705128 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 31.705128 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -9.980280 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -9.980280 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -9.980280 -7.882124 6.756279 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -9.980280 3.993608 6.756279 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -9.980280 3.993608 -5.119452 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -9.980280 -7.882124 -5.119452 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -9.980280 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -9.980280 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 31.705128 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 31.705128 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 31.705128 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -9.980280 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -9.980280 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 31.705128 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -9.980280 3.993608 6.756279 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 31.705128 3.993608 6.756279 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 31.705128 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -9.980280 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/sun_occluder_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 51.493824 -30.408215 8.692553 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 51.493824 -2.110556 8.692553 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 51.493824 -2.110556 26.038294 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 51.493824 -30.408215 26.038294 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 51.493824 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 51.493824 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 32.160374 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 32.160374 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 32.160374 -30.408215 26.038294 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 32.160374 -2.110556 26.038294 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 32.160374 -2.110556 8.692553 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 32.160374 -30.408215 8.692553 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 32.160374 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 32.160374 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 51.493824 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 51.493824 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 51.493824 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 32.160374 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 32.160374 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 51.493824 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 32.160374 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 51.493824 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 51.493824 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 32.160374 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-plane/assets/triangle.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.92.0 - www.blender.org 4 | element vertex 4 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | property uchar red 14 | property uchar green 15 | property uchar blue 16 | property uchar alpha 17 | element face 1 18 | property list uchar uint vertex_indices 19 | end_header 20 | 3.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 0.000000 0.000000 109 255 143 255 21 | 1.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 1.000000 0.000000 111 255 144 255 22 | 1.347760 -3.219050 -3.357359 0.000000 1.000000 0.000000 1.000000 0.009273 111 255 143 255 23 | 3.347760 -3.219050 -1.375905 0.000000 1.000000 0.000000 0.000000 1.000000 115 255 146 255 24 | 4 0 1 2 3 25 | -------------------------------------------------------------------------------- /test/desmos-plane/fast-exporter/ply-export-utility.py: -------------------------------------------------------------------------------- 1 | bl_info = { 2 | "name": "PLY Exporter Utility for Desmos Plane", 3 | "blender": (2, 92, 0), 4 | "category": "Object", 5 | } 6 | 7 | import bpy 8 | 9 | # class ExportVisibleMenu(bpy.types.Menu): 10 | # bl_idname = "view3D.export_visible" 11 | # bl_label = "Export Visible as PLY" 12 | 13 | # def draw(self, context): 14 | # layout = self.layout 15 | 16 | # layout.operator("mesh.primitive_cube_add") 17 | # layout.operator("object.duplicate_move") 18 | # # layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE' 19 | 20 | class VIEW3D_OT_export_visible(bpy.types.Operator): 21 | bl_idname = "mesh.export_visible" 22 | bl_label = "Export Visible Objects as PLY" 23 | 24 | def execute(self, context): 25 | print("PLY EXPORT: ") 26 | for obj in context.scene.objects: 27 | obj.select_set(False) 28 | if obj.visible_get(): 29 | print("Exporting " + obj.name +" ...") 30 | obj.select_set(True) 31 | bpy.ops.export_mesh.ply( 32 | filepath=bpy.path.abspath("//" + obj.name + ".ply"), 33 | use_selection=True, 34 | check_existing=False, 35 | use_ascii=True, 36 | axis_forward="Z", 37 | axis_up="Y" 38 | ) 39 | obj.select_set(False) 40 | 41 | 42 | return {'FINISHED'} 43 | 44 | 45 | def draw_export_visible(self, context): 46 | self.layout.operator(VIEW3D_OT_export_visible.bl_idname, text=VIEW3D_OT_export_visible.bl_label) 47 | 48 | def register(): 49 | bpy.utils.register_class(VIEW3D_OT_export_visible) 50 | bpy.types.VIEW3D_MT_object.append(draw_export_visible) 51 | print("GOT HERE") 52 | #bpy.ops.wm.call_menu(name=ExportVisibleMenu.bl_idname) 53 | 54 | def unregister(): 55 | bpy.types.VIEW3D_MT_object.remove(draw_export_visible) 56 | bpy.utils.unregister_class(VIEW3D_OT_export_visible) 57 | 58 | if __name__ == "__main__": register() -------------------------------------------------------------------------------- /test/desmos-plane/import-helpers.lisp: -------------------------------------------------------------------------------- 1 | 2 | (evalMacro withAssetPath 3 | " 4 | let url = '\u0022http://localhost:8080/desmos-plane/assets/' + args[2].slice(1, args[2].length-1) + '\u0022'; 5 | console.log(url); 6 | return [[args[1], url, args[3]]]; 7 | " 8 | ) 9 | (evalMacro withRootPath 10 | " 11 | let url = '\u0022http://localhost:8080/desmos-plane/' + args[2].slice(1, args[2].length-1) + '\u0022'; 12 | console.log(url); 13 | return [[args[1], url, args[3]]]; 14 | " 15 | ) -------------------------------------------------------------------------------- /test/desmos-plane/perftest.lisp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-plane/perftest.lisp -------------------------------------------------------------------------------- /test/desmos-plane/test.js: -------------------------------------------------------------------------------- 1 | return [['+', '1', '1']] -------------------------------------------------------------------------------- /test/desmos-racer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-racer/.DS_Store -------------------------------------------------------------------------------- /test/desmos-racer/assets/Camera.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 0 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | element face 0 12 | property list uchar uint vertex_indices 13 | end_header 14 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/Light.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 0 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | element face 0 12 | property list uchar uint vertex_indices 13 | end_header 14 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-racer/assets/better_assets.blend -------------------------------------------------------------------------------- /test/desmos-racer/assets/better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-racer/assets/better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-racer/assets/canyon_1_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 31.864651 -9.106717 -14.201698 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 31.864651 8.212806 -14.201698 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 31.864651 8.212806 4.619730 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 31.864651 -9.106717 4.619730 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 31.864651 -9.106717 4.619730 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 31.864651 8.212806 4.619730 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -28.929193 8.212806 4.619730 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -28.929193 -9.106717 4.619730 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -28.929193 -9.106717 4.619730 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -28.929193 8.212806 4.619730 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -28.929193 8.212806 -14.201698 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -28.929193 -9.106717 -14.201698 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -28.929193 -9.106717 -14.201698 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -28.929193 8.212806 -14.201698 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 31.864651 8.212806 -14.201698 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 31.864651 -9.106717 -14.201698 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 31.864651 -9.106717 4.619730 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -28.929193 -9.106717 4.619730 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -28.929193 -9.106717 -14.201698 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 31.864651 -9.106717 -14.201698 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -28.929193 8.212806 4.619730 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 31.864651 8.212806 4.619730 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 31.864651 8.212806 -14.201698 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -28.929193 8.212806 -14.201698 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/canyon_2_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 35.844608 -9.106717 -44.258804 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 35.844608 8.212806 -44.258804 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 35.844608 8.212806 -2.760302 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 35.844608 -9.106717 -2.760302 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 35.844608 -9.106717 -2.760302 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 35.844608 8.212806 -2.760302 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 10.231773 8.212806 -2.760302 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 10.231773 -9.106717 -2.760302 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 10.231773 -9.106717 -2.760302 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 10.231773 8.212806 -2.760302 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 10.231773 8.212806 -44.258804 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 10.231773 -9.106717 -44.258804 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 10.231773 -9.106717 -44.258804 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 10.231773 8.212806 -44.258804 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 35.844608 8.212806 -44.258804 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 35.844608 -9.106717 -44.258804 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 35.844608 -9.106717 -2.760302 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 10.231773 -9.106717 -2.760302 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 10.231773 -9.106717 -44.258804 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 35.844608 -9.106717 -44.258804 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 10.231773 8.212806 -2.760302 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 35.844608 8.212806 -2.760302 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 35.844608 8.212806 -44.258804 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 10.231773 8.212806 -44.258804 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/canyon_3_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 80.024155 -24.042435 -55.294125 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 80.024155 10.097390 -55.294125 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 80.024155 10.097390 -25.607994 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 80.024155 -24.042435 -25.607994 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 80.024155 -24.042435 -25.607994 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 80.024155 10.097390 -25.607994 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 8.229689 10.097390 -25.607994 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 8.229689 -24.042435 -25.607994 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 8.229689 -24.042435 -25.607994 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 8.229689 10.097390 -25.607994 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 8.229689 10.097390 -55.294125 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 8.229689 -24.042435 -55.294125 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 8.229689 -24.042435 -55.294125 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 8.229689 10.097390 -55.294125 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 80.024155 10.097390 -55.294125 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 80.024155 -24.042435 -55.294125 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 80.024155 -24.042435 -25.607994 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 8.229689 -24.042435 -25.607994 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 8.229689 -24.042435 -55.294125 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 80.024155 -24.042435 -55.294125 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 8.229689 10.097390 -25.607994 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 80.024155 10.097390 -25.607994 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 80.024155 10.097390 -55.294125 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 8.229689 10.097390 -55.294125 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/canyon_4_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 109.004379 -29.441181 -71.827538 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 109.004379 4.698644 -71.827538 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 109.004379 4.698644 -28.526434 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 109.004379 -29.441181 -28.526434 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 109.004379 -29.441181 -28.526434 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 109.004379 4.698644 -28.526434 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 54.451439 4.698644 -28.526434 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 54.451439 -29.441181 -28.526434 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 54.451439 -29.441181 -28.526434 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 54.451439 4.698644 -28.526434 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 54.451439 4.698644 -71.827538 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 54.451439 -29.441181 -71.827538 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 54.451439 -29.441181 -71.827538 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 54.451439 4.698644 -71.827538 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 109.004379 4.698644 -71.827538 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 109.004379 -29.441181 -71.827538 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 109.004379 -29.441181 -28.526434 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 54.451439 -29.441181 -28.526434 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 54.451439 -29.441181 -71.827538 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 109.004379 -29.441181 -71.827538 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 54.451439 4.698644 -28.526434 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 109.004379 4.698644 -28.526434 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 109.004379 4.698644 -71.827538 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 54.451439 4.698644 -71.827538 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/canyon_6_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 130.878250 -32.588226 -99.397537 -1.000000 0.000000 0.000000 0.375000 0.000000 17 | 130.878250 1.551600 -99.397537 -1.000000 0.000000 0.000000 0.625000 0.000000 18 | 130.878250 1.551600 -144.987869 -1.000000 0.000000 0.000000 0.625000 0.250000 19 | 130.878250 -32.588226 -144.987869 -1.000000 0.000000 0.000000 0.375000 0.250000 20 | 130.878250 -32.588226 -144.987869 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 130.878250 1.551600 -144.987869 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 93.825386 1.551600 -144.987869 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 93.825386 -32.588226 -144.987869 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 93.825386 -32.588226 -144.987869 1.000000 0.000000 0.000000 0.375000 0.500000 25 | 93.825386 1.551600 -144.987869 1.000000 0.000000 0.000000 0.625000 0.500000 26 | 93.825386 1.551600 -99.397537 1.000000 0.000000 0.000000 0.625000 0.750000 27 | 93.825386 -32.588226 -99.397537 1.000000 0.000000 0.000000 0.375000 0.750000 28 | 93.825386 -32.588226 -99.397537 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 93.825386 1.551600 -99.397537 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 130.878250 1.551600 -99.397537 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 130.878250 -32.588226 -99.397537 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 130.878250 -32.588226 -144.987869 0.000000 1.000000 0.000000 0.125000 0.500000 33 | 93.825386 -32.588226 -144.987869 0.000000 1.000000 0.000000 0.375000 0.500000 34 | 93.825386 -32.588226 -99.397537 0.000000 1.000000 0.000000 0.375000 0.750000 35 | 130.878250 -32.588226 -99.397537 0.000000 1.000000 0.000000 0.125000 0.750000 36 | 93.825386 1.551600 -144.987869 0.000000 -1.000000 -0.000000 0.625000 0.500000 37 | 130.878250 1.551600 -144.987869 0.000000 -1.000000 -0.000000 0.875000 0.500000 38 | 130.878250 1.551600 -99.397537 0.000000 -1.000000 -0.000000 0.875000 0.750000 39 | 93.825386 1.551600 -99.397537 0.000000 -1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_1_collider.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 21.638927 -23.461176 -5.782491 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 21.638927 1.220089 -5.782491 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 21.638927 1.220089 9.776390 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 21.638927 -23.461176 9.776390 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 21.638927 -23.461176 9.776390 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 21.638927 1.220089 9.776390 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -5.425201 1.220089 9.776390 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -5.425201 -23.461176 9.776390 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -5.425201 -23.461176 9.776390 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -5.425201 1.220089 9.776390 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -5.425201 1.220089 -5.782491 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -5.425201 -23.461176 -5.782491 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -5.425201 -23.461176 -5.782491 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -5.425201 1.220089 -5.782491 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 21.638927 1.220089 -5.782491 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 21.638927 -23.461176 -5.782491 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 21.638927 -23.461176 9.776390 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -5.425201 -23.461176 9.776390 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -5.425201 -23.461176 -5.782491 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 21.638927 -23.461176 -5.782491 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -5.425201 1.220089 9.776390 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 21.638927 1.220089 9.776390 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 21.638927 1.220089 -5.782491 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -5.425201 1.220089 -5.782491 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_1_location.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 1.000000 -1.000000 -1.000000 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 1.000000 1.000000 -1.000000 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 1.000000 -1.000000 1.000000 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 1.000000 1.000000 1.000000 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -1.000000 1.000000 1.000000 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -1.000000 -1.000000 1.000000 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -1.000000 1.000000 1.000000 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -1.000000 1.000000 -1.000000 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -1.000000 -1.000000 -1.000000 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -1.000000 -1.000000 -1.000000 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -1.000000 1.000000 -1.000000 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 1.000000 1.000000 -1.000000 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 1.000000 -1.000000 -1.000000 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 1.000000 -1.000000 1.000000 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -1.000000 -1.000000 1.000000 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -1.000000 -1.000000 -1.000000 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 1.000000 -1.000000 -1.000000 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -1.000000 1.000000 1.000000 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 1.000000 1.000000 1.000000 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 1.000000 1.000000 -1.000000 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -1.000000 1.000000 -1.000000 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_1_velocity.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 1.637077 -1.000000 -0.937437 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 1.637077 1.000000 -0.937437 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 1.637077 1.000000 1.062563 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 1.637077 -1.000000 1.062563 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 1.637077 -1.000000 1.062563 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 1.637077 1.000000 1.062563 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -0.362923 1.000000 1.062563 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -0.362923 -1.000000 1.062563 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -0.362923 -1.000000 1.062563 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -0.362923 1.000000 1.062563 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -0.362923 1.000000 -0.937437 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -0.362923 -1.000000 -0.937437 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -0.362923 -1.000000 -0.937437 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -0.362923 1.000000 -0.937437 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 1.637077 1.000000 -0.937437 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 1.637077 -1.000000 -0.937437 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 1.637077 -1.000000 1.062563 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -0.362923 -1.000000 1.062563 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -0.362923 -1.000000 -0.937437 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 1.637077 -1.000000 -0.937437 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -0.362923 1.000000 1.062563 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 1.637077 1.000000 1.062563 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 1.637077 1.000000 -0.937437 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -0.362923 1.000000 -0.937437 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_2_collider.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 87.452866 -20.276369 -56.152416 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 87.452866 4.404897 -56.152416 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 87.452866 4.404897 -40.593533 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 87.452866 -20.276369 -40.593533 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 87.452866 -20.276369 -40.593533 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 87.452866 4.404897 -40.593533 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 73.888557 4.404897 -40.593533 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 73.888557 -20.276369 -40.593533 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 73.888557 -20.276369 -40.593533 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 73.888557 4.404897 -40.593533 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 73.888557 4.404897 -56.152416 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 73.888557 -20.276369 -56.152416 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 73.888557 -20.276369 -56.152416 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 73.888557 4.404897 -56.152416 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 87.452866 4.404897 -56.152416 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 87.452866 -20.276369 -56.152416 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 87.452866 -20.276369 -40.593533 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 73.888557 -20.276369 -40.593533 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 73.888557 -20.276369 -56.152416 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 87.452866 -20.276369 -56.152416 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 73.888557 4.404897 -40.593533 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 87.452866 4.404897 -40.593533 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 87.452866 4.404897 -56.152416 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 73.888557 4.404897 -56.152416 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_2_location.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 81.001663 -9.636604 -49.669613 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 81.001663 -7.636604 -49.669613 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 81.001663 -7.636604 -47.669613 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 81.001663 -9.636604 -47.669613 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 81.001663 -9.636604 -47.669613 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 81.001663 -7.636604 -47.669613 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 79.001663 -7.636604 -47.669613 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 79.001663 -9.636604 -47.669613 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 79.001663 -9.636604 -47.669613 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 79.001663 -7.636604 -47.669613 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 79.001663 -7.636604 -49.669613 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 79.001663 -9.636604 -49.669613 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 79.001663 -9.636604 -49.669613 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 79.001663 -7.636604 -49.669613 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 81.001663 -7.636604 -49.669613 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 81.001663 -9.636604 -49.669613 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 81.001663 -9.636604 -47.669613 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 79.001663 -9.636604 -47.669613 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 79.001663 -9.636604 -49.669613 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 81.001663 -9.636604 -49.669613 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 79.001663 -7.636604 -47.669613 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 81.001663 -7.636604 -47.669613 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 81.001663 -7.636604 -49.669613 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 79.001663 -7.636604 -49.669613 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/checkpoint_2_velocity.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 83.363068 -9.636604 -49.655807 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 83.363068 -7.636604 -49.655807 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 83.363068 -7.636604 -47.655807 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 83.363068 -9.636604 -47.655807 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 83.363068 -9.636604 -47.655807 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 83.363068 -7.636604 -47.655807 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 81.363068 -7.636604 -47.655807 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 81.363068 -9.636604 -47.655807 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 81.363068 -9.636604 -47.655807 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 81.363068 -7.636604 -47.655807 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 81.363068 -7.636604 -49.655807 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 81.363068 -9.636604 -49.655807 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 81.363068 -9.636604 -49.655807 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 81.363068 -7.636604 -49.655807 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 83.363068 -7.636604 -49.655807 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 83.363068 -9.636604 -49.655807 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 83.363068 -9.636604 -47.655807 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 81.363068 -9.636604 -47.655807 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 81.363068 -9.636604 -49.655807 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 83.363068 -9.636604 -49.655807 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 81.363068 -7.636604 -47.655807 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 83.363068 -7.636604 -47.655807 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 83.363068 -7.636604 -49.655807 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 81.363068 -7.636604 -49.655807 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/even_better_assets.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-racer/assets/even_better_assets.blend -------------------------------------------------------------------------------- /test/desmos-racer/assets/even_better_assets.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radian628/lispsmos/4d90db78f507da19182111d254432075f7f8fcf9/test/desmos-racer/assets/even_better_assets.blend1 -------------------------------------------------------------------------------- /test/desmos-racer/assets/menu_scene_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | -35.895309 -12.801314 36.133404 1.000000 0.000000 0.000000 0.375000 0.000000 17 | -35.895309 5.761622 36.133404 1.000000 0.000000 0.000000 0.625000 0.000000 18 | -35.895309 5.761622 64.227188 1.000000 0.000000 0.000000 0.625000 0.250000 19 | -35.895309 -12.801314 64.227188 1.000000 0.000000 0.000000 0.375000 0.250000 20 | -35.895309 -12.801314 64.227188 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | -35.895309 5.761622 64.227188 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -66.425362 5.761622 64.227188 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -66.425362 -12.801314 64.227188 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -66.425362 -12.801314 64.227188 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -66.425362 5.761622 64.227188 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -66.425362 5.761622 36.133404 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -66.425362 -12.801314 36.133404 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -66.425362 -12.801314 36.133404 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -66.425362 5.761622 36.133404 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | -35.895309 5.761622 36.133404 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | -35.895309 -12.801314 36.133404 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | -35.895309 -12.801314 64.227188 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -66.425362 -12.801314 64.227188 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -66.425362 -12.801314 36.133404 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | -35.895309 -12.801314 36.133404 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -66.425362 5.761622 64.227188 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | -35.895309 5.761622 64.227188 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | -35.895309 5.761622 36.133404 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -66.425362 5.761622 36.133404 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/star_1_viewbox.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 31.705128 -7.882124 -5.119452 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 31.705128 3.993608 -5.119452 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 31.705128 3.993608 6.756279 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 31.705128 -7.882124 6.756279 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 31.705128 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 31.705128 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | -9.980280 3.993608 6.756279 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | -9.980280 -7.882124 6.756279 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | -9.980280 -7.882124 6.756279 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | -9.980280 3.993608 6.756279 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | -9.980280 3.993608 -5.119452 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | -9.980280 -7.882124 -5.119452 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | -9.980280 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | -9.980280 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 31.705128 3.993608 -5.119452 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 31.705128 -7.882124 -5.119452 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 31.705128 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | -9.980280 -7.882124 6.756279 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | -9.980280 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 31.705128 -7.882124 -5.119452 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | -9.980280 3.993608 6.756279 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 31.705128 3.993608 6.756279 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 31.705128 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | -9.980280 3.993608 -5.119452 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/sun_occluder_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | element face 6 14 | property list uchar uint vertex_indices 15 | end_header 16 | 51.493824 -30.408215 8.692553 1.000000 0.000000 0.000000 0.375000 0.000000 17 | 51.493824 -2.110556 8.692553 1.000000 0.000000 0.000000 0.625000 0.000000 18 | 51.493824 -2.110556 26.038294 1.000000 0.000000 0.000000 0.625000 0.250000 19 | 51.493824 -30.408215 26.038294 1.000000 0.000000 0.000000 0.375000 0.250000 20 | 51.493824 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.250000 21 | 51.493824 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.250000 22 | 32.160374 -2.110556 26.038294 -0.000000 0.000000 1.000000 0.625000 0.500000 23 | 32.160374 -30.408215 26.038294 -0.000000 0.000000 1.000000 0.375000 0.500000 24 | 32.160374 -30.408215 26.038294 -1.000000 0.000000 0.000000 0.375000 0.500000 25 | 32.160374 -2.110556 26.038294 -1.000000 0.000000 0.000000 0.625000 0.500000 26 | 32.160374 -2.110556 8.692553 -1.000000 0.000000 0.000000 0.625000 0.750000 27 | 32.160374 -30.408215 8.692553 -1.000000 0.000000 0.000000 0.375000 0.750000 28 | 32.160374 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 0.750000 29 | 32.160374 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 0.750000 30 | 51.493824 -2.110556 8.692553 -0.000000 0.000000 -1.000000 0.625000 1.000000 31 | 51.493824 -30.408215 8.692553 -0.000000 0.000000 -1.000000 0.375000 1.000000 32 | 51.493824 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.125000 0.500000 33 | 32.160374 -30.408215 26.038294 0.000000 -1.000000 0.000000 0.375000 0.500000 34 | 32.160374 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.375000 0.750000 35 | 51.493824 -30.408215 8.692553 0.000000 -1.000000 0.000000 0.125000 0.750000 36 | 32.160374 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.625000 0.500000 37 | 51.493824 -2.110556 26.038294 0.000000 1.000000 -0.000000 0.875000 0.500000 38 | 51.493824 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.875000 0.750000 39 | 32.160374 -2.110556 8.692553 0.000000 1.000000 -0.000000 0.625000 0.750000 40 | 4 0 1 2 3 41 | 4 4 5 6 7 42 | 4 8 9 10 11 43 | 4 12 13 14 15 44 | 4 16 17 18 19 45 | 4 20 21 22 23 46 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/tree.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 18 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | property uchar red 14 | property uchar green 15 | property uchar blue 16 | property uchar alpha 17 | element face 6 18 | property list uchar uint vertex_indices 19 | end_header 20 | 24.986067 -5.413276 -20.593513 0.017450 0.071256 -0.997305 0.250000 0.490000 107 97 74 255 21 | 25.152946 -4.050638 -20.493235 0.017450 0.071256 -0.997305 0.250000 0.250000 107 97 74 255 22 | 25.323231 -5.413276 -20.587614 0.017450 0.071256 -0.997305 0.457846 0.130000 107 97 74 255 23 | 24.721048 -4.619893 -20.752769 0.017426 0.089692 -0.995817 0.250000 0.490000 83 141 84 255 24 | 25.152946 -1.822299 -20.493235 0.017426 0.089692 -0.995817 0.250000 0.250000 83 141 84 255 25 | 25.593660 -4.619893 -20.737499 0.017426 0.089692 -0.995817 0.457846 0.130000 83 141 84 255 26 | 25.323231 -5.413276 -20.587614 0.854966 0.071258 0.513766 0.457846 0.130000 107 97 74 255 27 | 25.152946 -4.050638 -20.493235 0.854966 0.071258 0.513766 0.250000 0.250000 107 97 74 255 28 | 25.149540 -5.413276 -20.298573 0.854966 0.071258 0.513766 0.042154 0.130000 107 97 74 255 29 | 25.149540 -5.413276 -20.298573 -0.872416 0.071258 0.483543 0.042154 0.130000 107 97 74 255 30 | 25.152946 -4.050638 -20.493235 -0.872416 0.071258 0.483543 0.250000 0.250000 107 97 74 255 31 | 24.986067 -5.413276 -20.593513 -0.872416 0.071258 0.483543 0.250000 0.490000 107 97 74 255 32 | 25.593660 -4.619893 -20.737499 0.853691 0.089694 0.512998 0.457846 0.130000 83 141 84 255 33 | 25.152946 -1.822299 -20.493235 0.853691 0.089694 0.512998 0.250000 0.250000 83 141 84 255 34 | 25.144133 -4.619893 -19.989429 0.853691 0.089694 0.512998 0.042154 0.130000 83 141 84 255 35 | 25.144133 -4.619893 -19.989429 -0.871115 0.089693 0.482819 0.042154 0.130000 83 141 84 255 36 | 25.152946 -1.822299 -20.493235 -0.871115 0.089693 0.482819 0.250000 0.250000 83 141 84 255 37 | 24.721048 -4.619893 -20.752769 -0.871115 0.089693 0.482819 0.250000 0.490000 83 141 84 255 38 | 3 0 1 2 39 | 3 3 4 5 40 | 3 6 7 8 41 | 3 9 10 11 42 | 3 12 13 14 43 | 3 15 16 17 44 | -------------------------------------------------------------------------------- /test/desmos-racer/assets/triangle.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment Created by Blender 2.93.1 - www.blender.org 4 | element vertex 4 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | property float s 12 | property float t 13 | property uchar red 14 | property uchar green 15 | property uchar blue 16 | property uchar alpha 17 | element face 1 18 | property list uchar uint vertex_indices 19 | end_header 20 | 3.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 0.000000 0.000000 109 255 143 255 21 | 1.347760 -3.219050 -3.375905 0.000000 1.000000 0.000000 1.000000 0.000000 111 255 144 255 22 | 1.347760 -3.219050 -3.357359 0.000000 1.000000 0.000000 1.000000 0.009273 111 255 143 255 23 | 3.347760 -3.219050 -1.375905 0.000000 1.000000 0.000000 0.000000 1.000000 115 255 146 255 24 | 4 0 1 2 3 25 | -------------------------------------------------------------------------------- /test/desmos-racer/fast-exporter/ply-export-utility.py: -------------------------------------------------------------------------------- 1 | bl_info = { 2 | "name": "PLY Exporter Utility for Desmos Plane", 3 | "blender": (2, 92, 0), 4 | "category": "Object", 5 | } 6 | 7 | import bpy 8 | 9 | # class ExportVisibleMenu(bpy.types.Menu): 10 | # bl_idname = "view3D.export_visible" 11 | # bl_label = "Export Visible as PLY" 12 | 13 | # def draw(self, context): 14 | # layout = self.layout 15 | 16 | # layout.operator("mesh.primitive_cube_add") 17 | # layout.operator("object.duplicate_move") 18 | # # layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE' 19 | 20 | class VIEW3D_OT_export_visible(bpy.types.Operator): 21 | bl_idname = "mesh.export_visible" 22 | bl_label = "Export Visible Objects as PLY" 23 | 24 | def execute(self, context): 25 | print("PLY EXPORT: ") 26 | for obj in context.scene.objects: 27 | obj.select_set(False) 28 | if obj.visible_get(): 29 | print("Exporting " + obj.name +" ...") 30 | obj.select_set(True) 31 | bpy.ops.export_mesh.ply( 32 | filepath=bpy.path.abspath("//" + obj.name + ".ply"), 33 | use_selection=True, 34 | check_existing=False, 35 | use_ascii=True, 36 | axis_forward="Z", 37 | axis_up="Y" 38 | ) 39 | obj.select_set(False) 40 | 41 | 42 | return {'FINISHED'} 43 | 44 | 45 | def draw_export_visible(self, context): 46 | self.layout.operator(VIEW3D_OT_export_visible.bl_idname, text=VIEW3D_OT_export_visible.bl_label) 47 | 48 | def register(): 49 | bpy.utils.register_class(VIEW3D_OT_export_visible) 50 | bpy.types.VIEW3D_MT_object.append(draw_export_visible) 51 | print("GOT HERE") 52 | #bpy.ops.wm.call_menu(name=ExportVisibleMenu.bl_idname) 53 | 54 | def unregister(): 55 | bpy.types.VIEW3D_MT_object.remove(draw_export_visible) 56 | bpy.utils.unregister_class(VIEW3D_OT_export_visible) 57 | 58 | if __name__ == "__main__": register() -------------------------------------------------------------------------------- /test/desmos-racer/import-helpers.lisp: -------------------------------------------------------------------------------- 1 | 2 | (inlineJS " 3 | compiler.macroState.desmosPlane.rootPath = 'http://localhost:8080/desmos-plane-2/'; 4 | compiler.macroState.desmosPlane.assetPath = 'http://localhost:8080/desmos-plane-2/assets/'; 5 | return []; 6 | " 7 | ) 8 | (evalMacro withAssetPath 9 | " 10 | let url = '\u0022' + compiler.macroState.desmosPlane.assetPath + args[2].slice(1, args[2].length-1) + '\u0022'; 11 | console.log(url); 12 | return [[args[1], url, ...(args.slice(3))]]; 13 | " 14 | ) 15 | (evalMacro withRootPath 16 | " 17 | let url = '\u0022' + compiler.macroState.desmosPlane.assetPath + args[2].slice(1, args[2].length-1) + '\u0022'; 18 | console.log(url); 19 | return [[args[1], url, ...(args.slice(3))]]; 20 | " 21 | ) 22 | (defineFindAndReplace PLYGet fileVar elementType propertyType 23 | ((concatTokens fileVar ELEM elementType PROP propertyType)) 24 | ) 25 | (fn indexedMean property indices 26 | (comprehension ( 27 | (mean 28 | ([] property ([] indices (+ n -2))) 29 | ([] property ([] indices (+ n -1))) 30 | ([] property ([] indices (+ n 0))) 31 | ) 32 | ) 33 | (n (* 3 (list 1 ... (/ (floor (length indices)) 3))))) 34 | ) 35 | (defineFindAndReplace getFaceColors plyName ( 36 | (= (PLYGet plyName face red) (indexedMean (PLYGet plyName vertex red) (PLYGet plyName face vertexunderscoreindices))) 37 | (= (PLYGet plyName face green) (indexedMean (PLYGet plyName vertex green) (PLYGet plyName face vertexunderscoreindices))) 38 | (= (PLYGet plyName face blue) (indexedMean (PLYGet plyName vertex blue) (PLYGet plyName face vertexunderscoreindices))) 39 | )) 40 | (inlineJS 41 | "return [['triggerFlag', 'IMPORT_HELPERS_LOADED']]" 42 | ) 43 | (triggerFlag IMPORT_HELPERS_LOADED) -------------------------------------------------------------------------------- /test/desmos-racer/linalg.lisp: -------------------------------------------------------------------------------- 1 | (folder ((title "Linear Algebra")) 2 | 3 | 4 | 5 | (multilayerFn dotNormalized x1 y1 z1 x2 y2 z2 6 | ( 7 | (mag1 (sqrt (+ (* x1 x1) (* y1 y1) (* z1 z1)))) 8 | (mag2 (sqrt (+ (* x2 x2) (* y2 y2) (* z2 z2)))) 9 | (result (+ (* (/ x1 mag1) (/ x2 mag2)) (* (/ y1 mag1) (/ y2 mag2)) (* (/ z1 mag1) (/ z2 mag2)))) 10 | ) 11 | ) 12 | (fn normalizeList L 13 | (/ L (sqrt (+ (* ([] L 1) ([] L 1)) (* ([] L 2) ([] L 2)) (* ([] L 3) ([] L 3))))) 14 | ) 15 | 16 | (= a 1) 17 | (dotNormalized 2 2 2 -3 -3 -3) 18 | 19 | (defineFindAndReplace xStaticCross ax ay az bx by bz 20 | ((- (* ay bz) (* az by))) 21 | ) 22 | (defineFindAndReplace yStaticCross ax ay az bx by bz 23 | ((- (* az bx) (* ax bz))) 24 | ) 25 | (defineFindAndReplace zStaticCross ax ay az bx by bz 26 | ((- (* ax by) (* ay bx))) 27 | ) 28 | (defineFindAndReplace staticDot x1 y1 z1 x2 y2 z2 29 | ((+ (* x1 x2) (* y1 y2) (* z1 z2))) 30 | ) 31 | (multilayerFn mullerTrumbore 32 | xRay yRay zRay 33 | xDir yDir zDir 34 | xTri1 yTri1 zTri1 35 | xTri2 yTri2 zTri2 36 | xTri3 yTri3 zTri3 37 | ( 38 | (xE1 (- xTri2 xTri1)) 39 | (yE1 (- yTri2 yTri1)) 40 | (zE1 (- zTri2 zTri1)) 41 | (xE2 (- xTri3 xTri1)) 42 | (yE2 (- yTri3 yTri1)) 43 | (zE2 (- zTri3 zTri1)) 44 | (xN (xStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 45 | (yN (yStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 46 | (zN (zStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 47 | (det (* -1 (staticDot xDir yDir zDir xN yN zN))) 48 | (invdet (/ 1 det)) 49 | (xAO (- xRay xTri1)) 50 | (yAO (- yRay yTri1)) 51 | (zAO (- zRay zTri1)) 52 | (xDAO (xStaticCross xAO yAO zAO xDir yDir zDir)) 53 | (yDAO (yStaticCross xAO yAO zAO xDir yDir zDir)) 54 | (zDAO (zStaticCross xAO yAO zAO xDir yDir zDir)) 55 | (u (* (staticDot xE2 yE2 zE2 xDAO yDAO zDAO) invdet)) 56 | (v (* -1 (staticDot xE1 yE1 zE1 xDAO yDAO zDAO) invdet)) 57 | (t (* (staticDot xAO yAO zAO xN yN zN) invdet)) 58 | (return (piecewise 59 | ((< det 0.00001) -1) 60 | ((< t 0) -1) 61 | ((< u 0) -1) 62 | ((< v 0) -1) 63 | ((> (+ u v) 1) -1) 64 | (t) 65 | )) 66 | ;(return det) 67 | ) 68 | ) 69 | ) -------------------------------------------------------------------------------- /test/file-server.mjs: -------------------------------------------------------------------------------- 1 | import * as fs from "fs/promises"; 2 | import * as http from "http"; 3 | import * as path from "path"; 4 | 5 | let server = http.createServer(async (req, res) => { 6 | res.setHeader("Access-Control-Allow-Origin", "*"); 7 | res.setHeader("Cross-Origin-Resource-Policy", "cross-origin"); 8 | let url = req.url; 9 | let fileLocation = path.join(process.cwd(), url); 10 | fs.readFile(fileLocation) 11 | .then(file => { 12 | res.end(file); 13 | }) 14 | .catch(err => { 15 | res.statusCode = 404; 16 | res.end("Not found."); 17 | }); 18 | 19 | }); 20 | 21 | server.listen("8080", "localhost") -------------------------------------------------------------------------------- /test/index.mjs: -------------------------------------------------------------------------------- 1 | import * as fs from "fs/promises"; 2 | import * as lispsmos from "lispsmos"; 3 | 4 | let compiler = new lispsmos.compiler.LispsmosCompiler(); 5 | lispsmos.utilityMacros.register(compiler); 6 | lispsmos.proceduralMacros.register(compiler); 7 | let whileLoopTest = await compiler.compile(await fs.readFile(process.argv[2])); 8 | fs.writeFile(process.argv[3], JSON.stringify(whileLoopTest)); -------------------------------------------------------------------------------- /test/internal/3dproj.lisp: -------------------------------------------------------------------------------- 1 | ; Configure procedural/action code 2 | (procedureConfig 3 | (desmosEntryPoint main) 4 | (pointerStack ps) 5 | (programCounter pc) 6 | ) 7 | 8 | ;; (ticker (main)) 9 | (defineFindAndReplace inc v (-> v (+ v 1))) 10 | 11 | (defineFindAndReplace triplicate v expr 12 | ( 13 | (= (concatTokens v 1) expr) 14 | (= (concatTokens v 2) expr) 15 | (= (concatTokens v 3) expr) 16 | ) 17 | ) 18 | 19 | ;; (= xPosRotated1 ( - (* xPos (cos (.x rotation))) (* zPos (sin (.x rotation))))) 20 | ;; (= yPosRotated1 yPos) 21 | ;; (= zPosRotated1 ( + (* xPos (sin (.x rotation))) (* zPos (cos (.x rotation))))) 22 | (folder ((title "3D Projection")) 23 | (displayMe 24 | (= rotationView (point 0 0)) 25 | ) 26 | (= rotation rotationView) 27 | (fn project3D x y z (piecewise ((> z 0) (point (/ x z) (/ y z))) ((point (/ 0 0) (/ 0 0))))) 28 | (fn project3DTranslated x y z (project3D (+ x 0) (+ y 0) (+ z 6))) 29 | (fn xRotateAboutYAxis x y z (- (* x (cos (.x rotation))) (* z (sin (.x rotation))))) 30 | (fn zRotateAboutYAxis x y z (+ (* x (sin (.x rotation))) (* z (cos (.x rotation))))) 31 | (fn yRotateAboutXAxis x y z (- (* y (cos (.y rotation))) (* z (sin (.y rotation))))) 32 | (fn zRotateAboutXAxis x y z (+ (* y (sin (.y rotation))) (* z (cos (.y rotation))))) 33 | ) 34 | 35 | (folder ((title "Path")) 36 | (= xPath (list -2 2 2 2)) 37 | (= yPath (list -2 -2 2 2)) 38 | (= zPath (list -2 -2 -2 2)) 39 | 40 | (= xPathRotated (xRotateAboutYAxis xPath yPath zPath)) 41 | (= zPathRotatedIntermediate (zRotateAboutYAxis xPath yPath zPath)) 42 | (= yPathRotated (yRotateAboutXAxis xPathRotated yPath zPathRotatedIntermediate)) 43 | (= zPathRotated (zRotateAboutXAxis xPathRotated yPath zPathRotatedIntermediate)) 44 | (= pathProjected (join (project3DTranslated xPathRotated yPathRotated zPathRotated) (point (/ 0 0) (/ 0 0)))) 45 | (displayMe 46 | (polygon pathProjected) 47 | (fill false) 48 | ) 49 | ) 50 | 51 | (= a 0) 52 | (inc a) 53 | (triplicate b 5) 54 | 55 | (folder ((title "Towers")) 56 | 57 | ) -------------------------------------------------------------------------------- /test/internal/old/another-test.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (= a 0) 4 | (-> a (+ a 1)) -------------------------------------------------------------------------------- /test/internal/old/cg3d-2.lisp: -------------------------------------------------------------------------------- 1 | (procedureConfig 2 | (desmosEntryPoint main) 3 | (pointerStack ps) 4 | (programCounter pc) 5 | ) 6 | 7 | (ticker (main)) 8 | 9 | (fn chaosGameIter x choices rands 10 | (/ (+ 11 | ([] choices (+ 1 rands)) 12 | x 13 | ) 2) 14 | ) 15 | 16 | (= i 0) 17 | (= xPos (+ 0 (* 0 (list 1 ... 9000)))) 18 | (= yPos (+ 0 (* 0 (list 1 ... 9000)))) 19 | (= zPos (+ 5.5 (* 0 (list 1 ... 9000)))) 20 | (= xPosRotated1 ( - (* xPos (cos (.x rotation))) (* zPos (sin (.x rotation))))) 21 | (= yPosRotated1 yPos) 22 | (= zPosRotated1 ( + (* xPos (sin (.x rotation))) (* zPos (cos (.x rotation))))) 23 | (= xPosRotated xPosRotated1) 24 | (= yPosRotated ( - (* yPosRotated1 (cos (.y rotation))) (* zPosRotated1 (sin (.y rotation))))) 25 | (= zPosRotated ( + (* yPosRotated1 (sin (.y rotation))) (* zPosRotated1 (cos (.y rotation))))) 26 | (= randoms (floor (* 4 (random 9000)))) 27 | (= xPoints (list -1 1 -1 -1)) 28 | (= yPoints (list -1 -1 1 -1)) 29 | (= zPoints (list -1 -1 -1 1)) 30 | (displayMe 31 | (= display (point (/ xPosRotated (+ zPosRotated 5)) (/ yPosRotated (+ zPosRotated 5)))) 32 | (pointOpacity 0.3) 33 | ) 34 | (= rotation (* rotationController 30)) 35 | (displayMe 36 | (= rotationController (point 0 0)) 37 | (color (rgb 255 0 0)) 38 | ) 39 | (procedure main 40 | (while (< i 10) 41 | (-> randoms (floor (* 4 (random 9000)))) 42 | (-> xPos (chaosGameIter xPos xPoints randoms)) 43 | (-> yPos (chaosGameIter yPos yPoints randoms)) 44 | (-> zPos (chaosGameIter zPos zPoints randoms)) 45 | (-> i (+ i 1)) 46 | ) 47 | ) -------------------------------------------------------------------------------- /test/internal/old/chaos-game-3d.lisp: -------------------------------------------------------------------------------- 1 | (procedureConfig 2 | (desmosEntryPoint main) 3 | (pointerStack ps) 4 | (programCounter pc) 5 | ) 6 | 7 | (fn chaosGameIter data 8 | (join 9 | (/ (+ (list 10 | ([] points (+ 1 (* 3 ([] randoms ([] data 4))))) 11 | ([] points (+ 2 (* 3 ([] randoms ([] data 4))))) 12 | ([] points (+ 3 (* 3 ([] randoms ([] data 4))))) 13 | ) ([] data 1 ... 3)) 2) 14 | (+ ([] data 4) 1) 15 | ) 16 | ) 17 | 18 | (fn chaosGameIter10 data ( 19 | compose 10 chaosGameIter data 20 | )) 21 | 22 | (= i 0) 23 | (= randoms (floor (* 4 (random 10)))) 24 | (= points (list -1 -1 5 1 -1 5 -1 1 5 -1 -1 6)) 25 | (= currentPoint (list 0.5 0.5 5.5)) 26 | (= display (list)) 27 | (= displayCache (list)) 28 | (procedure main 29 | (while (> 2 1) 30 | (, 31 | (-> randoms (floor (* 4 (random 10)))) 32 | (-> currentPoint (chaosGameIter10 (list 0.5 0.5 5.5 1))) 33 | (-> displayCache (join displayCache (list (point 34 | (/ ([] currentPoint 1) ([] currentPoint 3)) 35 | (/ ([] currentPoint 2) ([] currentPoint 3)) 36 | )))) 37 | (-> i (+ i 1)) 38 | ) 39 | (if (> i 50) 40 | (, 41 | (-> i 0) 42 | (-> display (join display displayCache)) 43 | (-> displayCache (list)) 44 | ) 45 | ) 46 | (-> i i) 47 | ) 48 | ) -------------------------------------------------------------------------------- /test/internal/old/chaos-game-3d.tex: -------------------------------------------------------------------------------- 1 | 2 | c_{haosGameIter}\left(d_{ata}\right)=\operatorname{join}\left(\frac{\left(\left[p_{oints}\left[\left(1+\left(3*r_{andoms}\left[d_{ata}\left[4\right]\right]\right)\right)\right],p_{oints}\left[\left(2+\left(3*r_{andoms}\left[d_{ata}\left[4\right]\right]\right)\right)\right],p_{oints}\left[\left(3+\left(3*r_{andoms}\left[d_{ata}\left[4\right]\right]\right)\right)\right]\right]+d_{ata}\left[1...3\right]\right)}{2},\left(d_{ata}\left[4\right]+1\right)\right) 3 | c_{haosGameIter10}\left(d_{ata}\right)=c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(c_{haosGameIter}\left(d_{ata}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) 4 | 5 | i=0 6 | r_{andoms}=\operatorname{floor}\left(\left(4*\operatorname{random}\left(10\right)\right)\right) 7 | p_{oints}=\left[-1,-1,5,1,-1,5,-1,1,5,-1,-1,6\right] 8 | c_{urrentPoint}=\left[0.5,0.5,5.5\right] 9 | d_{isplay}=\left[\right] 10 | d_{isplayCache}=\left[\right] 11 | 12 | m_{ain}\left(\right)=\left\{p_{c}=0:\left(\left\{2>1:p_{c}\to \left(p_{c}+1\right),p_{c}\to 4\right\}\right),p_{c}=1:\left(\left(r_{andoms}\to \operatorname{floor}\left(\left(4*\operatorname{random}\left(10\right)\right)\right),c_{urrentPoint}\to c_{haosGameIter10}\left(\left[0.5,0.5,5.5,1\right]\right),d_{isplayCache}\to \operatorname{join}\left(d_{isplayCache},\left[\left(\frac{c_{urrentPoint}\left[1\right]}{c_{urrentPoint}\left[3\right]},\frac{c_{urrentPoint}\left[2\right]}{c_{urrentPoint}\left[3\right]}\right)\right]\right),i\to \left(i+1\right)\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=2:\left(\left\{i>50:\left(\left(i\to 0,d_{isplay}\to \operatorname{join}\left(d_{isplay},d_{isplayCache}\right),d_{isplayCache}\to \left[\right]\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 3\right\}\right),p_{c}=3:\left(i\to i,p_{c}\to 0\right),p_{c}=4:\left(\left(p_{c}\to p_{s}\left[\operatorname{length}\left(p_{s}\right)\right],p_{s}\to p_{s}\left[1...\left(\operatorname{length}\left(p_{s}\right)-1\right)\right]\right)\right)\right\} 13 | p_{s}=\left[-1\right] 14 | 15 | p_{c}=0 16 | -------------------------------------------------------------------------------- /test/internal/old/comprehension.json: -------------------------------------------------------------------------------- 1 | {"version":9,"randomSeed":"f8731634d5d57a05dabd714121ac9b91","graph":{"viewport":{"xmin":-10,"ymin":-10,"xmax":10,"ymax":10}},"expressions":{"list":[{"hidden":true,"type":"expression","id":"0","color":"#000000","latex":"\\left[\\left(a+b\\right)\\operatorname{for}a=\\left[1,2,3\\right],b=\\left[4,5,6\\right]\\right]"},{"type":"expression","id":"1","color":"#000000","latex":"\\left(t,t\\right)","parametricDomain":{"min":"2","max":"8"}}]}} -------------------------------------------------------------------------------- /test/internal/old/comprehension.lisp: -------------------------------------------------------------------------------- 1 | (comprehension (+ a b) (a (list 1 2 3)) (b (list 4 5 6))) 2 | (displayMe 3 | (point t t) 4 | (parametricDomain 5 | (min 2) 6 | (max 8) 7 | ) 8 | ) -------------------------------------------------------------------------------- /test/internal/old/desmos.tex: -------------------------------------------------------------------------------- 1 | 1+1+\frac{\left(2\cdot3\right)}{4-5} 2 | 3 | \left\{x<1:5,x>1:7,4\right\} 4 | 5 | 6 | \sum_{n=5}^{10}n 7 | 8 | \sqrt{ } 9 | 10 | \left[a+b\operatorname{for}a=\left[1...5\right],b=\left[2...6\right]\right] -------------------------------------------------------------------------------- /test/internal/old/getstate-reverse-engineering.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 9, 3 | "randomSeed": "f8731634d5d57a05dabd714121ac9b91", 4 | "graph": { 5 | "viewport": { 6 | "xmin": -9.296026727120868, 7 | "ymin": -23.510999299748875, 8 | "xmax": 8.420236248657677, 9 | "ymax": 24.472698381004093 10 | } 11 | }, 12 | "expressions": { 13 | "list": [ 14 | { 15 | "type": "expression", 16 | "id": "1", 17 | "color": "#c74440", 18 | "latex": "f_{irstIndexOf}\\\\left(L,n\\\\right)=i_{nc}\\\\left[L=n\\\\right]\\\\left[1\\\\right]" 19 | }, 20 | { 21 | "type": "expression", 22 | "id": "2", 23 | "color": "#2d70b3", 24 | "latex": "L_{2}=\\\\left[1,6,423,7,2,35,8\\\\right]" 25 | }, 26 | { 27 | "type": "expression", 28 | "id": "3", 29 | "color": "#388c46", 30 | "latex": "i_{nc}=\\\\left[1...10000\\\\right]" 31 | }, 32 | { 33 | "type": "expression", 34 | "id": "5", 35 | "color": "#000000", 36 | "latex": "f_{irstIndexOf}\\\\left(L_{2},7\\\\right)" 37 | }, 38 | { 39 | "type": "expression", 40 | "id": "6", 41 | "color": "#c74440", 42 | "latex": "\\\\operatorname{random}\\\\left(100,4\\\\right)\\\\left[1\\\\right]" 43 | } 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/internal/old/iftest.lisp: -------------------------------------------------------------------------------- 1 | (procedureConfig 2 | (desmosEntryPoint main) 3 | (pointerStack ps) 4 | (programCounter pc) 5 | ) 6 | 7 | (= a 0) 8 | (= b 0) 9 | (= c 0) 10 | (= i 0) 11 | (procedure main 12 | (if (> a 7) 13 | (-> b (+ b 1)) 14 | (if (> a 12) 15 | (-> b (+ b 2)) 16 | (-> a (+ a 1)) 17 | (-> a (+ a 2)) 18 | (-> a (+ a 3)) 19 | (-> b (+ b 3)) 20 | ) 21 | (-> b (+ b 4)) 22 | ) 23 | (while (> 2 1) 24 | (if (> 3 1) 25 | (-> c (+ c 1)) 26 | ) 27 | (-> c (+ c 1)) 28 | (if (> 3 1) 29 | (-> c (+ c 1)) 30 | ) 31 | ) 32 | ) -------------------------------------------------------------------------------- /test/internal/old/iftest.tex: -------------------------------------------------------------------------------- 1 | 2 | a=0 3 | b=0 4 | c=0 5 | i=0 6 | 7 | m_{ain}\left(\right)=\left\{p_{c}=0:\left\{a>7:\left(b\to \left(b+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 7\right\},p_{c}=1:\left\{a>12:\left(b\to \left(b+2\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 6\right\},p_{c}=2:\left(a\to \left(a+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=3:\left(a\to \left(a+2\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=4:\left(a\to \left(a+3\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=5:\left(b\to \left(b+3\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=6:\left(b\to \left(b+4\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=7:\left\{2>1:p_{c}\to \left(p_{c}+1\right),p_{c}\to 10\right\},p_{c}=8:\left\{3>1:\left(c\to \left(c+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 9\right\},p_{c}=9:\left(c\to \left(c+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=10:\left\{3>1:\left(c\to \left(c+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 11\right\},p_{c}=11:\left\{2>1:p_{c}\to 7,p_{c}\to \left(p_{c}+1\right)\right\},p_{c}=12:\left(p_{c}\to p_{s}\left[\operatorname{length}\left(p_{s}\right)\right],p_{s}\to p_{s}\left[1...\left(\operatorname{length}\left(p_{s}\right)-1\right)\right]\right)\right\} 8 | p_{s}=\left[-1\right] 9 | 10 | p_{c}=0 11 | -------------------------------------------------------------------------------- /test/internal/old/pool.tex: -------------------------------------------------------------------------------- 1 | 2 | t_{runc1000}\left(n\right)=\frac{\operatorname{floor}\left(\left(n*1000\right)\right)}{1000} 3 | t_{runc1000p}\left(p\right)=\left(t_{runc1000}\left(p.x\right),t_{runc1000}\left(p.y\right)\right) 4 | p_{ointPos}=\left(\left[1,...,1000\right],\left[1,...,1000\right]\right) 5 | p_{ointVel}=\left(\operatorname{random}\left(1000,1\right),\operatorname{random}\left(1000,2\right)\right) 6 | p_{ointMask}=\operatorname{join}\left(1,\left(0*\left[1,...,99\right]\right)\right) 7 | p_{ointDisp}=\left(p_{ointPos}+\left(p_{ointVel}*t_{ime}\right)\right) 8 | t_{ime}=0 9 | u_{pdate}=p_{ointPos} 10 | s_{tepCount}=0 11 | 12 | m_{ain}\left(\right)=\left\{p_{c}=0:\left\{2>1:\left(\left(s_{tepCount}\to \left(s_{tepCount}+1\right),t_{ime}\to \left(t_{ime}+0.1\right)\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 1\right\},p_{c}=1:\left\{\operatorname{mod}\left(s_{tepCount},10\right)=0:\left(\left(t_{ime}\to 0,p_{ointPos}\to \left(p_{ointPos}+p_{ointVel}\right)\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}\to 2\right\},p_{c}=2:\left\{2>1:p_{c}\to 0,p_{c}\to \left(p_{c}+1\right)\right\},p_{c}=3:\left(p_{c}\to p_{s}\left[\operatorname{length}\left(p_{s}\right)\right],p_{s}\to p_{s}\left[1...\left(\operatorname{length}\left(p_{s}\right)-1\right)\right]\right)\right\} 13 | p_{s}=\left[-1\right] 14 | 15 | p_{c}=0 16 | -------------------------------------------------------------------------------- /test/internal/old/test-include.lisp: -------------------------------------------------------------------------------- 1 | (= testIncludeWorked 0) -------------------------------------------------------------------------------- /test/internal/old/while.lisp: -------------------------------------------------------------------------------- 1 | (procedureConfig 2 | (desmosEntryPoint main) 3 | (pointerStack ps) 4 | (programCounter pc) 5 | ) 6 | 7 | (= i 0) 8 | (= j 0) 9 | (= z 0) 10 | (= a 1) 11 | (procedure test 12 | (-> a (+ a 1)) 13 | (-> z (+ z 1)) 14 | (if (> 3 z) 15 | (callprocedure test) 16 | ) 17 | ) 18 | (procedure main 19 | (while (> 5 i) 20 | (if (> i 1) 21 | (-> a (+ a 1000)) 22 | ) 23 | (-> a (+ a 1)) 24 | (-> a (+ a 4)) 25 | (-> j 0) 26 | (while (> 3 j) 27 | (-> a (- a 10)) 28 | (-> j (+ j 1)) 29 | ) 30 | (-> a (- a 6)) 31 | (-> j 0) 32 | (while (> 3 j) 33 | (-> a (+ a 10)) 34 | (-> j (+ j 1)) 35 | ) 36 | (-> z 0) 37 | (callprocedure test) 38 | (-> i (+ i 1)) 39 | ) 40 | ) -------------------------------------------------------------------------------- /test/internal/old/while.tex: -------------------------------------------------------------------------------- 1 | 2 | i=0 3 | j=0 4 | z=0 5 | a=1 6 | 7 | 8 | m_{ain}\left(\right)=\left\{p_{c}=0:\left(a\to \left(a+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=1:\left(z\to \left(z+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=2:\left(\left\{3>z:p_{c}\to \left(p_{c}+1\right),p_{c}\to 4\right\}\right),p_{c}=3:\left(\left(p_{c}\to 0,p_{s}\to \operatorname{join}\left(p_{s},\left[\left(p_{c}+1\right)\right]\right)\right)\right),p_{c}=4:\left(\left(p_{c}\to p_{s}\left[\operatorname{length}\left(p_{s}\right)\right],p_{s}\to p_{s}\left[1...\left(\operatorname{length}\left(p_{s}\right)-1\right)\right]\right)\right),p_{c}=5:\left(\left\{5>i:p_{c}\to \left(p_{c}+1\right),p_{c}\to 22\right\}\right),p_{c}=6:\left(\left\{i>1:p_{c}\to \left(p_{c}+1\right),p_{c}\to 8\right\}\right),p_{c}=7:\left(a\to \left(a+1000\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=8:\left(a\to \left(a+1\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=9:\left(a\to \left(a+4\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=10:\left(j\to 0,p_{c}\to \left(p_{c}+1\right)\right),p_{c}=11:\left(\left\{3>j:p_{c}\to \left(p_{c}+1\right),p_{c}\to 14\right\}\right),p_{c}=12:\left(a\to \left(a-10\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=13:\left(j\to \left(j+1\right),p_{c}\to 11\right),p_{c}=14:\left(a\to \left(a-6\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=15:\left(j\to 0,p_{c}\to \left(p_{c}+1\right)\right),p_{c}=16:\left(\left\{3>j:p_{c}\to \left(p_{c}+1\right),p_{c}\to 19\right\}\right),p_{c}=17:\left(a\to \left(a+10\right),p_{c}\to \left(p_{c}+1\right)\right),p_{c}=18:\left(j\to \left(j+1\right),p_{c}\to 16\right),p_{c}=19:\left(z\to 0,p_{c}\to \left(p_{c}+1\right)\right),p_{c}=20:\left(\left(p_{c}\to 0,p_{s}\to \operatorname{join}\left(p_{s},\left[\left(p_{c}+1\right)\right]\right)\right)\right),p_{c}=21:\left(i\to \left(i+1\right),p_{c}\to 5\right),p_{c}=22:\left(\left(p_{c}\to p_{s}\left[\operatorname{length}\left(p_{s}\right)\right],p_{s}\to p_{s}\left[1...\left(\operatorname{length}\left(p_{s}\right)-1\right)\right]\right)\right)\right\} 9 | p_{s}=\left[-1\right] 10 | 11 | p_{c}=5 12 | -------------------------------------------------------------------------------- /test/internal/procedure2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 9, 3 | "randomSeed": "f8731634d5d57a05dabd714121ac9b91", 4 | "graph": { "viewport": { "xmin": -10, "ymin": -10, "xmax": 10, "ymax": 10 } }, 5 | "expressions": { 6 | "list": [ 7 | { 8 | "hidden": true, 9 | "type": "expression", 10 | "id": "0", 11 | "color": "#000000", 12 | "latex": "a=0" 13 | }, 14 | { 15 | "hidden": true, 16 | "type": "expression", 17 | "id": "1", 18 | "color": "#000000", 19 | "latex": "m_{ain}\\left(\\right)=\\left\\{p_{c}=0:\\left(a\\to \\left(a+1\\right),p_{c}\\to \\left(p_{c}+1\\right)\\right),p_{c}=1:\\left(p_{c}\\to p_{s}\\left[\\operatorname{length}\\left(p_{s}\\right)\\right],p_{s}\\to p_{s}\\left[1...\\left(\\operatorname{length}\\left(p_{s}\\right)-1\\right)\\right]\\right)\\right\\}" 20 | }, 21 | { 22 | "hidden": true, 23 | "type": "expression", 24 | "id": "2", 25 | "color": "#000000", 26 | "latex": "p_{s}=\\left[-1\\right]" 27 | }, 28 | { 29 | "hidden": true, 30 | "type": "expression", 31 | "id": "3", 32 | "color": "#000000", 33 | "latex": "p_{c}=0" 34 | } 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/internal/procedure2.lisp: -------------------------------------------------------------------------------- 1 | ; Configure procedural/action code 2 | (procedureConfig 3 | (desmosEntryPoint main) 4 | (pointerStack ps) 5 | (programCounter pc) 6 | ) 7 | 8 | (= a 0) 9 | 10 | (procedure main 11 | (while (< a 10) 12 | (if (> a 5) 13 | (-> a (+ a 1)) 14 | ) 15 | ) 16 | ) -------------------------------------------------------------------------------- /test/me-when-no-desmos-recursion.lisp: -------------------------------------------------------------------------------- 1 | (evalMacro meWhenNoDesmosRecursion " 2 | console.log(`EEEEEEEEEEEE`); 3 | let fnToRecurse = args[1]; 4 | let iterationCount = Number(args[2]); 5 | let exprList = []; 6 | for (let i = 0; i < iterationCount; i++) { 7 | let currentFnName = fnToRecurse + 'composed' + i; 8 | let lastFnName = fnToRecurse + ((i == 0) ? '' : ('composed' + (i - 1))); 9 | exprList.push([ 10 | 'fn', currentFnName, 'x', [lastFnName, [lastFnName, [lastFnName, 'x']]] 11 | ]); 12 | 13 | let currentRecursionFnName = fnToRecurse + 'recursed' + i; 14 | if (i == iterationCount - 1) { 15 | currentRecursionFnName = fnToRecurse + 'ComposedNTimes'; 16 | } 17 | let lastRecursionFnName = fnToRecurse + ('recursed' + (i - 1)); 18 | if (i == 0) { 19 | exprList.push([ 20 | 'fn', currentRecursionFnName, 'x', 'n', ['piecewise', 21 | [['>=', ['mod', 'n', Math.pow(2, i+1).toString()], Math.pow(2, i).toString()], [lastFnName, 'x']], ['x']] 22 | ]); 23 | } else { 24 | exprList.push([ 25 | 'fn', currentRecursionFnName, 'x', 'n', [lastRecursionFnName, ['piecewise', 26 | [['>=', ['mod', 'n', Math.pow(2, i+1).toString()], Math.pow(2, i).toString()], [lastFnName, 'x']], ['x'] 27 | ], 'n'] 28 | ]); 29 | } 30 | } 31 | console.log(exprList); 32 | return exprList; 33 | 34 | ") 35 | 36 | (fn f x (+ x 1)) 37 | (folder ((title "me when YES desmos recursion ;)")) 38 | (meWhenNoDesmosRecursion f 8) 39 | ) 40 | (displayMe 41 | (fComposedNTimes 1 (floor x)) 42 | ) -------------------------------------------------------------------------------- /test/multilayer-function.lisp: -------------------------------------------------------------------------------- 1 | (multilayerFn dotNormalized x1 y1 z1 x2 y2 z2 2 | ( 3 | (mag1 (sqrt (+ (* x1 x1) (* y1 y1) (* z1 z1)))) 4 | (mag2 (sqrt (+ (* x2 x2) (* y2 y2) (* z2 z2)))) 5 | (result (+ (* (/ x1 mag1) (/ x2 mag2)) (* (/ y1 mag1) (/ y2 mag2)) (* (/ z1 mag1) (/ z2 mag2)))) 6 | ) 7 | ) 8 | (= a 1) 9 | (dotNormalized 2 2 2 -3 -3 -3) 10 | 11 | (defineFindAndReplace xStaticCross ax ay az bx by bz 12 | ((- (* ay bz) (* az by))) 13 | ) 14 | (defineFindAndReplace yStaticCross ax ay az bx by bz 15 | ((- (* az bx) (* ax bz))) 16 | ) 17 | (defineFindAndReplace zStaticCross ax ay az bx by bz 18 | ((- (* ax by) (* ay bx))) 19 | ) 20 | (defineFindAndReplace staticDot x1 y1 z1 x2 y2 z2 21 | ((+ (* x1 x2) (* y1 y2) (* z1 z2))) 22 | ) 23 | (multilayerFn mullerTrumbore 24 | xRay yRay zRay 25 | xDir yDir zDir 26 | xTri1 yTri1 zTri1 27 | xTri2 yTri2 zTri2 28 | xTri3 yTri3 zTri3 29 | ( 30 | (xE1 (- xTri2 xTri1)) 31 | (yE1 (- yTri2 yTri1)) 32 | (zE1 (- zTri2 zTri1)) 33 | (xE2 (- xTri3 xTri1)) 34 | (yE2 (- yTri3 yTri1)) 35 | (zE2 (- zTri3 zTri1)) 36 | (xN (xStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 37 | (yN (yStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 38 | (zN (zStaticCross xE1 yE1 zE1 xE2 yE2 zE2)) 39 | (det (* -1 (staticDot xDir yDir zDir xN yN zN))) 40 | (invdet (/ 1 det)) 41 | (xAO (- xRay xTri1)) 42 | (yAO (- yRay yTri1)) 43 | (zAO (- zRay zTri1)) 44 | (xDAO (xStaticCross xAO yAO zAO xDir yDir zDir)) 45 | (yDAO (yStaticCross xAO yAO zAO xDir yDir zDir)) 46 | (zDAO (zStaticCross xAO yAO zAO xDir yDir zDir)) 47 | (u (* (staticDot xE2 yE2 zE2 xDAO yDAO zDAO) invdet)) 48 | (v (* -1 (staticDot xE1 yE1 zE1 xDAO yDAO zDAO) invdet)) 49 | (t (* (staticDot xAO yAO zAO xN yN zN) invdet)) 50 | (return (piecewise 51 | ((< det 0.00001) -1) 52 | ((< t 0) -1) 53 | ((< u 0) -1) 54 | ((< v 0) -1) 55 | ((> (+ u v) 1) -1) 56 | (t) 57 | )) 58 | ;(return det) 59 | ) 60 | ) 61 | 62 | 63 | (mullerTrumbore 64 | 0 0 0 65 | 0 0 1 66 | -1 -1 1 67 | 0 2 2 68 | 1 -1 3 69 | ) -------------------------------------------------------------------------------- /test/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "lispsmos": "file:../module" 9 | } 10 | }, 11 | "../module": { 12 | "name": "lispsmos", 13 | "version": "0.1.0", 14 | "license": "ISC", 15 | "devDependencies": { 16 | "@types/node": "^16.11.10", 17 | "typescript": "^4.5.2" 18 | } 19 | }, 20 | "node_modules/lispsmos": { 21 | "resolved": "../module", 22 | "link": true 23 | } 24 | }, 25 | "dependencies": { 26 | "lispsmos": { 27 | "version": "file:../module", 28 | "requires": { 29 | "@types/node": "^16.11.10", 30 | "typescript": "^4.5.2" 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "lispsmos": "file:../module" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/quadtree.lisp: -------------------------------------------------------------------------------- 1 | (displayMe 2 | (= points (point 3 | (random 100 1) 4 | (random 100 2) 5 | )) 6 | ) 7 | 8 | (defineFindAndReplace getQuadtreeIter current next name 9 | ( 10 | (multilayerFn name midX midY extentX extentY L 11 | ( 12 | (square1 ((concatTokens quadtreeIter next) 13 | (- midX (/ extentX 2)) 14 | (- midY (/ extentY 2)) 15 | (/ extentX 2) 16 | (/ extentY 2) 17 | ([] L (== (+ (sign (- midX (.x L))) (sign (- midY (.y L)))) -2)) 18 | )) 19 | (square2 ((concatTokens quadtreeIter next) 20 | (+ midX (/ extentX 2)) 21 | (- midY (/ extentY 2)) 22 | (/ extentX 2) 23 | (/ extentY 2) 24 | ([] L (== (- (sign (- midX (.x L))) (sign (- midY (.y L)))) 2)) 25 | )) 26 | (square3 ((concatTokens quadtreeIter next) 27 | (- midX (/ extentX 2)) 28 | (+ midY (/ extentY 2)) 29 | (/ extentX 2) 30 | (/ extentY 2) 31 | ([] L (== (- (sign (- midX (.x L))) (sign (- midY (.y L)))) -2)) 32 | )) 33 | (square4 ((concatTokens quadtreeIter next) 34 | (+ midX (/ extentX 2)) 35 | (+ midY (/ extentY 2)) 36 | (/ extentX 2) 37 | (/ extentY 2) 38 | ([] L (== (+ (sign (- midX (.x L))) (sign (- midY (.y L)))) 2)) 39 | )) 40 | (return (join 41 | (point (length square1) -999999999) 42 | (point (length square2) -999999999) 43 | (point (length square3) -999999999) 44 | (point (length square4) -999999999) 45 | square1 square2 square3 square4 46 | )) 47 | ) 48 | ) 49 | ) 50 | ) 51 | 52 | (getQuadtreeIter 0 1 quadtreeIter0) 53 | (getQuadtreeIter 1 2 quadtreeIter1) 54 | (getQuadtreeIter 2 3 quadtreeIter2) 55 | (getQuadtreeIter 3 4 quadtreeIter3) 56 | (getQuadtreeIter 4 5 quadtreeIter4) 57 | (fn quadtreeIter5 x1 y1 x2 y2 L L) 58 | (quadtreeIter0 0.5 0.5 0.5 0.5 points) --------------------------------------------------------------------------------