@maniclang/workbench 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +40 -0
- package/README.md +155 -0
- package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/client/assets/abap-CRCWOmpq.js +1 -0
- package/dist/client/assets/apex-DnsZk_dE.js +1 -0
- package/dist/client/assets/azcli-1IWB1ccx.js +1 -0
- package/dist/client/assets/bat-DPkNLes8.js +1 -0
- package/dist/client/assets/bicep-Corcdgou.js +2 -0
- package/dist/client/assets/cameligo-CGrWLZr3.js +1 -0
- package/dist/client/assets/clojure-D9WOWImG.js +1 -0
- package/dist/client/assets/codicon-CgENjH2v.ttf +0 -0
- package/dist/client/assets/coffee-B7EJu28W.js +1 -0
- package/dist/client/assets/cpp-SEyurbux.js +1 -0
- package/dist/client/assets/csharp-BoL64M5l.js +1 -0
- package/dist/client/assets/csp-C46ZqvIl.js +1 -0
- package/dist/client/assets/css-DQU6DXDx.js +3 -0
- package/dist/client/assets/cssMode-CtRONlr8.js +4 -0
- package/dist/client/assets/cypher-D84EuPTj.js +1 -0
- package/dist/client/assets/dart-D8lhlL1r.js +1 -0
- package/dist/client/assets/dockerfile-DLk6rpji.js +1 -0
- package/dist/client/assets/ecl-BO6FnfXk.js +1 -0
- package/dist/client/assets/editor.worker-CZyr7Ur9.js +26 -0
- package/dist/client/assets/elixir-BRjLKONM.js +1 -0
- package/dist/client/assets/flow9-Cac8vKd7.js +1 -0
- package/dist/client/assets/freemarker2-BTSNJUl8.js +3 -0
- package/dist/client/assets/fsharp-fd1GTHhf.js +1 -0
- package/dist/client/assets/go-O9LJTZXk.js +1 -0
- package/dist/client/assets/graphql-LQdxqEYJ.js +1 -0
- package/dist/client/assets/handlebars-qkUBjVg6.js +1 -0
- package/dist/client/assets/hcl-DxDQ3s82.js +1 -0
- package/dist/client/assets/html-pguqE00h.js +1 -0
- package/dist/client/assets/htmlMode-BCCLuk2F.js +4 -0
- package/dist/client/assets/index-BFrMLHHu.css +1 -0
- package/dist/client/assets/index-CdBC-xgi.js +1250 -0
- package/dist/client/assets/ini-BvajGCUy.js +1 -0
- package/dist/client/assets/java-SYsfObOQ.js +1 -0
- package/dist/client/assets/javascript-ciDUXdez.js +1 -0
- package/dist/client/assets/jsonMode-BmkXC0tI.js +10 -0
- package/dist/client/assets/julia-DQXNmw_w.js +1 -0
- package/dist/client/assets/kotlin-qQ0MG-9I.js +1 -0
- package/dist/client/assets/less-GGFNNJHn.js +2 -0
- package/dist/client/assets/lexon-Canl7DCW.js +1 -0
- package/dist/client/assets/liquid-CwE4UIwf.js +1 -0
- package/dist/client/assets/lua-D28Ae8-K.js +1 -0
- package/dist/client/assets/m3-DPitgjJI.js +1 -0
- package/dist/client/assets/markdown-B811l8j2.js +1 -0
- package/dist/client/assets/mdx-K_9Emnjy.js +1 -0
- package/dist/client/assets/mips-CdjsipkG.js +1 -0
- package/dist/client/assets/msdax-CYqgjx_P.js +1 -0
- package/dist/client/assets/mysql-BHd6q0vd.js +1 -0
- package/dist/client/assets/objective-c-B1aVtJYH.js +1 -0
- package/dist/client/assets/pascal-BhNW15KB.js +1 -0
- package/dist/client/assets/pascaligo-5jv8CcQD.js +1 -0
- package/dist/client/assets/perl-DlYyT36c.js +1 -0
- package/dist/client/assets/pgsql-Dy0bjov7.js +1 -0
- package/dist/client/assets/php-120yhfDK.js +1 -0
- package/dist/client/assets/pla-CjnFlu4u.js +1 -0
- package/dist/client/assets/postiats-CQpG440k.js +1 -0
- package/dist/client/assets/powerquery-DdJtto1Z.js +1 -0
- package/dist/client/assets/powershell-Bu_VLpJB.js +1 -0
- package/dist/client/assets/protobuf-IBS6jZEB.js +2 -0
- package/dist/client/assets/pug-kFxLfcjb.js +1 -0
- package/dist/client/assets/python-BzIc0EVe.js +1 -0
- package/dist/client/assets/qsharp-q7JyzKFN.js +1 -0
- package/dist/client/assets/r-BIFz-_sK.js +1 -0
- package/dist/client/assets/razor-lXZl6dtu.js +1 -0
- package/dist/client/assets/redis-CHOsPHWR.js +1 -0
- package/dist/client/assets/redshift-CBifECDb.js +1 -0
- package/dist/client/assets/restructuredtext-CghPJEOS.js +1 -0
- package/dist/client/assets/ruby-CYWGW-b1.js +1 -0
- package/dist/client/assets/rust-DMDD0SHb.js +1 -0
- package/dist/client/assets/sb-BYAiYHFx.js +1 -0
- package/dist/client/assets/scala-Bqvq8jcR.js +1 -0
- package/dist/client/assets/scheme-Dhb-2j9p.js +1 -0
- package/dist/client/assets/scss-CTwUZ5N7.js +3 -0
- package/dist/client/assets/shell-CsDZo4DB.js +1 -0
- package/dist/client/assets/solidity-CME5AdoB.js +1 -0
- package/dist/client/assets/sophia-RYC1BQQz.js +1 -0
- package/dist/client/assets/sparql-KEyrF7De.js +1 -0
- package/dist/client/assets/sql-BdTr02Mf.js +1 -0
- package/dist/client/assets/st-C7iG7M4S.js +1 -0
- package/dist/client/assets/swift-D7IUmUK8.js +1 -0
- package/dist/client/assets/systemverilog-DgMryOEJ.js +1 -0
- package/dist/client/assets/tcl-PloMZuKG.js +1 -0
- package/dist/client/assets/tsMode-BAXmgo_t.js +11 -0
- package/dist/client/assets/twig-BfRIq3la.js +1 -0
- package/dist/client/assets/typescript-Cdf8nS1n.js +1 -0
- package/dist/client/assets/typespec-CzxlYoT_.js +1 -0
- package/dist/client/assets/vb-BwAE3J76.js +1 -0
- package/dist/client/assets/wgsl-B_1kOXbF.js +298 -0
- package/dist/client/assets/xml-DGyPgYnj.js +1 -0
- package/dist/client/assets/yaml-Dqv3HtbL.js +1 -0
- package/dist/client/index.html +14 -0
- package/dist/client/manic-logo.png +0 -0
- package/dist/client/wasm/manic_lang.d.ts +74 -0
- package/dist/client/wasm/manic_lang.js +302 -0
- package/dist/client/wasm/manic_lang_bg.wasm +0 -0
- package/dist/client/wasm/manic_lang_bg.wasm.d.ts +13 -0
- package/dist/server/agentProtocol.d.ts +131 -0
- package/dist/server/agentProtocol.js +21 -0
- package/dist/server/agentProtocol.js.map +1 -0
- package/dist/server/agentRuns.d.ts +46 -0
- package/dist/server/agentRuns.js +138 -0
- package/dist/server/agentRuns.js.map +1 -0
- package/dist/server/agentThreads.d.ts +20 -0
- package/dist/server/agentThreads.js +205 -0
- package/dist/server/agentThreads.js.map +1 -0
- package/dist/server/aiSecrets.d.ts +21 -0
- package/dist/server/aiSecrets.js +68 -0
- package/dist/server/aiSecrets.js.map +1 -0
- package/dist/server/app.d.ts +34 -0
- package/dist/server/app.js +804 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/assets.d.ts +34 -0
- package/dist/server/assets.js +659 -0
- package/dist/server/assets.js.map +1 -0
- package/dist/server/candidateFix.d.ts +28 -0
- package/dist/server/candidateFix.js +111 -0
- package/dist/server/candidateFix.js.map +1 -0
- package/dist/server/cli.d.ts +2 -0
- package/dist/server/cli.js +118 -0
- package/dist/server/cli.js.map +1 -0
- package/dist/server/diagnostics.d.ts +13 -0
- package/dist/server/diagnostics.js +73 -0
- package/dist/server/diagnostics.js.map +1 -0
- package/dist/server/engineCheck.d.ts +7 -0
- package/dist/server/engineCheck.js +60 -0
- package/dist/server/engineCheck.js.map +1 -0
- package/dist/server/engineInstall.d.ts +34 -0
- package/dist/server/engineInstall.js +228 -0
- package/dist/server/engineInstall.js.map +1 -0
- package/dist/server/enginePaths.d.ts +3 -0
- package/dist/server/enginePaths.js +76 -0
- package/dist/server/enginePaths.js.map +1 -0
- package/dist/server/folderPicker.d.ts +1 -0
- package/dist/server/folderPicker.js +54 -0
- package/dist/server/folderPicker.js.map +1 -0
- package/dist/server/manicAgent.d.ts +75 -0
- package/dist/server/manicAgent.js +476 -0
- package/dist/server/manicAgent.js.map +1 -0
- package/dist/server/manicEnv.d.ts +18 -0
- package/dist/server/manicEnv.js +64 -0
- package/dist/server/manicEnv.js.map +1 -0
- package/dist/server/promptStore.d.ts +11 -0
- package/dist/server/promptStore.js +85 -0
- package/dist/server/promptStore.js.map +1 -0
- package/dist/server/renderJobs.d.ts +54 -0
- package/dist/server/renderJobs.js +290 -0
- package/dist/server/renderJobs.js.map +1 -0
- package/dist/server/settings.d.ts +40 -0
- package/dist/server/settings.js +262 -0
- package/dist/server/settings.js.map +1 -0
- package/dist/server/smartDraw.d.ts +7 -0
- package/dist/server/smartDraw.js +88 -0
- package/dist/server/smartDraw.js.map +1 -0
- package/dist/server/workspace.d.ts +27 -0
- package/dist/server/workspace.js +172 -0
- package/dist/server/workspace.js.map +1 -0
- package/examples/.manic-output/40b6f3b9-7638-4c0e-bb4f-570d45d1b225/job.json +26 -0
- package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/job.json +26 -0
- package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/markers.json +13 -0
- package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/out.mp4 +0 -0
- package/examples/.manic-workbench-threads/thread_3ce7448a13f64f9e887d1bc8106a97a8.json +45 -0
- package/examples/.manic-workbench-threads/thread_d494cda29249477591056234719e4a3a.json +21 -0
- package/examples/.manic-workbench-threads/thread_e98ebdc225184ea5b8ddda8b44541f63.json +29 -0
- package/examples/README.md +35 -0
- package/examples/a-story-1.manic +222 -0
- package/examples/a-story.manic +100 -0
- package/examples/achromat-cinematic.manic +105 -0
- package/examples/achromat.manic +32 -0
- package/examples/aes-decrypt.manic +359 -0
- package/examples/aes-encrypt.manic +359 -0
- package/examples/aes-round.manic +70 -0
- package/examples/aes-story.manic +622 -0
- package/examples/ai-story.manic +118 -0
- package/examples/analysis.manic +53 -0
- package/examples/archimedes_pi.manic +89 -0
- package/examples/area_under_curve.manic +131 -0
- package/examples/art-rakkan.manic +69 -0
- package/examples/aspheric-lens.manic +32 -0
- package/examples/astronomical-watch.manic +96 -0
- package/examples/asymptote-randomwalk3-reference.manic +58 -0
- package/examples/asymptote-tiling-reference.manic +65 -0
- package/examples/aws-clustered-web-services.manic +186 -0
- package/examples/aws-event-processing-clusters-poc.manic +97 -0
- package/examples/aws-three-tier-web-application.manic +134 -0
- package/examples/band.manic +43 -0
- package/examples/banner.manic +37 -0
- package/examples/bayes.manic +27 -0
- package/examples/bellcurve.manic +41 -0
- package/examples/bfs_dfs.manic +35 -0
- package/examples/block-tackle.manic +26 -0
- package/examples/bloom-scope.manic +172 -0
- package/examples/boolean.manic +46 -0
- package/examples/boxplot-wave.manic +93 -0
- package/examples/boxplot.manic +43 -0
- package/examples/brace.manic +46 -0
- package/examples/brachistochrone-annotated.manic +51 -0
- package/examples/brachistochrone.manic +27 -0
- package/examples/bubble_sort.manic +41 -0
- package/examples/bullet-block-annotated.manic +48 -0
- package/examples/bullet-block.manic +11 -0
- package/examples/bullet-impact.manic +65 -0
- package/examples/bungee.manic +9 -0
- package/examples/c4-internet-banking-components.manic +33 -0
- package/examples/c4-internet-banking-containers.manic +29 -0
- package/examples/c4-internet-banking.manic +26 -0
- package/examples/c4-story.manic +171 -0
- package/examples/c4-test.manic +52 -0
- package/examples/c4-zoom.manic +69 -0
- package/examples/calculus-demo.manic +129 -0
- package/examples/calculus-one.manic +288 -0
- package/examples/captions.manic +31 -0
- package/examples/car-suspension-annotated.manic +57 -0
- package/examples/car-suspension.manic +8 -0
- package/examples/cart-pendulum.manic +11 -0
- package/examples/charts-bar-line.manic +26 -0
- package/examples/charts-column-race.manic +19 -0
- package/examples/charts-gdp-race.manic +43 -0
- package/examples/charts-german-elections.manic +28 -0
- package/examples/charts-line-race.manic +21 -0
- package/examples/circle-in-three.manic +156 -0
- package/examples/circle-thirds-no-triangle.manic +161 -0
- package/examples/clip-window.manic +34 -0
- package/examples/cloud-feathers.manic +50 -0
- package/examples/cloud-jellyfish-v2.manic +87 -0
- package/examples/cloud-jellyfish.manic +48 -0
- package/examples/cloud-kaleidoscope.manic +48 -0
- package/examples/cloud-koi.manic +51 -0
- package/examples/cloud-lissajous.manic +23 -0
- package/examples/cloud-medusae.manic +46 -0
- package/examples/cloud-phoenix.manic +49 -0
- package/examples/cloud-plumes.manic +47 -0
- package/examples/cloud-pottery.manic +104 -0
- package/examples/cloud-shells.manic +50 -0
- package/examples/cloud-starfield.manic +23 -0
- package/examples/cloud-wave-lattice.manic +23 -0
- package/examples/cloud-word.manic +31 -0
- package/examples/cloud3-ripple.manic +53 -0
- package/examples/cloud3-sphere.manic +26 -0
- package/examples/clt.manic +35 -0
- package/examples/collide-blocks-annotated.manic +45 -0
- package/examples/collide-blocks.manic +11 -0
- package/examples/compare-pendulum.manic +11 -0
- package/examples/complex-flowchart.manic +196 -0
- package/examples/compound-pulley.manic +25 -0
- package/examples/conics.manic +46 -0
- package/examples/coordinates.manic +52 -0
- package/examples/correlation.manic +35 -0
- package/examples/covariance.manic +30 -0
- package/examples/creator-affine-fern-growth.manic +72 -0
- package/examples/creator-bowl-to-saddle.manic +86 -0
- package/examples/creator-branch-counting-tree3.manic +77 -0
- package/examples/creator-chaos-game-fern.manic +72 -0
- package/examples/creator-circle-inversion-chain.manic +61 -0
- package/examples/creator-convex-hull-depth.manic +59 -0
- package/examples/creator-coordinate-worlds.manic +182 -0
- package/examples/creator-ellipse-reflection-property.manic +59 -0
- package/examples/creator-free-kicks.manic +261 -0
- package/examples/creator-geometry-language-showcase.manic +259 -0
- package/examples/creator-geometry-morph-promo.manic +151 -0
- package/examples/creator-heightmap-world.manic +130 -0
- package/examples/creator-hilbert3-spatial-index.manic +203 -0
- package/examples/creator-how-rocket-launch-works.manic +192 -0
- package/examples/creator-implicit-surface-parameterized.manic +51 -0
- package/examples/creator-incenter-dissection.manic +56 -0
- package/examples/creator-lattice-paths.manic +118 -0
- package/examples/creator-line-inversion.manic +49 -0
- package/examples/creator-lsystem-fractal-curve.manic +121 -0
- package/examples/creator-mandelbrot-escape-test.manic +58 -0
- package/examples/creator-monty-hall.manic +104 -0
- package/examples/creator-noise-story.manic +123 -0
- package/examples/creator-one-tile-pattern-story.manic +169 -0
- package/examples/creator-pathfinding.manic +82 -0
- package/examples/creator-point-to-plane-distance.manic +167 -0
- package/examples/creator-race-quiz.manic +76 -0
- package/examples/creator-randomwalk3-diffusion.manic +72 -0
- package/examples/creator-reflected-ellipse.manic +48 -0
- package/examples/creator-rule90-sierpinski.manic +64 -0
- package/examples/creator-three-shadows-of-a-curve.manic +48 -0
- package/examples/creator-trigonometry-one-angle.manic +307 -0
- package/examples/creator-v2-latex-algebra.manic +29 -0
- package/examples/creator-v2-latex-calculus.manic +37 -0
- package/examples/creator-v2-latex-physics.manic +29 -0
- package/examples/creator-v2-olympiad-geometry.manic +92 -0
- package/examples/creator-v2-options-socials.manic +21 -0
- package/examples/creator-v2-timers.manic +25 -0
- package/examples/creator-v2-timing-square.manic +25 -0
- package/examples/creator-v2-timing.manic +34 -0
- package/examples/creator-v2.manic +36 -0
- package/examples/creator-why-rockets-use-stages.manic +198 -0
- package/examples/creator-wrap-real-line.manic +51 -0
- package/examples/cubic-graphs.manic +432 -0
- package/examples/curve-features.manic +41 -0
- package/examples/definedmotion-fourier-gallery.manic +171 -0
- package/examples/derivative-of-ln-x.manic +194 -0
- package/examples/diagonalise.manic +56 -0
- package/examples/dijkstra.manic +29 -0
- package/examples/dimensions-unfold.manic +211 -0
- package/examples/disc-integration.manic +172 -0
- package/examples/double-incline.manic +9 -0
- package/examples/double-integral3.manic +43 -0
- package/examples/double-pendulum.manic +35 -0
- package/examples/double-spring.manic +9 -0
- package/examples/drop-mass.manic +25 -0
- package/examples/eigen3.manic +34 -0
- package/examples/equal_cuts.manic +44 -0
- package/examples/equation.manic +16 -0
- package/examples/equilateral.manic +57 -0
- package/examples/euler_line.manic +51 -0
- package/examples/exponential-shells.manic +188 -0
- package/examples/extrude3.manic +37 -0
- package/examples/factorial-flowchart.manic +69 -0
- package/examples/fibonacci-sphere.manic +57 -0
- package/examples/flow-lorenz.manic +47 -0
- package/examples/fourier-series-live-wave.manic +114 -0
- package/examples/fourier-square-wave-live.manic +114 -0
- package/examples/fractal_tree.manic +39 -0
- package/examples/frame3-grid-policies.manic +48 -0
- package/examples/ftc.manic +54 -0
- package/examples/function_graph.manic +54 -0
- package/examples/galton-board-process.manic +150 -0
- package/examples/gcp-clustered-web-services.manic +186 -0
- package/examples/gcp-message-collecting.manic +139 -0
- package/examples/geo-pythagoras-short.manic +119 -0
- package/examples/glsl-boxgrid.manic +105 -0
- package/examples/glsl-parameter.manic +30 -0
- package/examples/glsl-raymarch.manic +59 -0
- package/examples/glsl-shapes.manic +122 -0
- package/examples/gradient-descent-field.manic +116 -0
- package/examples/gradient-fastest-descent-shorts.manic +153 -0
- package/examples/gradient-fastest-descent.manic +125 -0
- package/examples/gradient-pendulum-shorts.manic +117 -0
- package/examples/gradient.manic +74 -0
- package/examples/graph.manic +45 -0
- package/examples/graph_moving.manic +67 -0
- package/examples/grid-astar.manic +15 -0
- package/examples/grid-life-soup.manic +31 -0
- package/examples/grid-life-zoo.manic +46 -0
- package/examples/grid-life.manic +19 -0
- package/examples/grid-wfc.manic +13 -0
- package/examples/growing-fractal-tree3.manic +58 -0
- package/examples/gun-shot.manic +82 -0
- package/examples/hashmap.manic +38 -0
- package/examples/heightmap3-world.manic +64 -0
- package/examples/heightmap3.manic +23 -0
- package/examples/hilbert-curve3-space-filling.manic +117 -0
- package/examples/hill_run.manic +71 -0
- package/examples/histogram.manic +43 -0
- package/examples/hotdog-taco.manic +147 -0
- package/examples/hue_wave.manic +35 -0
- package/examples/hypothesis.manic +32 -0
- package/examples/image.manic +29 -0
- package/examples/incircle_tangents.manic +64 -0
- package/examples/incline-bumper.manic +11 -0
- package/examples/incline-pulley.manic +11 -0
- package/examples/incline-showcase.manic +55 -0
- package/examples/inline-math.manic +16 -0
- package/examples/inscribed-angle-short.manic +56 -0
- package/examples/integral-sqrt-tanx.manic +255 -0
- package/examples/integrals.manic +274 -0
- package/examples/inverse-derivatives.manic +94 -0
- package/examples/k8s-cluster-components.manic +82 -0
- package/examples/k8s-stateful-architecture.manic +134 -0
- package/examples/k8s-three-tier.manic +146 -0
- package/examples/kapitza.manic +11 -0
- package/examples/latex-disintegration.manic +123 -0
- package/examples/lens-paper.manic +36 -0
- package/examples/lens-prescription.manic +33 -0
- package/examples/lens-system.manic +34 -0
- package/examples/lens.manic +31 -0
- package/examples/limit-infinity.manic +30 -0
- package/examples/limit.manic +33 -0
- package/examples/linear-algebra-3d.manic +50 -0
- package/examples/linear-algebra.manic +115 -0
- package/examples/linear-map.manic +39 -0
- package/examples/linear-map3.manic +33 -0
- package/examples/linear-system.manic +99 -0
- package/examples/linear_transform.manic +43 -0
- package/examples/linked_list.manic +38 -0
- package/examples/lln.manic +31 -0
- package/examples/loop-cinematic.manic +41 -0
- package/examples/loop-track.manic +11 -0
- package/examples/lorenz-attractor.manic +55 -0
- package/examples/lorenz-shells.manic +43 -0
- package/examples/lost-in-patterns.manic +149 -0
- package/examples/lsystem-asymptote-curves.manic +81 -0
- package/examples/manic-ml-activation-focus.manic +133 -0
- package/examples/manic-ml-cnn-edge-story.manic +102 -0
- package/examples/manic-ml-forward-pass.manic +93 -0
- package/examples/manic-ml-learning-step.manic +116 -0
- package/examples/manic-ml-logits-sampling.manic +112 -0
- package/examples/manic-ml-scalar-to-tensor.manic +143 -0
- package/examples/manic-ml-token-embedding.manic +110 -0
- package/examples/manic-ml-transformer-attention.manic +102 -0
- package/examples/manic-ml-transformer-block.manic +116 -0
- package/examples/manic-promo.manic +64 -0
- package/examples/map-attractor.manic +45 -0
- package/examples/mask-lens.manic +33 -0
- package/examples/matrix.manic +37 -0
- package/examples/matrix3.manic +101 -0
- package/examples/matrix_addition.manic +66 -0
- package/examples/matrix_addition_plane.manic +91 -0
- package/examples/maxwell-boltzmann-effusion-v2.manic +142 -0
- package/examples/maxwell-boltzmann-process.manic +86 -0
- package/examples/microservices-platform.manic +140 -0
- package/examples/molecule.manic +8 -0
- package/examples/morph-icons.manic +29 -0
- package/examples/morph.manic +29 -0
- package/examples/morph3.manic +49 -0
- package/examples/motion-flow-foundation.manic +148 -0
- package/examples/motion-graphics-v2-story.manic +189 -0
- package/examples/motion-graphics-v2.manic +81 -0
- package/examples/motion-graphics.manic +81 -0
- package/examples/multivariable3.manic +26 -0
- package/examples/mystory.manic +9 -0
- package/examples/newton.manic +39 -0
- package/examples/newtons-cradle.manic +10 -0
- package/examples/nine_point.manic +59 -0
- package/examples/noise-terrain.manic +16 -0
- package/examples/off-axis.manic +32 -0
- package/examples/onprem-advanced-web-service-v2.manic +196 -0
- package/examples/onprem-advanced-web-service.manic +175 -0
- package/examples/orthocenter.manic +63 -0
- package/examples/param3.manic +43 -0
- package/examples/parameter-journeys.manic +154 -0
- package/examples/parameterized-field-advection.manic +57 -0
- package/examples/parameterized-generated-families3.manic +83 -0
- package/examples/particles-flow.manic +61 -0
- package/examples/pascal-triangle.manic +92 -0
- package/examples/pendulum-annotated.manic +72 -0
- package/examples/pendulum-damped.manic +35 -0
- package/examples/pendulum.manic +38 -0
- package/examples/perfect-reel.manic +43 -0
- package/examples/pie.manic +41 -0
- package/examples/pieday.manic +113 -0
- package/examples/piston.manic +7 -0
- package/examples/popkorn-field.manic +38 -0
- package/examples/prism-cinematic.manic +36 -0
- package/examples/prism.manic +32 -0
- package/examples/probability.manic +57 -0
- package/examples/process-branching-dispatch.manic +71 -0
- package/examples/process-stream-observe.manic +54 -0
- package/examples/projection.manic +57 -0
- package/examples/prompt-test-10.manic +257 -0
- package/examples/prompt-test-11.manic +168 -0
- package/examples/prompt-test-12.manic +177 -0
- package/examples/prompt-test-13.manic +228 -0
- package/examples/prompt-test-14.manic +319 -0
- package/examples/prompt-test-15.manic +325 -0
- package/examples/prompt-test-16.manic +252 -0
- package/examples/prompt-test-2.manic +239 -0
- package/examples/prompt-test-3.manic +336 -0
- package/examples/prompt-test-4.manic +195 -0
- package/examples/prompt-test-5.manic +223 -0
- package/examples/prompt-test-6.manic +222 -0
- package/examples/prompt-test-7.manic +156 -0
- package/examples/prompt-test-8.manic +266 -0
- package/examples/prompt-test-9.manic +171 -0
- package/examples/prompt-test.manic +158 -0
- package/examples/pulley-annotated.manic +54 -0
- package/examples/pulley-paper.manic +52 -0
- package/examples/pulley-scale.manic +23 -0
- package/examples/pulley.manic +24 -0
- package/examples/quadratic-formula-continuity.manic +110 -0
- package/examples/quiz-euler.manic +52 -0
- package/examples/quiz-geometry-2.manic +107 -0
- package/examples/quiz-geometry.manic +108 -0
- package/examples/quiz-skins.manic +22 -0
- package/examples/raft-cm.manic +24 -0
- package/examples/ramp.manic +25 -0
- package/examples/ray-fan.manic +27 -0
- package/examples/raymarch-alpha.manic +39 -0
- package/examples/raymarch-boxgrid.manic +47 -0
- package/examples/raymarch-docker-latency.manic +74 -0
- package/examples/raymarch-metaballs.manic +37 -0
- package/examples/raymarch-sculpture.manic +39 -0
- package/examples/raymarch-shapes3.manic +31 -0
- package/examples/reactive-integral.manic +172 -0
- package/examples/reactive-math-journey.manic +185 -0
- package/examples/reactive-math-notation.manic +150 -0
- package/examples/reactive-multiformat.manic +130 -0
- package/examples/reactive-world.manic +111 -0
- package/examples/refraction-paper.manic +40 -0
- package/examples/refraction.manic +32 -0
- package/examples/resonance.manic +10 -0
- package/examples/rewrite-exponential-cubic.manic +141 -0
- package/examples/rewrite-integration.manic +199 -0
- package/examples/riemann_rainbow.manic +61 -0
- package/examples/riemann_readout.manic +61 -0
- package/examples/robot-arm.manic +25 -0
- package/examples/rref.manic +48 -0
- package/examples/second-law-thermodynamics.manic +385 -0
- package/examples/series-parallel-springs.manic +8 -0
- package/examples/serverless-processing.manic +145 -0
- package/examples/shader-cellular.manic +35 -0
- package/examples/shader-fractal.manic +45 -0
- package/examples/shader-fx.manic +34 -0
- package/examples/shader-glitch-grid.manic +55 -0
- package/examples/shader-parameter.manic +25 -0
- package/examples/shader-patterns.manic +37 -0
- package/examples/shader-plasma.manic +43 -0
- package/examples/shader-shapes-dsl.manic +46 -0
- package/examples/shader-shapes.manic +37 -0
- package/examples/shader-warp.manic +22 -0
- package/examples/shapes-howto.manic +411 -0
- package/examples/sine_wave.manic +42 -0
- package/examples/skew.manic +40 -0
- package/examples/smoke.rs +57 -0
- package/examples/solids3.manic +22 -0
- package/examples/some-story.manic +299 -0
- package/examples/spinning-cylinder-flow.manic +87 -0
- package/examples/spline.manic +21 -0
- package/examples/spot-diagram.manic +32 -0
- package/examples/spring-annotated.manic +60 -0
- package/examples/spring-chain.manic +11 -0
- package/examples/spring-damped.manic +33 -0
- package/examples/spring-incline.manic +10 -0
- package/examples/spring-paper.manic +46 -0
- package/examples/spring-pendulum.manic +14 -0
- package/examples/spring.manic +33 -0
- package/examples/sqrt-tanx.manic +217 -0
- package/examples/ssl-handshake-sdf.manic +116 -0
- package/examples/stack_queue.manic +53 -0
- package/examples/statistics.manic +60 -0
- package/examples/story-addressable-asset-cues.manic +71 -0
- package/examples/story-dependent-chain-history.manic +56 -0
- package/examples/story-living-dependency-cloud.manic +50 -0
- package/examples/story-time-varying-field3.manic +57 -0
- package/examples/story.manic +4 -0
- package/examples/string-art-breath.manic +70 -0
- package/examples/string-wave.manic +10 -0
- package/examples/summary.manic +48 -0
- package/examples/svg-howto.manic +172 -0
- package/examples/svg-import.manic +18 -0
- package/examples/systems-architecture-poc.manic +92 -0
- package/examples/systems-arrow-patterns.manic +151 -0
- package/examples/systems-foundation.manic +71 -0
- package/examples/systems-rabbitmq-consumers.manic +118 -0
- package/examples/table.manic +39 -0
- package/examples/table_braces.manic +54 -0
- package/examples/tangent-length-short.manic +57 -0
- package/examples/tangent.manic +29 -0
- package/examples/tangents.manic +54 -0
- package/examples/taylor.manic +44 -0
- package/examples/terminal_boot.manic +40 -0
- package/examples/test.manic +61 -0
- package/examples/text-guide.manic +304 -0
- package/examples/textbook-coordinate-worlds.manic +129 -0
- package/examples/textbook-doubly-list.manic +33 -0
- package/examples/textbook-function-to-solid.manic +126 -0
- package/examples/textbook-geometry-dimension-reduction.manic +129 -0
- package/examples/textbook-incline-fbd.manic +43 -0
- package/examples/textbook-length-area-volume.manic +137 -0
- package/examples/textbook-matrix-inverses.manic +172 -0
- package/examples/textbook-pulley.manic +35 -0
- package/examples/textbook-statistical-dimensions.manic +151 -0
- package/examples/textbook-tension.manic +39 -0
- package/examples/textbook-watermelon-sections.manic +216 -0
- package/examples/thales-semicircle-short.manic +53 -0
- package/examples/three-d-v2-lab.manic +83 -0
- package/examples/three-d-v2-story.manic +106 -0
- package/examples/three-d-v2.manic +69 -0
- package/examples/three_d.manic +39 -0
- package/examples/timing-v2-scene.manic +47 -0
- package/examples/trajectory.manic +28 -0
- package/examples/transform_copy.manic +35 -0
- package/examples/transforms.manic +54 -0
- package/examples/trapped-light-dimensions.manic +226 -0
- package/examples/tree-of-leaves.manic +215 -0
- package/examples/triangle.manic +68 -0
- package/examples/two_person_walk.manic +296 -0
- package/examples/two_pointer.manic +32 -0
- package/examples/type-to-sdf.manic +139 -0
- package/examples/typewriter.manic +28 -0
- package/examples/vector_field.manic +32 -0
- package/examples/vertical-spring.manic +10 -0
- package/examples/volume3.manic +21 -0
- package/examples/volumes-solid-of-revolution.manic +111 -0
- package/examples/walk.manic +154 -0
- package/examples/wheel-duo.manic +91 -0
- package/examples/wheel-radial.manic +78 -0
- package/examples/wheel-square.manic +83 -0
- package/examples/wireframe-spheres.manic +37 -0
- package/examples/zeroth-law-thermodynamics.manic +269 -0
- package/package.json +59 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// spring-damped.manic — the same four views, now with friction
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// Identical to `spring.manic` but with `damping` (the 6th arg) turned on, so the
|
|
5
|
+
// oscillation loses energy. Watch every panel respond together:
|
|
6
|
+
// · sim — the coil's swing SHRINKS each cycle (settles to rest)
|
|
7
|
+
// · phase — the ellipse becomes an INWARD SPIRAL
|
|
8
|
+
// · well — the ball SETTLES to the bottom of the parabola U(x)=½kx²
|
|
9
|
+
// · energygraph — the TOTAL (gold) line DECAYS (KE↔PE trade, sum drops)
|
|
10
|
+
//
|
|
11
|
+
// Set damping = 0 (or drop the 6th arg) for the frictionless version, where the
|
|
12
|
+
// ellipse stays closed and the total-energy line stays flat (conservation).
|
|
13
|
+
// ============================================================================
|
|
14
|
+
|
|
15
|
+
title("Damped spring — energy bleeds away");
|
|
16
|
+
canvas("16:9");
|
|
17
|
+
|
|
18
|
+
text(hdr, (cx, 44), "Add friction: the oscillation decays, every view follows");
|
|
19
|
+
size(hdr, 24); color(hdr, cyan); bold(hdr); display(hdr);
|
|
20
|
+
|
|
21
|
+
// the mass–spring (left) — 6th arg 0.6 is the damping
|
|
22
|
+
spring(s, (330, 300), 10, 1.4, 110, 0.6);
|
|
23
|
+
|
|
24
|
+
// the same generic views of the SAME (now damped) simulation
|
|
25
|
+
phase(s, (760, 175), 90); // ellipse → inward spiral
|
|
26
|
+
timegraph(s, (1010, 175), 90); // x(t), v(t) — envelope shrinks
|
|
27
|
+
well(s, (760, 460), 90); // ball settles to the bottom of the parabola
|
|
28
|
+
energygraph(s, (1010, 460), 90); // total energy decays
|
|
29
|
+
|
|
30
|
+
text(cap, (cx, h - 32), "damping = 0.6 · the spiral, settling ball, and decaying total energy all show the same loss");
|
|
31
|
+
size(cap, 16); color(cap, dim); display(cap);
|
|
32
|
+
|
|
33
|
+
run(s, 10);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// spring-incline.manic — a mass on a spring on an inclined plane.
|
|
2
|
+
title("Spring on an incline");
|
|
3
|
+
canvas("16:9");
|
|
4
|
+
text(hdr,(cx,44),"Spring on an incline — gravity's along-ramp pull shifts equilibrium"); size(hdr,22); color(hdr,cyan); bold(hdr); display(hdr);
|
|
5
|
+
springincline(si, (360,180), 32);
|
|
6
|
+
untraced(si.path);
|
|
7
|
+
phase(si, (960,200), 100);
|
|
8
|
+
energygraph(si, (960,470), 100);
|
|
9
|
+
text(cap,(cx,h-32),"the bob oscillates along the ramp about its stretched rest point"); size(cap,16); color(cap,dim); display(cap);
|
|
10
|
+
par { run(si, 10); draw(si.path, 10); }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// spring-paper.manic — an ANIMATED sim in textbook paper style
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// The `spring` sim (mass on a spring, SHM), dressed as a textbook figure AND run:
|
|
5
|
+
// `template("paper")` inks it automatically, a hatched `support` wall, the coil
|
|
6
|
+
// in forest green, an outlined mass box, plus a base-manic reveal (Hooke's law,
|
|
7
|
+
// equilibrium, x₀) — then `run` plays the oscillation. The companion to
|
|
8
|
+
// pulley-paper: the paper/support treatment on another live sim.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Mass on a spring — textbook style");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
template("paper");
|
|
14
|
+
|
|
15
|
+
text(hdr, (cx, 46), "Mass on a spring — Hooke's law"); color(hdr, fg); size(hdr, 26); bold(hdr); display(hdr); hidden(hdr);
|
|
16
|
+
|
|
17
|
+
// the sim, restyled to textbook ink (parts hidden, revealed in order)
|
|
18
|
+
spring(sp, (380, 300), 10, 1.3, 110);
|
|
19
|
+
outlined(sp.mass); outline(sp.mass, fg);
|
|
20
|
+
hidden(sp.wall); hidden(sp.spring); hidden(sp.mass); hidden(sp.overlays);
|
|
21
|
+
untraced(sp.path);
|
|
22
|
+
|
|
23
|
+
// a hatched wall stands in for the sim's plain anchor; equilibrium reference
|
|
24
|
+
support(wall, (177, 300), 150, "right"); untraced(wall);
|
|
25
|
+
line(eq, (380, 246), (380, 354)); color(eq, dim); stroke(eq, 2); untraced(eq);
|
|
26
|
+
|
|
27
|
+
text(eqL, (380, 232), "equilibrium"); color(eqL, dim); size(eqL, 15); display(eqL); hidden(eqL);
|
|
28
|
+
text(coilL, (300, 214), "spring, stiffness k"); color(coilL, fg); size(coilL, 17); display(coilL); hidden(coilL);
|
|
29
|
+
text(massL, (548, 258), "mass m"); color(massL, fg); size(massL, 17); display(massL); hidden(massL);
|
|
30
|
+
bracelabel(xb, (380, 360), (523, 360), "x₀", 22); color(xb, fg); hidden(xb); hidden(xb.label);
|
|
31
|
+
text(hooke, (380, 152), "F = −k·x"); color(hooke, fg); size(hooke, 24); display(hooke); hidden(hooke);
|
|
32
|
+
text(cap, (cx, h - 40), ""); color(cap, fg); size(cap, 20); display(cap);
|
|
33
|
+
|
|
34
|
+
// ============================== SCRIPT ==============================
|
|
35
|
+
show(hdr, 0.5);
|
|
36
|
+
say(cap, "a coil of stiffness k fixed to a wall, with a mass on the end", 0.4);
|
|
37
|
+
draw(wall, 0.4); show(sp.spring, 0.4); show(coilL, 0.4); show(sp.mass, 0.4); show(massL, 0.3);
|
|
38
|
+
wait(0.4);
|
|
39
|
+
|
|
40
|
+
say(cap, "pull it x₀ from equilibrium — it pulls straight back, F = −k·x", 0.4);
|
|
41
|
+
draw(eq, 0.4); show(eqL, 0.3); show(xb, 0.4); show(xb.label, 0.4); show(hooke, 0.5);
|
|
42
|
+
wait(0.7);
|
|
43
|
+
fade(coilL, 0.3); fade(massL, 0.3); fade(xb, 0.3); fade(xb.label, 0.3); fade(hooke, 0.3);
|
|
44
|
+
|
|
45
|
+
say(cap, "release — simple harmonic motion", 0.4);
|
|
46
|
+
run(sp, 9);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// spring-pendulum.manic — the elastic pendulum: swings AND bounces.
|
|
2
|
+
// springpendulum(id,[center],[angle0],[stretch0],[unit],[damping]) — a bob on a
|
|
3
|
+
// springy rod (drawn as a stretching coil). Energy sloshes between the swing and
|
|
4
|
+
// the bounce, so the phase portrait and energy graph are richer than a rigid rod.
|
|
5
|
+
title("Elastic pendulum — swing meets bounce");
|
|
6
|
+
canvas("16:9");
|
|
7
|
+
text(hdr,(cx,44),"Spring pendulum — energy sloshes between swing and bounce");
|
|
8
|
+
size(hdr,23); color(hdr,cyan); bold(hdr); display(hdr);
|
|
9
|
+
springpendulum(sp, (380,230), 35, 0.5, 105);
|
|
10
|
+
untraced(sp.path);
|
|
11
|
+
phase(sp, (900,190), 95); // θ vs ω
|
|
12
|
+
energygraph(sp, (900,470), 95); // KE / PE / total (~conserved, lightly damped)
|
|
13
|
+
text(cap,(cx,h-32),"the coil stretches as it swings — a two-mode system"); size(cap,16); color(cap,dim); display(cap);
|
|
14
|
+
par { run(sp, 11); draw(sp.path, 11); }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// spring.manic — the physics kit's SECOND sim (Layer 1)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// `spring(id, [center], [stiffness], [x0], [unit], [damping])` — a mass on a
|
|
5
|
+
// spring, PRE-SIMULATED with RK4 (deterministic). Only `id` is required. It's a
|
|
6
|
+
// different system from the pendulum, yet it inherits the SAME generic views for
|
|
7
|
+
// free — note the energy well here is a PARABOLA U(x)=½kx² (the pendulum's is a
|
|
8
|
+
// cosine). `run(id, [dur])` replays the motion (alias: `swing`).
|
|
9
|
+
//
|
|
10
|
+
// TO ADAPT: add damping (6th arg) — the phase ellipse spirals in, the ball
|
|
11
|
+
// settles to the bottom of the parabola, and total energy decays:
|
|
12
|
+
// `spring(s, (360,320), 10, 1.4, 110, 0.6)`.
|
|
13
|
+
// ============================================================================
|
|
14
|
+
|
|
15
|
+
title("Mass on a spring — four views");
|
|
16
|
+
canvas("16:9");
|
|
17
|
+
|
|
18
|
+
text(hdr, (cx, 44), "A different sim — same four views (well is a parabola)");
|
|
19
|
+
size(hdr, 24); color(hdr, cyan); bold(hdr); display(hdr);
|
|
20
|
+
|
|
21
|
+
// the mass–spring on the left
|
|
22
|
+
spring(s, (330, 300), 10, 1.4, 110);
|
|
23
|
+
|
|
24
|
+
// the same generic views of the SAME simulation, 2×2 on the right
|
|
25
|
+
phase(s, (760, 175), 90); // x vs v — an ellipse
|
|
26
|
+
timegraph(s, (1010, 175), 90); // x(t), v(t) with a sweep line
|
|
27
|
+
well(s, (760, 460), 90); // parabolic energy well U(x)=½kx²
|
|
28
|
+
energygraph(s, (1010, 460), 90); // KE / PE / total over time
|
|
29
|
+
|
|
30
|
+
text(cap, (cx, h - 32), "one mass–spring, seen as motion · phase ellipse · time series · parabolic well · energy");
|
|
31
|
+
size(cap, 16); color(cap, dim); display(cap);
|
|
32
|
+
|
|
33
|
+
run(s, 10); // every panel animates in lockstep
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// sqrt-tanx.manic — √(tan x) by PURE GEOMETRY (3B1B-style)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// THE PROBLEM: √(tan θ) looks like algebra. It is geometry.
|
|
5
|
+
//
|
|
6
|
+
// THE PROOF, in three pictures:
|
|
7
|
+
// 1. On the unit circle, tan θ IS the length of the vertical tangent segment.
|
|
8
|
+
// 2. √a is the geometric mean of 1 and a — Euclid: semicircle on diameter
|
|
9
|
+
// 1+a, erect a perpendicular at the "1" mark; its height is √a.
|
|
10
|
+
// 3. Set a = tan θ. The altitude IS √(tan θ). No algebra required.
|
|
11
|
+
//
|
|
12
|
+
// Then we sweep θ and watch the construction's height paint the curve —
|
|
13
|
+
// teal → violet → coral — using the expanded semantic palette.
|
|
14
|
+
//
|
|
15
|
+
// manic examples/sqrt-tanx.manic
|
|
16
|
+
// manic examples/sqrt-tanx.manic --still 22
|
|
17
|
+
// ============================================================================
|
|
18
|
+
|
|
19
|
+
title("√(tan x) — Pure Geometry");
|
|
20
|
+
canvas("16:9");
|
|
21
|
+
template("blank");
|
|
22
|
+
|
|
23
|
+
// ---- stage ----
|
|
24
|
+
circle(well, (cx, 400), 340);
|
|
25
|
+
filled(well);
|
|
26
|
+
gradient(well, panel, void, radial);
|
|
27
|
+
opacity(well, 0.55);
|
|
28
|
+
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// LEFT — the unit circle, where tan θ is a length
|
|
31
|
+
// ============================================================================
|
|
32
|
+
let ox = 250;
|
|
33
|
+
let oy = 430;
|
|
34
|
+
let R = 145;
|
|
35
|
+
// a friendly angle: θ = 0.95 rad ≈ 54.4°, tan ≈ 1.40, √tan ≈ 1.18
|
|
36
|
+
let th = 0.95;
|
|
37
|
+
let Px = ox + R*cos(th);
|
|
38
|
+
let Py = oy - R*sin(th);
|
|
39
|
+
let Ty = oy - R*tan(th);
|
|
40
|
+
|
|
41
|
+
circle(O, (ox, oy), 7); outlined(O); color(O, fg); stroke(O, 1.5); hidden(O);
|
|
42
|
+
dot(A, (ox + R, oy), 5); color(A, dim); hidden(A); // (1, 0)
|
|
43
|
+
// contact points: open dashed rings (filled dots hide the circle + tangent)
|
|
44
|
+
circle(P, (Px, Py), 11);
|
|
45
|
+
outlined(P); color(P, mint); stroke(P, 2); dashed(P, 3.5, 2.8); untraced(P); hidden(P);
|
|
46
|
+
circle(T, (ox + R, Ty), 11);
|
|
47
|
+
outlined(T); color(T, coral); stroke(T, 2); dashed(T, 3.5, 2.8); untraced(T); hidden(T);
|
|
48
|
+
|
|
49
|
+
// ray as a line (not arrow) so the filled arrowhead doesn't cover P
|
|
50
|
+
line(ray, (ox, oy), (Px, Py));
|
|
51
|
+
color(ray, mint); stroke(ray, 2.5); untraced(ray); hidden(ray);
|
|
52
|
+
|
|
53
|
+
// the tangent SEGMENT — its length IS tan θ (in radii)
|
|
54
|
+
line(tanseg, (ox + R, oy), (ox + R, Ty));
|
|
55
|
+
color(tanseg, coral); stroke(tanseg, 5); untraced(tanseg); hidden(tanseg);
|
|
56
|
+
|
|
57
|
+
// angle mark — textbook style: a thin ARC, never a filled wedge (fills hide the diagram)
|
|
58
|
+
arc(wedge, (ox, oy), R*0.42, 0, -th*180/pi);
|
|
59
|
+
color(wedge, violet); stroke(wedge, 2.5); untraced(wedge); hidden(wedge);
|
|
60
|
+
|
|
61
|
+
circle(uc, (ox, oy), R);
|
|
62
|
+
outlined(uc); outline(uc, teal); stroke(uc, 3); untraced(uc); hidden(uc);
|
|
63
|
+
|
|
64
|
+
line(axX, (ox - R - 30, oy), (ox + R + 100, oy));
|
|
65
|
+
color(axX, dim); stroke(axX, 1.5); untraced(axX); hidden(axX);
|
|
66
|
+
line(axY, (ox, oy + R + 40), (ox, oy - R - 50));
|
|
67
|
+
color(axY, dim); stroke(axY, 1.5); untraced(axY); hidden(axY);
|
|
68
|
+
|
|
69
|
+
line(tline, (ox + R, oy + R + 50), (ox + R, oy - R - 90));
|
|
70
|
+
color(tline, dim); stroke(tline, 1.5); dashed(tline, 10, 8); untraced(tline); hidden(tline);
|
|
71
|
+
|
|
72
|
+
text(labP, (Px + 14, Py - 14), "P"); size(labP, 20); color(labP, mint); hidden(labP);
|
|
73
|
+
text(labO, (ox - 18, oy + 22), "O"); size(labO, 18); color(labO, dim); hidden(labO);
|
|
74
|
+
text(labA, (ox + R + 14, oy + 22), "1"); size(labA, 18); color(labA, dim); hidden(labA);
|
|
75
|
+
text(labT, (ox + R + 18, Ty), "tan θ"); size(labT, 20); color(labT, coral); hidden(labT);
|
|
76
|
+
text(labTh, (ox + 48, oy - 28), "θ"); size(labTh, 22); color(labTh, violet); hidden(labTh);
|
|
77
|
+
|
|
78
|
+
// ============================================================================
|
|
79
|
+
// RIGHT — Euclid's geometric mean: √a from 1 and a
|
|
80
|
+
// ============================================================================
|
|
81
|
+
let gx = 620;
|
|
82
|
+
let gy = 500;
|
|
83
|
+
let u = 110; // px per unit
|
|
84
|
+
let a = tan(th); // ≈ 1.40
|
|
85
|
+
let root = sqrt(a); // ≈ 1.18
|
|
86
|
+
let G0x = gx;
|
|
87
|
+
let G1x = gx + u; // the "1" mark
|
|
88
|
+
let G2x = gx + u*(1 + a); // the "1+a" mark
|
|
89
|
+
let mid = (G0x + G2x)*0.5;
|
|
90
|
+
let rad = u*(1 + a)*0.5;
|
|
91
|
+
|
|
92
|
+
dot(G0, (G0x, gy), 5); color(G0, dim); hidden(G0);
|
|
93
|
+
dot(G1, (G1x, gy), 6); color(G1, teal); glow(G1, 0.4); hidden(G1);
|
|
94
|
+
dot(G2, (G2x, gy), 5); color(G2, coral); hidden(G2);
|
|
95
|
+
line(base, (G0x, gy), (G2x, gy));
|
|
96
|
+
color(base, fg); stroke(base, 3); untraced(base); hidden(base);
|
|
97
|
+
|
|
98
|
+
// upper semicircle on diameter [0, 1+a]
|
|
99
|
+
// screen angles: 0° right, 90° down, 270° up — from left through UP: start 180, sweep +180
|
|
100
|
+
arc(semi, (mid, gy), rad, 180, 180);
|
|
101
|
+
color(semi, indigo); stroke(semi, 3); untraced(semi); hidden(semi);
|
|
102
|
+
|
|
103
|
+
// altitude at the "1" mark — height = √(1·a) = √(tan θ)
|
|
104
|
+
line(alt, (G1x, gy), (G1x, gy - root*u));
|
|
105
|
+
color(alt, violet); stroke(alt, 5); untraced(alt); hidden(alt);
|
|
106
|
+
dot(H, (G1x, gy - root*u), 8); color(H, violet); glow(H, 0.7); hidden(H);
|
|
107
|
+
|
|
108
|
+
text(lab0, (G0x, gy + 28), "0"); size(lab0, 18); color(lab0, dim); hidden(lab0);
|
|
109
|
+
text(lab1, (G1x, gy + 28), "1"); size(lab1, 18); color(lab1, teal); hidden(lab1);
|
|
110
|
+
text(labA2, (G2x, gy + 28), "1+tanθ"); size(labA2, 18); color(labA2, coral); hidden(labA2);
|
|
111
|
+
text(labH, (G1x + 16, gy - root*u - 8), "√(tan θ)"); size(labH, 22); color(labH, violet); hidden(labH);
|
|
112
|
+
|
|
113
|
+
// brace / connector: coral tan length → feeds the geometric mean
|
|
114
|
+
arrow(feed, (ox + R + 36, (oy + Ty)*0.5), (G2x - 10, gy - 40));
|
|
115
|
+
color(feed, coral); stroke(feed, 2); dashed(feed, 8, 6); untraced(feed); hidden(feed);
|
|
116
|
+
|
|
117
|
+
// ============================================================================
|
|
118
|
+
// BOTTOM — the curve itself, colored by the new palette
|
|
119
|
+
// ============================================================================
|
|
120
|
+
axes(ax, (920, 400), 280, 220);
|
|
121
|
+
hidden(ax);
|
|
122
|
+
plot(curve, (920, 400), 95, 85, "sqrt(tan(x))", (0.25, 1.35));
|
|
123
|
+
stroke(curve, 5); untraced(curve); hidden(curve);
|
|
124
|
+
gradient(curve, teal, violet, coral, 270);
|
|
125
|
+
// low x → small √tan (teal); high x → large (coral), via height = truth
|
|
126
|
+
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// TYPOGRAPHY
|
|
129
|
+
// ============================================================================
|
|
130
|
+
caption(q, "what IS the square root of a tangent?", (cx, 58), 32, gold);
|
|
131
|
+
equation(law, (cx, 110), `\sqrt{\tan\theta}`, 44);
|
|
132
|
+
color(law, violet); hidden(law);
|
|
133
|
+
equation(mean, (900, 160), `\sqrt{a}=\sqrt{1\cdot a}`, 28);
|
|
134
|
+
color(mean, teal); hidden(mean);
|
|
135
|
+
text(cap, (cx, h - 36), ""); size(cap, 20); color(cap, dim); display(cap);
|
|
136
|
+
|
|
137
|
+
// ============================================================================
|
|
138
|
+
// SCRIPT
|
|
139
|
+
// ============================================================================
|
|
140
|
+
|
|
141
|
+
// 1 — HOOK
|
|
142
|
+
say(cap, "an expression that looks like algebra — but it is a length", 0.4);
|
|
143
|
+
wordpop(q, 0.16);
|
|
144
|
+
wait(0.3);
|
|
145
|
+
show(law, 0.5);
|
|
146
|
+
wait(0.6);
|
|
147
|
+
|
|
148
|
+
// 2 — UNIT CIRCLE
|
|
149
|
+
say(cap, "start with the unit circle and an angle θ", 0.4);
|
|
150
|
+
par { show(axX, 0.05); show(axY, 0.05); show(uc, 0.05); show(tline, 0.05); }
|
|
151
|
+
par {
|
|
152
|
+
draw(axX, 0.5); draw(axY, 0.5);
|
|
153
|
+
draw(uc, 1.0);
|
|
154
|
+
}
|
|
155
|
+
par { show(O, 0.3); show(labO, 0.3); }
|
|
156
|
+
draw(tline, 0.5);
|
|
157
|
+
show(A, 0.3); show(labA, 0.3);
|
|
158
|
+
wait(0.3);
|
|
159
|
+
|
|
160
|
+
// 3 — THE ANGLE AND THE RAY
|
|
161
|
+
say(cap, "draw the ray at angle θ — it meets the circle at P", 0.4);
|
|
162
|
+
show(wedge, 0.05); draw(wedge, 0.5); show(labTh, 0.3);
|
|
163
|
+
show(ray, 0.05); draw(ray, 0.7);
|
|
164
|
+
show(P, 0.05); draw(P, 0.35); show(labP, 0.3);
|
|
165
|
+
pulse(P);
|
|
166
|
+
wait(0.4);
|
|
167
|
+
|
|
168
|
+
// 4 — TAN θ IS A LENGTH
|
|
169
|
+
say(cap, "extend to the vertical tangent line — that segment's length IS tan θ", 0.4);
|
|
170
|
+
show(tanseg, 0.05); draw(tanseg, 0.9);
|
|
171
|
+
show(T, 0.05); draw(T, 0.35); show(labT, 0.3);
|
|
172
|
+
flash(tanseg, coral);
|
|
173
|
+
wait(0.7);
|
|
174
|
+
|
|
175
|
+
// 5 — GEOMETRIC MEAN
|
|
176
|
+
say(cap, "now forget the circle — Euclid: √a is the geometric mean of 1 and a", 0.4);
|
|
177
|
+
show(mean, 0.5);
|
|
178
|
+
par {
|
|
179
|
+
show(G0, 0.3); show(G1, 0.3); show(G2, 0.3);
|
|
180
|
+
show(lab0, 0.3); show(lab1, 0.3); show(labA2, 0.3);
|
|
181
|
+
show(base, 0.05);
|
|
182
|
+
}
|
|
183
|
+
draw(base, 0.6);
|
|
184
|
+
wait(0.3);
|
|
185
|
+
|
|
186
|
+
say(cap, "semicircle on diameter 1 + tan θ — then erect a perpendicular at 1", 0.4);
|
|
187
|
+
show(semi, 0.05); draw(semi, 1.2);
|
|
188
|
+
show(alt, 0.05); draw(alt, 0.9);
|
|
189
|
+
show(H, 0.3); show(labH, 0.3);
|
|
190
|
+
flash(alt, violet);
|
|
191
|
+
wait(0.5);
|
|
192
|
+
|
|
193
|
+
say(cap, "by Thales + similar triangles, that height equals √(1 · tan θ)", 0.4);
|
|
194
|
+
show(feed, 0.05); draw(feed, 0.7);
|
|
195
|
+
pulse(H); pulse(T);
|
|
196
|
+
wait(0.8);
|
|
197
|
+
|
|
198
|
+
// 6 — THE IDENTITY
|
|
199
|
+
recolor(cap, violet);
|
|
200
|
+
say(cap, "so the altitude IS √(tan θ) — the symbol was a length all along", 0.4);
|
|
201
|
+
rewrite(law, `\sqrt{\tan\theta}=h`, 0.8, smooth);
|
|
202
|
+
wait(0.9);
|
|
203
|
+
|
|
204
|
+
// 7 — THE CURVE
|
|
205
|
+
recolor(cap, dim);
|
|
206
|
+
say(cap, "every such height, for every θ, paints the curve √(tan x)", 0.4);
|
|
207
|
+
show(ax, 0.5);
|
|
208
|
+
show(curve, 0.05); draw(curve, 2.2);
|
|
209
|
+
wait(0.4);
|
|
210
|
+
say(cap, "teal near zero, coral as tan θ climbs toward the asymptote at π/2", 0.4);
|
|
211
|
+
flash(curve, violet);
|
|
212
|
+
wait(0.8);
|
|
213
|
+
|
|
214
|
+
// 8 — POINT
|
|
215
|
+
recolor(cap, teal);
|
|
216
|
+
say(cap, "√(tan θ) is not a formula to memorize — it is a geometric construction", 0.4);
|
|
217
|
+
wait(1.6);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// ssl-handshake-sdf — a TLS 1.3 handshake rendered as a raymarched SDF scene.
|
|
2
|
+
// Four scene parameters are the "reactive shader variables"; the timeline
|
|
3
|
+
// replays the handshake by driving them, and the SDF reads them by name:
|
|
4
|
+
// ent - cryptographic entropy -> surface displacement (the boil)
|
|
5
|
+
// mrg - x25519 key agreement -> the two endpoint solids smin-FUSE
|
|
6
|
+
// grw - HKDF key-schedule -> a key TREE grows from the shared secret
|
|
7
|
+
// tun - the encrypted channel -> rep()-tiled cipher rings, an endless tunnel
|
|
8
|
+
// Honesty note: manic is a pure function of t - no live sockets. This is a
|
|
9
|
+
// deterministic replay of one captured handshake; the hex in the transcript is
|
|
10
|
+
// that capture, not live traffic. The marcher is fully GPU-transpilable (scalar
|
|
11
|
+
// SDF, no vec lets), so it previews and records smoothly.
|
|
12
|
+
title("The Handshake, Made Visible");
|
|
13
|
+
canvas("16:9");
|
|
14
|
+
template("black");
|
|
15
|
+
|
|
16
|
+
// ---------- HUD ----------
|
|
17
|
+
text(head, (cx, 60), "The Handshake, Made Visible"); display(head); cursor(head);
|
|
18
|
+
text(cap, (cx, h - 42), ""); size(cap, 26);
|
|
19
|
+
equation(eqk, (cx, 170), `(g^{a})^{b} \;=\; (g^{b})^{a}`, 36); hidden(eqk);
|
|
20
|
+
|
|
21
|
+
// the transcript, typed line by line (terminal-green, top left)
|
|
22
|
+
text(tl1, (330, 150), "ClientHello random: 9f3a c241 77d0 8e5b"); size(tl1, 24); color(tl1, lime); cursor(tl1); hidden(tl1);
|
|
23
|
+
text(tl2, (330, 190), "ServerHello random: 4be7 01cc a913 f2d6"); size(tl2, 24); color(tl2, lime); cursor(tl2); hidden(tl2);
|
|
24
|
+
text(tl3, (330, 230), "KeyShare x25519: e5a2 39f8 1b44 c07e"); size(tl3, 24); color(tl3, lime); cursor(tl3); hidden(tl3);
|
|
25
|
+
text(tl4, (330, 270), "HKDF-Expand client + server traffic keys"); size(tl4, 24); color(tl4, lime); cursor(tl4); hidden(tl4);
|
|
26
|
+
text(tl5, (330, 310), "Finished cipher: CHACHA20-POLY1305"); size(tl5, 24); color(tl5, lime); cursor(tl5); hidden(tl5);
|
|
27
|
+
|
|
28
|
+
// entropy readouts (the visible reactive variable + a bit counter)
|
|
29
|
+
counter(bits, (w - 185, 118), 0, 0, "entropy bits ", ""); color(bits, gold); hidden(bits);
|
|
30
|
+
parameter(ent, (w - 180, 168), 0.02, 0, 1, "entropy", 2);
|
|
31
|
+
parameter(mrg, (w - 180, 238), 0, 0, 1, "key-mix", 2); hidden(mrg);
|
|
32
|
+
parameter(grw, (w - 180, 308), 0, 0, 1, "hkdf", 2); hidden(grw);
|
|
33
|
+
parameter(tun, (w - 180, 378), 0, 0, 1, "tunnel", 2); hidden(tun);
|
|
34
|
+
|
|
35
|
+
// ---------- the scene ----------
|
|
36
|
+
camera3((4.5, -5.5, 3.4), (0, 0, 1.1), 44);
|
|
37
|
+
|
|
38
|
+
raymarch(hs) {
|
|
39
|
+
// entropy boils every surface: high-frequency displacement scaled by `ent`
|
|
40
|
+
let wob = ent * 0.13 * sin(6*x + 2*t) * sin(6*y + 1.7*t) * sin(6*z + 1.3*t);
|
|
41
|
+
// the two endpoints: browser (sphere) and server (octahedron), pulled
|
|
42
|
+
// together as the key-mix parameter rises
|
|
43
|
+
let ox = 1.25 - 0.95*mrg;
|
|
44
|
+
let c = sdsphere(x + ox, y, z - 0.85, 0.55) + wob;
|
|
45
|
+
let s = sdoctahedron(x - ox, y, z - 0.85, 0.62) + wob;
|
|
46
|
+
let duo = smin(c, s, 0.12 + 0.55*mrg);
|
|
47
|
+
// the HKDF key tree: trunk + branches, growing out of the fused secret as `grw`
|
|
48
|
+
// rises. Branch tilts are SCALAR component rotations (not vec2/rot2) so the whole
|
|
49
|
+
// marcher transpiles to GLSL and runs on the GPU instead of the heavy CPU fallback.
|
|
50
|
+
// rot(a,b,θ) = (a·cosθ − b·sinθ, a·sinθ + b·cosθ)
|
|
51
|
+
let zt = z - 0.85;
|
|
52
|
+
let tr = sdcapsule(x, y, zt, 1.05*grw, 0.12);
|
|
53
|
+
let za = zt - 1.0*grw; let ca = cos(0.65); let sa = sin(0.65);
|
|
54
|
+
let zb = zt - 1.55*grw; let cb = cos(0.8); let sb = sin(0.8);
|
|
55
|
+
let b1 = sdcapsule(x*ca - za*sa, y, x*sa + za*ca, 0.7*grw, 0.085);
|
|
56
|
+
let b2 = sdcapsule(x*ca + za*sa, y, 0 - x*sa + za*ca, 0.7*grw, 0.085);
|
|
57
|
+
let b3 = sdcapsule(x, y*cb - zb*sb, y*sb + zb*cb, 0.5*grw, 0.06);
|
|
58
|
+
let b4 = sdcapsule(x, y*cb + zb*sb, 0 - y*sb + zb*cb, 0.5*grw, 0.06);
|
|
59
|
+
let tree0 = smin(smin(tr, smin(b1, b2, 0.1), 0.12), smin(b3, b4, 0.1), 0.12);
|
|
60
|
+
let tree = tree0 + 0.6*wob + (1 - smoothstep(0.02, 0.12, grw))*9;
|
|
61
|
+
// the encrypted tunnel: an endless procession of cipher rings along y
|
|
62
|
+
let ry = rep(y, 1.05);
|
|
63
|
+
let ring = sdtorus(x, z - 0.85, ry, 0.8, 0.05 + 0.03*sin(3*t + y)) + (1 - smoothstep(0.02, 0.2, tun))*9;
|
|
64
|
+
let d = smin(smin(duo, tree, 0.14), ring, 0.1);
|
|
65
|
+
// colour: cool protocol teal, warmed and destabilized by entropy
|
|
66
|
+
let hue = 165 + 55*nz + 30*sin(2*hz + 0.5*t) + 50*ent;
|
|
67
|
+
let sat = 0.7;
|
|
68
|
+
let val = 0.85 + 0.15*nz;
|
|
69
|
+
let alpha = 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ================= timeline: the handshake, message by message ==============
|
|
73
|
+
type(head, 1.1);
|
|
74
|
+
say(cap, "a TLS 1.3 handshake - captured once, replayed as geometry", 0.6);
|
|
75
|
+
wait(0.8);
|
|
76
|
+
say(cap, "two strangers: your browser, and a server it has never met", 0.5);
|
|
77
|
+
wait(1.4);
|
|
78
|
+
|
|
79
|
+
// ---- ClientHello: 32 bytes of randomness leave home
|
|
80
|
+
cue(tick);
|
|
81
|
+
show(tl1, 0.1); type(tl1, 1.0);
|
|
82
|
+
show(bits, 0.3);
|
|
83
|
+
say(cap, "ClientHello: 32 bytes of pure randomness leave home - the surface begins to boil", 0.5);
|
|
84
|
+
par { to(ent, value, 0.55, 1.6, smooth); to(bits, value, 256, 1.6); orbit3(-35, 20, 7.4, 1.6, smooth); }
|
|
85
|
+
wait(0.8);
|
|
86
|
+
|
|
87
|
+
// ---- ServerHello: chaos answers chaos
|
|
88
|
+
cue(tick);
|
|
89
|
+
show(tl2, 0.1); type(tl2, 1.0);
|
|
90
|
+
say(cap, "ServerHello: the server answers with chaos of its own", 0.5);
|
|
91
|
+
par { to(ent, value, 0.85, 1.4, smooth); to(bits, value, 512, 1.4); }
|
|
92
|
+
wait(0.8);
|
|
93
|
+
|
|
94
|
+
// ---- x25519: the fusion - a secret neither of them ever sent
|
|
95
|
+
cue(whoosh);
|
|
96
|
+
show(tl3, 0.1); type(tl3, 1.0);
|
|
97
|
+
show(eqk, 0.6);
|
|
98
|
+
say(cap, "x25519: the shapes fuse into a secret that NEITHER side ever transmitted", 0.5);
|
|
99
|
+
par { to(mrg, value, 1, 2.4, smooth); orbit3(15, 24, 6.8, 2.4, smooth); }
|
|
100
|
+
wait(0.9);
|
|
101
|
+
|
|
102
|
+
// ---- HKDF: the key tree
|
|
103
|
+
cue(pop);
|
|
104
|
+
show(tl4, 0.1); type(tl4, 1.0);
|
|
105
|
+
say(cap, "HKDF: one shared secret sprouts a whole tree of session keys", 0.5);
|
|
106
|
+
par { to(grw, value, 1, 2.6, smooth); orbit3(60, 26, 6.6, 2.6, smooth); }
|
|
107
|
+
wait(0.9);
|
|
108
|
+
|
|
109
|
+
// ---- Finished: the tunnel opens
|
|
110
|
+
cue(chime);
|
|
111
|
+
show(tl5, 0.1); type(tl5, 1.0);
|
|
112
|
+
say(cap, "Finished: from here on, every byte travels dressed in noise", 0.5);
|
|
113
|
+
par { to(tun, value, 1, 2.2, smooth); to(ent, value, 1, 2.2, smooth); orbit3(110, 18, 7.2, 4.5, smooth); }
|
|
114
|
+
disintegrate(eqk, 0.8);
|
|
115
|
+
say(cap, "the invisible negotiation, rendered visible", 0.6);
|
|
116
|
+
wait(2.5);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Stack & Queue — dynamic structures, with carets marking WHERE each op acts.
|
|
2
|
+
// `push`/`pop` (stack, LIFO, grows up) and `enqueue`/`dequeue` (queue, FIFO,
|
|
3
|
+
// grows right) are mutating verbs: they add a cell and animate it in, tracking
|
|
4
|
+
// occupancy so a chain of ops composes. A `caret` marks the action point and is
|
|
5
|
+
// `move`d in step with each op so it rides the changing top / back.
|
|
6
|
+
//
|
|
7
|
+
// manic examples/stack_queue.manic
|
|
8
|
+
|
|
9
|
+
title("Stack & Queue");
|
|
10
|
+
canvas("16:9");
|
|
11
|
+
|
|
12
|
+
let sx = 300; let sy = 500; // stack anchor (bottom cell centre)
|
|
13
|
+
let qx = 780; let qy = 300; // queue anchor (front cell centre)
|
|
14
|
+
let cw = 84; let ch = 64; // cell size
|
|
15
|
+
let stx = sx + 62; // stack "top" caret sits right of the column
|
|
16
|
+
|
|
17
|
+
text(head, (cx, 80), "LIFO stack, FIFO queue");
|
|
18
|
+
display(head); color(head, cyan); size(head, 28); hidden(head);
|
|
19
|
+
text(cap, (cx, 660), ""); color(cap, dim); size(cap, 24);
|
|
20
|
+
|
|
21
|
+
text(sl, (sx, sy + 66), "stack: push / pop"); color(sl, lime); size(sl, 22);
|
|
22
|
+
text(ql, (qx + cw, qy - 118), "queue: enqueue / dequeue"); color(ql, cyan); size(ql, 22);
|
|
23
|
+
|
|
24
|
+
stack(st, (sx, sy), cw, ch);
|
|
25
|
+
queue(qu, (qx, qy), cw, ch);
|
|
26
|
+
|
|
27
|
+
// action-point markers
|
|
28
|
+
caret(top, (stx, sy), "top", left); // rides the top of the stack
|
|
29
|
+
caret(front, (qx, qy - 52), "front", down); // fixed: dequeue leaves here
|
|
30
|
+
caret(back, (qx, qy + 52), "back", up); // rides the back of the queue
|
|
31
|
+
|
|
32
|
+
show(head, 0.5);
|
|
33
|
+
|
|
34
|
+
section("Stack");
|
|
35
|
+
say(cap, "push 5, 3, 8 — each lands on top, the top caret rises");
|
|
36
|
+
push(st, "5");
|
|
37
|
+
par { push(st, "3"); move(top, (stx, sy - ch)); }
|
|
38
|
+
par { push(st, "8"); move(top, (stx, sy - 2*ch)); }
|
|
39
|
+
say(cap, "pop — the top value (8) leaves, the caret drops back");
|
|
40
|
+
par { pop(st); move(top, (stx, sy - ch)); }
|
|
41
|
+
wait(0.5);
|
|
42
|
+
|
|
43
|
+
section("Queue");
|
|
44
|
+
say(cap, "enqueue A, B, C — they join at the back caret");
|
|
45
|
+
enqueue(qu, "A");
|
|
46
|
+
par { enqueue(qu, "B"); move(back, (qx + cw, qy + 52)); }
|
|
47
|
+
par { enqueue(qu, "C"); move(back, (qx + 2*cw, qy + 52)); }
|
|
48
|
+
say(cap, "dequeue — the front leaves, the rest advance, back shifts in");
|
|
49
|
+
par { dequeue(qu); move(back, (qx + cw, qy + 52)); }
|
|
50
|
+
par { dequeue(qu); move(back, (qx, qy + 52)); }
|
|
51
|
+
|
|
52
|
+
say(cap, "stack: in and out at the top. queue: in at back, out at front.");
|
|
53
|
+
wait(1.2);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// statistics.manic — Statistics, from data to the bell (a lesson)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// The stats-rung capstone, companion to linear-algebra.manic. Three chapters on
|
|
5
|
+
// one stage, chaptered with section():
|
|
6
|
+
// 1. DESCRIBE — any dataset has a shape, a centre, a spread (histogram)
|
|
7
|
+
// 2. THE BELL — measurements often pile into a normal curve (bellcurve)
|
|
8
|
+
// 3. WHY (CLT) — averages of anything become a bell (clt)
|
|
9
|
+
//
|
|
10
|
+
// Each chapter reveals its whole builtin with `untraced(tag)` → `draw(tag)`
|
|
11
|
+
// (preserving faint band opacities) and clears with `fade(tag)`.
|
|
12
|
+
// ============================================================================
|
|
13
|
+
|
|
14
|
+
title("Statistics: from data to the bell");
|
|
15
|
+
canvas("16:9");
|
|
16
|
+
|
|
17
|
+
let sy = cy + 30;
|
|
18
|
+
|
|
19
|
+
// 1. a real dataset (exam scores, already roughly bell-shaped)
|
|
20
|
+
histogram(hg, (cx, sy),
|
|
21
|
+
"68 72 75 71 74 77 73 70 76 72 74 78 71 73 75 69 74 72 76 73 71 75 70 74 72 73 74 71 75 73", 12, 620, 230);
|
|
22
|
+
untraced(hg);
|
|
23
|
+
// 2. the idealised normal curve
|
|
24
|
+
bellcurve(bc, (cx, sy - 24), 100, 15, 78);
|
|
25
|
+
untraced(bc);
|
|
26
|
+
// 3. why the bell is everywhere — the Central Limit Theorem
|
|
27
|
+
clt(ct, (cx, sy), 5, 1000, 7, 620, 250);
|
|
28
|
+
untraced(ct);
|
|
29
|
+
|
|
30
|
+
text(cap, (cx, h - 44), ""); size(cap, 22); color(cap, dim); display(cap);
|
|
31
|
+
|
|
32
|
+
// ---- 1. describe ----
|
|
33
|
+
section("Describe the data");
|
|
34
|
+
draw(hg, 1.3);
|
|
35
|
+
say(cap, "any dataset has a shape, a centre, and a spread", 0.5);
|
|
36
|
+
wait(1.8);
|
|
37
|
+
say(cap, "these exam scores cluster around the middle, tailing off either side", 0.5);
|
|
38
|
+
wait(2.0);
|
|
39
|
+
fade(hg, 0.6);
|
|
40
|
+
wait(0.3);
|
|
41
|
+
|
|
42
|
+
// ---- 2. the bell ----
|
|
43
|
+
say(cap, "", 0.2);
|
|
44
|
+
section("The normal curve");
|
|
45
|
+
draw(bc, 1.3);
|
|
46
|
+
say(cap, "so many measurements pile into the same bell — the normal distribution", 0.5);
|
|
47
|
+
wait(2.0);
|
|
48
|
+
say(cap, "68% within one standard deviation, 95% within two, 99.7% within three", 0.5);
|
|
49
|
+
wait(2.2);
|
|
50
|
+
fade(bc, 0.6);
|
|
51
|
+
wait(0.3);
|
|
52
|
+
|
|
53
|
+
// ---- 3. why ----
|
|
54
|
+
say(cap, "", 0.2);
|
|
55
|
+
section("Why? The Central Limit Theorem");
|
|
56
|
+
draw(ct, 1.4);
|
|
57
|
+
say(cap, "average five dice, a thousand times — however flat one die is…", 0.5);
|
|
58
|
+
wait(2.0);
|
|
59
|
+
say(cap, "…the averages form a bell. THAT is why the normal is everywhere", 0.5);
|
|
60
|
+
wait(2.4);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
title("An Asset Becomes a Story");
|
|
2
|
+
canvas("9:16");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
watermark(mark, (w*0.16, h*0.055), "Made With Manic");
|
|
6
|
+
text(kicker, (cx, h*0.085), "ENGINE FOUNDATION · ASSETS, LABELS & CUES");
|
|
7
|
+
text(headline, (cx, h*0.15), "An imported object should still be explainable");
|
|
8
|
+
text(caption, (cx, h*0.82), "Groups become addressable parts—then motion, notation, sound, and effects compose normally.");
|
|
9
|
+
size(kicker,18); color(kicker,dim); bold(kicker); hidden(kicker);
|
|
10
|
+
size(headline,34); bold(headline); wrap(headline,w*0.84); hidden(headline);
|
|
11
|
+
size(caption,21); color(caption,dim); wrap(caption,w*0.82); hidden(caption);
|
|
12
|
+
|
|
13
|
+
camera3((16,-22,15),(0,0,0),46);
|
|
14
|
+
assembly3(console,"asset:models/manic-console.obj",(0,0,0),1.35);
|
|
15
|
+
color(console.base,dim);
|
|
16
|
+
color(console.screen,cyan);
|
|
17
|
+
color(console.key,magenta);
|
|
18
|
+
text(screenNote,(0,0),"world-sized display");
|
|
19
|
+
text(keyNote,(0,0),"addressable input");
|
|
20
|
+
size(screenNote,22); color(screenNote,cyan); hidden(screenNote);
|
|
21
|
+
size(keyNote,22); color(keyNote,magenta); hidden(keyNote);
|
|
22
|
+
label3(screenNote,console.screen,0.82);
|
|
23
|
+
label3(keyNote,console.key,0.82);
|
|
24
|
+
hidden(console);
|
|
25
|
+
|
|
26
|
+
circle(effectBox,(cx,h*0.70),72);
|
|
27
|
+
particles(sparks,effectBox,34,4,19);
|
|
28
|
+
color(sparks,gold);
|
|
29
|
+
hidden(effectBox); hidden(sparks);
|
|
30
|
+
|
|
31
|
+
step("import") {
|
|
32
|
+
show(kicker,0.35);
|
|
33
|
+
show(headline,0.45);
|
|
34
|
+
show(caption,0.40);
|
|
35
|
+
show(console,0.75);
|
|
36
|
+
cue(whoosh);
|
|
37
|
+
}
|
|
38
|
+
wait(0.35);
|
|
39
|
+
|
|
40
|
+
step("address-the-parts") {
|
|
41
|
+
seq {
|
|
42
|
+
show(screenNote,0.35);
|
|
43
|
+
pulse(console.screen,0.65);
|
|
44
|
+
fade(screenNote,0.25);
|
|
45
|
+
show(keyNote,0.35);
|
|
46
|
+
pulse(console.key,0.65);
|
|
47
|
+
}
|
|
48
|
+
say(caption,"OBJ groups arrive as console.base, console.screen, and console.key.",0.42);
|
|
49
|
+
cue(tick);
|
|
50
|
+
}
|
|
51
|
+
wait(0.35);
|
|
52
|
+
|
|
53
|
+
step("compose-the-explanation") {
|
|
54
|
+
par {
|
|
55
|
+
turn3(console,(0,0,0),z,22,1.4,smooth);
|
|
56
|
+
orbit3(30,28,30,1.4,smooth);
|
|
57
|
+
say(caption,"Depth-scaled labels remain crisp while the grouped asset moves.",0.40);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
wait(0.30);
|
|
61
|
+
|
|
62
|
+
step("finish-with-a-beat") {
|
|
63
|
+
show(sparks,0.15);
|
|
64
|
+
par {
|
|
65
|
+
burst(sparks,0.9);
|
|
66
|
+
pulse(console.key,0.65);
|
|
67
|
+
say(caption,"A reusable cue and the existing generic burst add the final editorial beat.",0.40);
|
|
68
|
+
}
|
|
69
|
+
cue(pop);
|
|
70
|
+
}
|
|
71
|
+
wait(1.2);
|