├── .eslintrc.json ├── .gitignore ├── app ├── app │ └── page.tsx ├── articles │ ├── layout.tsx │ ├── parabolas │ │ └── page.tsx │ └── riemann-sums │ │ └── page.tsx ├── layout.tsx ├── page.tsx ├── present │ ├── layout.tsx │ └── new │ │ └── page.tsx ├── providers.tsx └── tools │ ├── complex-domain-coloring-image-generator │ └── page.tsx │ ├── complex-sequence │ └── page.tsx │ ├── expression-image-generator │ └── page.tsx │ └── layout.tsx ├── components ├── Graph3D │ ├── Graph3D.tsx │ ├── GraphAxis3D.tsx │ ├── GraphBoundingBox3D.tsx │ ├── GraphComplexExpression3D.tsx │ ├── GraphContours3D.tsx │ ├── GraphCurve3D.tsx │ ├── GraphEquation3D.tsx │ ├── GraphEquation3DInternal.tsx │ ├── GraphEquation3DShader.tsx │ ├── GraphExpression3D.tsx │ ├── GraphGrid3D.tsx │ ├── GraphGridLine3D.tsx │ ├── GraphInfiniteGrid3D.tsx │ ├── GraphPoint3D.tsx │ ├── GraphSurfaceGridMaterial.tsx │ ├── GraphText3D.tsx │ ├── GraphVectorField3D.tsx │ ├── GraphVectorField3DInternal.tsx │ └── display │ │ ├── Area.tsx │ │ ├── Contour.tsx │ │ ├── Point.tsx │ │ └── Vector.tsx ├── Latex.tsx ├── MathLiveInput.tsx ├── MathObjects │ ├── Action │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── ComplexExpression │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── Equation │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── Expression │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── Table │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── VectorField │ │ ├── editor.tsx │ │ ├── icon.tsx │ │ ├── index.tsx │ │ ├── output.tsx │ │ └── spec.ts │ ├── index.tsx │ └── notes.md ├── MathQuillInput.tsx ├── Navigation.tsx ├── Slides │ ├── Box.tsx │ ├── Slide.tsx │ └── Slideshow.tsx ├── ThemeToggle.tsx └── UseGPU │ ├── component.tsx │ └── test.wgsl ├── hooks ├── useApplyUniforms.ts ├── useClippingPlanes.ts ├── useFlatContoursForEquation.ts ├── useResizeObserver.ts ├── useTrianglesForEquation3D.ts ├── useVectorField.tsx ├── useWorkQueue.ts └── useWorldCoordinateTransformation.ts ├── mathquill-0.10.1 ├── .exists--used_by_Makefile ├── fonts │ ├── Symbola-basic.eot │ ├── Symbola-basic.ttf │ ├── Symbola-basic.woff │ ├── Symbola-basic.woff2 │ ├── Symbola.eot │ ├── Symbola.otf │ ├── Symbola.svg │ ├── Symbola.ttf │ ├── Symbola.woff │ └── Symbola.woff2 ├── mathquill.css └── mathquill.js ├── next-env.d.ts ├── next.config.js ├── package-lock.json ├── package.json ├── postcss.config.js ├── public └── mathlive │ ├── fonts │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-BoldItalic.woff2 │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-BoldItalic.woff2 │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.woff2 │ └── KaTeX_Typewriter-Regular.woff2 │ └── sounds │ ├── keypress-delete.wav │ ├── keypress-return.wav │ ├── keypress-spacebar.wav │ ├── keypress-standard.wav │ └── plonk.wav ├── rust └── joshs_graphing_calculator_lib │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── benches │ └── my_benchmark.rs │ ├── notes.md │ ├── pkg │ ├── joshs_graphing_calculator_lib.d.ts │ ├── joshs_graphing_calculator_lib.js │ ├── joshs_graphing_calculator_lib_bg.js │ ├── joshs_graphing_calculator_lib_bg.wasm │ ├── joshs_graphing_calculator_lib_bg.wasm-opt.wasm │ ├── joshs_graphing_calculator_lib_bg.wasm.d.ts │ └── package.json │ └── src │ ├── ast.rs │ ├── equation.rs │ ├── expression.rs │ ├── graphing.rs │ ├── lib.rs │ ├── point.rs │ ├── segment.rs │ ├── triangle.rs │ └── vector.rs ├── styles └── globals.css ├── tailwind.config.js ├── tsconfig.json ├── types.ts ├── utils ├── lerp.ts └── tailwindColors.ts └── workers ├── graphEquation.worker.ts └── graphEquationAPI.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "rules": { 4 | "react/no-unescaped-entities": "off", 5 | 6 | // The following rule causes problems with react-three-fiber, so we disable it 7 | "react/no-unknown-property": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next -------------------------------------------------------------------------------- /app/articles/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Navigation } from "../../components/Navigation"; 2 | 3 | export const metadata = { 4 | title: "Mr. Pullen's Graphing Calculator", 5 | }; 6 | 7 | interface LayoutProps { 8 | children: React.ReactNode; 9 | } 10 | 11 | export default function Layout({ children }: LayoutProps) { 12 | return ( 13 |
140 | {label} 141 | | 142 | ))} 143 |
---|
150 | {value} 151 | | 152 | ))} 153 |
What is the area of the following shape?
31 |33 | Not so bad, right? Adding up rectangular areas is easy.{" "} 34 | But what if you have a curvey shape, like this? 35 |
36 |x | 51 |y | 52 |z | 53 |{/* Delete */} | 54 |
---|---|---|---|
61 | 66 | setValue(rowNumber, colNumber, event.target.valueAsNumber) 67 | } 68 | onKeyDown={(event) => { 69 | if (event.key === "Enter") { 70 | const nextInput = 71 | event.currentTarget.parentElement?.parentElement?.nextElementSibling?.querySelectorAll( 72 | "input" 73 | )[colNumber]; 74 | if (nextInput) { 75 | nextInput.focus(); 76 | } else { 77 | addRow(colNumber); 78 | } 79 | } 80 | if (event.key === "Backspace" && isNaN(value)) { 81 | const prevInput = 82 | event.currentTarget?.parentElement?.previousElementSibling?.querySelector( 83 | "input" 84 | ); 85 | if (prevInput) { 86 | prevInput.focus(); 87 | } 88 | } 89 | }} 90 | /> 91 | | 92 | ))} 93 | 94 |