@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,117 @@
|
|
|
1
|
+
// Engine Test 7 — a 3D Hilbert curve refines from 7 to 32,767 segments.
|
|
2
|
+
// One generated path keeps its identity while become3, draw, and orbit3 tell
|
|
3
|
+
// the story. The curve is exact: each order visits every lattice cell once.
|
|
4
|
+
|
|
5
|
+
title("Hilbert Curve in 3D");
|
|
6
|
+
canvas("16:9");
|
|
7
|
+
template("black");
|
|
8
|
+
|
|
9
|
+
creator(me,"@anish2good name=Manic_Math tagline=Space_filling_curves_made_visible yt=zarigatongy x=@anish2good web=8gwifi.org/manic accent=magenta secondary=cyan footer=compact cta=Animate_the_infinite safe=clean");
|
|
10
|
+
watermark(mark,(105,52),"Made With Manic");
|
|
11
|
+
endcard(me,"title=Make_Fractals_Move cta=Create_with_Manic");
|
|
12
|
+
|
|
13
|
+
text(kicker,(cx,46),"HILBERT CURVE IN 3D");
|
|
14
|
+
text(head,(cx,86),"How can one line fill a cube?");
|
|
15
|
+
text(caption,(cx,626),"Begin with one continuous route through all eight octants.");
|
|
16
|
+
text(orderLabel,(cx,668),"ORDER 1 · 7 SEGMENTS");
|
|
17
|
+
size(kicker,20); bold(kicker); color(kicker,magenta);
|
|
18
|
+
size(head,34); bold(head);
|
|
19
|
+
size(caption,21); color(caption,dim);
|
|
20
|
+
size(orderLabel,19); bold(orderLabel);
|
|
21
|
+
|
|
22
|
+
camera3((13,-15,11),(0,0,0),42);
|
|
23
|
+
|
|
24
|
+
// A quiet wireframe establishes the volume before the curve enters it.
|
|
25
|
+
line3(e0,(-3,-3,-3),(3,-3,-3)); line3(e1,(3,-3,-3),(3,3,-3));
|
|
26
|
+
line3(e2,(3,3,-3),(-3,3,-3)); line3(e3,(-3,3,-3),(-3,-3,-3));
|
|
27
|
+
line3(e4,(-3,-3,3),(3,-3,3)); line3(e5,(3,-3,3),(3,3,3));
|
|
28
|
+
line3(e6,(3,3,3),(-3,3,3)); line3(e7,(-3,3,3),(-3,-3,3));
|
|
29
|
+
line3(e8,(-3,-3,-3),(-3,-3,3)); line3(e9,(3,-3,-3),(3,-3,3));
|
|
30
|
+
line3(e10,(3,3,-3),(3,3,3)); line3(e11,(-3,3,-3),(-3,3,3));
|
|
31
|
+
tag(e0,bounds); tag(e1,bounds); tag(e2,bounds); tag(e3,bounds);
|
|
32
|
+
tag(e4,bounds); tag(e5,bounds); tag(e6,bounds); tag(e7,bounds);
|
|
33
|
+
tag(e8,bounds); tag(e9,bounds); tag(e10,bounds); tag(e11,bounds);
|
|
34
|
+
color(bounds,dim); opacity(bounds,0.34); thick(bounds,0.012);
|
|
35
|
+
hidden(bounds); untraced(bounds);
|
|
36
|
+
|
|
37
|
+
// The five exact refinements. Hidden curves are blueprints for become3.
|
|
38
|
+
hilbert3(curve,(0,0,0),5.65,1);
|
|
39
|
+
hilbert3(order2,(0,0,0),5.65,2);
|
|
40
|
+
hilbert3(order3,(0,0,0),5.65,3);
|
|
41
|
+
hilbert3(order4,(0,0,0),5.65,4);
|
|
42
|
+
hilbert3(order5,(0,0,0),5.65,5);
|
|
43
|
+
hidden(curve); untraced(curve);
|
|
44
|
+
hidden(order2); hidden(order3); hidden(order4); hidden(order5);
|
|
45
|
+
|
|
46
|
+
hidden(kicker); hidden(head); hidden(caption); hidden(orderLabel);
|
|
47
|
+
|
|
48
|
+
step("pose the question") {
|
|
49
|
+
par {
|
|
50
|
+
show(kicker,0.30);
|
|
51
|
+
show(head,0.45);
|
|
52
|
+
show(caption,0.40);
|
|
53
|
+
show(orderLabel,0.35);
|
|
54
|
+
show(bounds,0.35);
|
|
55
|
+
draw(bounds,1.25,smooth);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
wait(0.45);
|
|
59
|
+
|
|
60
|
+
step("visit the eight octants") {
|
|
61
|
+
par {
|
|
62
|
+
show(curve,0.30);
|
|
63
|
+
draw(curve,1.65,smooth);
|
|
64
|
+
orbit3(54,25,16.2,1.65,smooth);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
wait(0.45);
|
|
68
|
+
|
|
69
|
+
step("refine the route") {
|
|
70
|
+
par {
|
|
71
|
+
seq {
|
|
72
|
+
par {
|
|
73
|
+
become3(curve,order2,1.30,smooth);
|
|
74
|
+
say(orderLabel,"ORDER 2 · 63 SEGMENTS",0.35,smooth);
|
|
75
|
+
say(caption,"Replace every visit with a smaller, rotated copy—without breaking the line.",0.45,smooth);
|
|
76
|
+
}
|
|
77
|
+
wait(0.35);
|
|
78
|
+
par {
|
|
79
|
+
become3(curve,order3,1.55,smooth);
|
|
80
|
+
say(orderLabel,"ORDER 3 · 511 SEGMENTS",0.35,smooth);
|
|
81
|
+
say(caption,"The gaps shrink while continuity survives every refinement.",0.45,smooth);
|
|
82
|
+
}
|
|
83
|
+
wait(0.35);
|
|
84
|
+
par {
|
|
85
|
+
become3(curve,order4,1.90,smooth);
|
|
86
|
+
say(orderLabel,"ORDER 4 · 4,095 SEGMENTS",0.35,smooth);
|
|
87
|
+
say(caption,"One path now threads through thousands of cells in the cube.",0.45,smooth);
|
|
88
|
+
}
|
|
89
|
+
wait(0.35);
|
|
90
|
+
par {
|
|
91
|
+
become3(curve,order5,2.40,smooth);
|
|
92
|
+
say(orderLabel,"ORDER 5 · 32,767 SEGMENTS",0.35,smooth);
|
|
93
|
+
say(caption,"In the limit, the continuous curve reaches every point in the volume.",0.50,smooth);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
orbit3(186,31,17.8,8.55,linear);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
wait(0.80);
|
|
100
|
+
|
|
101
|
+
step("takeaway") {
|
|
102
|
+
par {
|
|
103
|
+
pulse(curve,0.80);
|
|
104
|
+
say(head,"A one-dimensional path can fill 3D space.",0.50,smooth);
|
|
105
|
+
say(caption,"Refinement adds detail—not disconnected pieces.",0.45,smooth);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
wait(1.35);
|
|
109
|
+
|
|
110
|
+
step("cta") {
|
|
111
|
+
par {
|
|
112
|
+
fade(kicker,0.30); fade(head,0.30); fade(caption,0.30);
|
|
113
|
+
fade(orderLabel,0.30); fade(bounds,0.40); fade(curve,0.45);
|
|
114
|
+
show(me.endcard,0.60);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
wait(2.00);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Uphill / Downhill — a rate x time = distance word problem.
|
|
2
|
+
// "Up a hill at 4 mph, back down the same path at 6 mph, round trip = 1 hour.
|
|
3
|
+
// Total distance?" Answer: one-way d = 2.4 mi, round trip = 4.8 mi.
|
|
4
|
+
//
|
|
5
|
+
// The distance is SOLVED in-language: d = 1 / (1/4 + 1/6) = 2.4, total = 2d.
|
|
6
|
+
// The runner climbs slowly, descends faster (3s vs 2s ~ the real 0.6h : 0.4h),
|
|
7
|
+
// then the equation is derived and the answer counts up on a live readout.
|
|
8
|
+
//
|
|
9
|
+
// manic examples/hill_run.manic
|
|
10
|
+
// manic examples/hill_run.manic --record out --fps 60
|
|
11
|
+
|
|
12
|
+
title("Uphill / Downhill");
|
|
13
|
+
canvas("16:9");
|
|
14
|
+
|
|
15
|
+
// --- the numbers, computed the same way you'd reason it out ---
|
|
16
|
+
let up = 4; // mph, uphill
|
|
17
|
+
let down = 6; // mph, downhill
|
|
18
|
+
let d = 1 / (1/up + 1/down); // one-way distance = 2.4 mi (from d/4 + d/6 = 1)
|
|
19
|
+
let total = 2 * d; // round trip = 4.8 mi
|
|
20
|
+
|
|
21
|
+
text(head, (cx, 84), "up at 4 mph, down at 6 mph -- round trip takes 1 hour");
|
|
22
|
+
display(head); color(head, cyan); size(head, 24); hidden(head);
|
|
23
|
+
text(cap, (cx, 668), ""); color(cap, dim); size(cap, 23);
|
|
24
|
+
|
|
25
|
+
// --- the hill (a single path, run up then down) ---
|
|
26
|
+
line(ground, (150, 560), (700, 560)); color(ground, dim); stroke(ground, 2); untraced(ground);
|
|
27
|
+
line(path, (200, 560), (620, 210)); color(path, cyan); stroke(path, 4); untraced(path);
|
|
28
|
+
text(flag, (628, 196), "top"); color(flag, dim); size(flag, 18); hidden(flag);
|
|
29
|
+
dot(runner, (200, 560), 16); color(runner, lime); glow(runner, 1.7); hidden(runner);
|
|
30
|
+
|
|
31
|
+
text(uplbl, (300, 470), "4 mph"); color(uplbl, cyan); size(uplbl, 24); hidden(uplbl);
|
|
32
|
+
text(downlbl, (520, 320), "6 mph"); color(downlbl, magenta); size(downlbl, 24); hidden(downlbl);
|
|
33
|
+
|
|
34
|
+
// --- the derivation, on the right ---
|
|
35
|
+
text(e1, (960, 230), "time = distance / rate"); color(e1, dim); size(e1, 22); hidden(e1);
|
|
36
|
+
text(e2, (960, 300), "d/4 + d/6 = 1"); display(e2); color(e2, fg); size(e2, 30); hidden(e2);
|
|
37
|
+
text(e3, (960, 360), "5d/12 = 1 -> d = 2.4"); display(e3); color(e3, cyan); size(e3, 26); hidden(e3);
|
|
38
|
+
counter(ans, (960, 450), 0, 1, "round trip = 2d = ", " mi"); display(ans); color(ans, lime); size(ans, 30); hidden(ans);
|
|
39
|
+
|
|
40
|
+
// --- script ---
|
|
41
|
+
show(head, 0.5);
|
|
42
|
+
say(cap, "an athlete runs up a hill, then back down the same path");
|
|
43
|
+
par { draw(ground, 0.5); draw(path, 0.7); }
|
|
44
|
+
par { show(flag, 0.3); show(runner, 0.3); }
|
|
45
|
+
wait(0.3);
|
|
46
|
+
|
|
47
|
+
section("Up the hill");
|
|
48
|
+
say(cap, "uphill at 4 mph -- the slow leg");
|
|
49
|
+
show(uplbl, 0.3);
|
|
50
|
+
move(runner, (620, 210), 3.0, linear);
|
|
51
|
+
|
|
52
|
+
section("Back down");
|
|
53
|
+
say(cap, "downhill at 6 mph -- faster, so less time");
|
|
54
|
+
show(downlbl, 0.3);
|
|
55
|
+
move(runner, (200, 560), 2.0, linear);
|
|
56
|
+
wait(0.3);
|
|
57
|
+
|
|
58
|
+
section("Set up the equation");
|
|
59
|
+
say(cap, "let d = the one-way distance; time = distance / rate");
|
|
60
|
+
show(e1, 0.4);
|
|
61
|
+
show(e2, 0.4);
|
|
62
|
+
say(cap, "combine the fractions: 5d/12 = 1, so d = 2.4 miles");
|
|
63
|
+
show(e3, 0.5);
|
|
64
|
+
flash(e3, lime);
|
|
65
|
+
|
|
66
|
+
section("Total distance");
|
|
67
|
+
say(cap, "the round trip is 2d");
|
|
68
|
+
show(ans, 0.3);
|
|
69
|
+
to(ans, value, total, 1.4);
|
|
70
|
+
pulse(ans);
|
|
71
|
+
wait(1.6);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// histogram.manic — the shape of a dataset (stats Tier 1)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// `histogram(id, (cx,cy), "v1 v2 v3 ...", [bins], [width], [height], [color])`
|
|
5
|
+
// bins a list of numbers into bars — the SHAPE of the data. Bars are
|
|
6
|
+
// `{id}.bar{k}` (tagged `{id}.bars`) so they stagger in and recolour as a
|
|
7
|
+
// group; `{id}.meanline` + `{id}.mean` mark the mean, `{id}.min`/`{id}.max`
|
|
8
|
+
// label the range. Default bin count ≈ √n.
|
|
9
|
+
//
|
|
10
|
+
// TO ADAPT: paste your own numbers into the data string (grades, prices,
|
|
11
|
+
// heights, times…). More `bins` = finer shape; fewer = smoother. Pass a colour
|
|
12
|
+
// as the last argument, or `rainbow` to give every bar its own hue (below).
|
|
13
|
+
// ============================================================================
|
|
14
|
+
|
|
15
|
+
title("The shape of a dataset");
|
|
16
|
+
canvas("16:9");
|
|
17
|
+
|
|
18
|
+
let n = 14;
|
|
19
|
+
|
|
20
|
+
text(hdr, (cx, 60), "35 exam scores — where do they cluster?");
|
|
21
|
+
size(hdr, 24); color(hdr, cyan); bold(hdr); display(hdr);
|
|
22
|
+
|
|
23
|
+
// `rainbow` colours each bar across the spectrum — no loop needed
|
|
24
|
+
histogram(hg, (cx, cy + 10),
|
|
25
|
+
"72 85 90 68 95 88 76 91 83 79 84 60 97 81 78 86 74 89 82 93 71 87 80 77 92 85 83 88 75 90 66 82 84 79 88",
|
|
26
|
+
n, 640, 300, rainbow);
|
|
27
|
+
untraced(hg.bars); // bars sketch in one at a time
|
|
28
|
+
hidden(hg.meanline); hidden(hg.mean);
|
|
29
|
+
|
|
30
|
+
text(cap, (cx, h - 46), ""); size(cap, 22); color(cap, dim); display(cap);
|
|
31
|
+
|
|
32
|
+
// ---- bars build up, left to right ----
|
|
33
|
+
say(cap, "each bar counts how many scores fall in that range", 0.5);
|
|
34
|
+
stagger(0.06) { for k in 0..n { draw(hg.bar{k}, 0.35); } }
|
|
35
|
+
wait(1.0);
|
|
36
|
+
say(cap, "the shape emerges: most scores cluster in the 80s, tailing off below", 0.5);
|
|
37
|
+
wait(1.6);
|
|
38
|
+
|
|
39
|
+
// ---- reveal the mean ----
|
|
40
|
+
say(cap, "and the average sits right in the thick of it", 0.5);
|
|
41
|
+
show(hg.meanline, 0.5); show(hg.mean, 0.4);
|
|
42
|
+
pulse(hg.mean);
|
|
43
|
+
wait(1.8);
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
title("A Hotdog Is a Taco");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("black");
|
|
4
|
+
|
|
5
|
+
// ================= HUD =================
|
|
6
|
+
text(head, (cx, 60), "A Hotdog Is a Taco"); display(head); cursor(head);
|
|
7
|
+
caption(sub, "a rigorous proof, with condiments", (cx, 104), 24, dim); hidden(sub);
|
|
8
|
+
text(a1, (cx, 148), "Rule of the game: it's all rubber"); size(a1, 28); color(a1, cyan); hidden(a1);
|
|
9
|
+
text(a2, (cx, 148), "The deformation"); size(a2, 28); color(a2, gold); hidden(a2);
|
|
10
|
+
text(a3, (cx, 148), "The counterexample: the bagel"); size(a3, 28); color(a3, violet); hidden(a3);
|
|
11
|
+
text(cap, (cx, h - 42), ""); size(cap, 26);
|
|
12
|
+
|
|
13
|
+
// THE claim, stated up front - it earns its QED square at the end
|
|
14
|
+
equation(eqT, (cx, 200), `\textbf{Theorem.}\;\;\text{hotdog} \;\cong\; \text{taco}`, 42); hidden(eqT); z(eqT, 10);
|
|
15
|
+
|
|
16
|
+
// textbook callouts: the DEFINITION (act 1) and the INVARIANT (coda) that make
|
|
17
|
+
// the proof rigorous, not just tasty
|
|
18
|
+
equation(eqHomeo, (cx, 285), `\text{taco}\;\cong\;\text{hotdog}\ \Longleftrightarrow\ \exists\,f,\ f^{-1}\ \text{continuous}`, 28); hidden(eqHomeo); z(eqHomeo, 10);
|
|
19
|
+
equation(eqGenus, (cx, 285), `g(\text{bagel})=1\;\ne\;0=g(\text{taco}),\quad \chi = 2-2g`, 28); hidden(eqGenus); z(eqGenus, 10);
|
|
20
|
+
|
|
21
|
+
// confetti ring for the QED moment
|
|
22
|
+
circle(confbox, (cx, 200), 80); hidden(confbox);
|
|
23
|
+
particles(conf, confbox, 22, 4, 9, "ring"); color(conf, gold); hidden(conf);
|
|
24
|
+
|
|
25
|
+
// act wipe
|
|
26
|
+
line(wipe1, (-40, 140), (-40, h - 90)); stroke(wipe1, 4); color(wipe1, gold); glow(wipe1, 14);
|
|
27
|
+
|
|
28
|
+
// ================= act 1 cast: rubber-sheet geometry (2D) =================
|
|
29
|
+
circle(blob, (cx, cy + 50), 120); outlined(blob); stroke(blob, 4); color(blob, cyan); untraced(blob); tag(blob, rub);
|
|
30
|
+
polygon(btar, (cx + 150, cy + 60), (cx + 90, cy - 60), (cx - 20, cy - 30), (cx - 150, cy - 10), (cx - 130, cy + 120), (cx - 20, cy + 170), (cx + 100, cy + 150));
|
|
31
|
+
outlined(btar); hidden(btar);
|
|
32
|
+
morph(blob, btar);
|
|
33
|
+
|
|
34
|
+
text(rule1, (cx - 340, cy + 50), "stretch / bend / squish : ALLOWED"); size(rule1, 26); color(rule1, lime); hidden(rule1); tag(rule1, rub);
|
|
35
|
+
text(rule2, (cx + 340, cy + 50), "cut / glue : FORBIDDEN"); size(rule2, 26); color(rule2, red); hidden(rule2); tag(rule2, rub);
|
|
36
|
+
|
|
37
|
+
// ================= act 2 cast: the 3D kitchen (right-handed, Z-up) =========
|
|
38
|
+
camera3((7.8, -8.8, 4.4), (0, 0, 0.7), 42);
|
|
39
|
+
grid3(floor, (0, 0, 0), 3, 1); color(floor, dim); opacity(floor, 0.3); hidden(floor);
|
|
40
|
+
|
|
41
|
+
// the tortilla: a flat disc-like sheet...
|
|
42
|
+
param3(sheet, "u", "v", "0", (-1.4, 1.4), (-1.8, 1.8), 40);
|
|
43
|
+
color(sheet, gold); finish3(sheet, "shading=smooth depth=0.2");
|
|
44
|
+
|
|
45
|
+
// ...driven by ONE knob. The fold angle grows with p; arc length is preserved
|
|
46
|
+
// (tortillas bend, they do not stretch) - this IS the homeomorphism, live:
|
|
47
|
+
parameter(fold, (w - 180, 610), 0.05, 0.05, 1, "fold", 2); hidden(fold);
|
|
48
|
+
bind(fold, sheet, formula, "sin(2.2*p*u)/(2.2*p)", "v", "(1-cos(2.2*p*u))/(2.2*p)");
|
|
49
|
+
|
|
50
|
+
// the filling: one sausage, dropped in from above
|
|
51
|
+
param3(saus, "0.34*cos(u)", "v", "2.6+0.34*sin(u)", (0, tau), (-2.2, 2.2), 28);
|
|
52
|
+
color(saus, coral); finish3(saus, "shading=smooth"); hidden(saus);
|
|
53
|
+
|
|
54
|
+
// the unreachable bagel: genus 1, parked stage right
|
|
55
|
+
param3(torus, "2.9+(0.85+0.32*cos(v))*cos(u)", "(0.85+0.32*cos(v))*sin(u)", "0.62+0.32*sin(v)", (0, tau), (0, tau), 32);
|
|
56
|
+
color(torus, violet); finish3(torus, "shading=smooth"); hidden(torus);
|
|
57
|
+
|
|
58
|
+
// pinned labels that live in the 3D world
|
|
59
|
+
text(ltaco, (cx, cy), "TACO"); size(ltaco, 32); color(ltaco, lime); hidden(ltaco);
|
|
60
|
+
pin3(ltaco, (0, -2.3, 0.9), (0, -14));
|
|
61
|
+
text(lhot, (cx, cy), "HOTDOG"); size(lhot, 32); color(lhot, coral); hidden(lhot);
|
|
62
|
+
pin3(lhot, (0, -2.3, 0.9), (0, -14));
|
|
63
|
+
text(g0, (cx, cy), "genus 0 - no holes"); size(g0, 24); color(g0, lime); hidden(g0);
|
|
64
|
+
pin3(g0, (-1.7, 0, 1.9), (0, -12));
|
|
65
|
+
text(g1, (cx, cy), "genus 1 - one hole"); size(g1, 24); color(g1, violet); hidden(g1);
|
|
66
|
+
pin3(g1, (2.9, 0, 1.6), (0, -14));
|
|
67
|
+
|
|
68
|
+
// ================= timeline =================
|
|
69
|
+
|
|
70
|
+
// ---- cold open: state the theorem with a straight face
|
|
71
|
+
type(head, 1.1);
|
|
72
|
+
wordpop(sub, 0.06);
|
|
73
|
+
show(eqT, 0.7); cue(tick);
|
|
74
|
+
wait(0.9);
|
|
75
|
+
|
|
76
|
+
// ---- act 1: the rules (rubber-sheet geometry)
|
|
77
|
+
cue(whoosh);
|
|
78
|
+
show(a1, 0.5);
|
|
79
|
+
draw(blob, 1.0);
|
|
80
|
+
show(rule1, 0.5); cue(tick);
|
|
81
|
+
show(rule2, 0.5); shake(rule2, 0.7);
|
|
82
|
+
say(cap, "Topology keeps only what survives stretching - distance is negotiable, holes are not", 0.5);
|
|
83
|
+
show(eqHomeo, 0.6);
|
|
84
|
+
to(blob, morph, 1, 1.5, smooth);
|
|
85
|
+
say(cap, "To a topologist these are the SAME shape - and every move must run backwards too", 0.5);
|
|
86
|
+
to(blob, morph, 0, 1.2, smooth);
|
|
87
|
+
wait(0.4);
|
|
88
|
+
par { shift(wipe1, (w + 80, 0), 0.7, linear); fade(rub, 0.6); fade(a1, 0.5); fade(eqHomeo, 0.5); }
|
|
89
|
+
fade(wipe1, 0.2); // park the wipe fully off-stage so it can't streak act 2
|
|
90
|
+
|
|
91
|
+
// ---- act 2: the deformation (the actual proof)
|
|
92
|
+
cue(whoosh);
|
|
93
|
+
show(a2, 0.5);
|
|
94
|
+
par { show(floor, 0.8); show(sheet, 1.0); }
|
|
95
|
+
say(cap, "Exhibit A: the tortilla. A disc - genus 0, no holes", 0.5);
|
|
96
|
+
show(g0, 0.5);
|
|
97
|
+
show(fold, 0.4);
|
|
98
|
+
wait(0.6);
|
|
99
|
+
|
|
100
|
+
// one knob, turned continuously: disc -> taco
|
|
101
|
+
say(cap, "One knob: FOLD. No cutting, no gluing - just bending", 0.5);
|
|
102
|
+
par { to(fold, value, 0.55, 2.4, smooth); orbit3(-18, 20, 10.5, 2.4, smooth); }
|
|
103
|
+
show(ltaco, 0.5);
|
|
104
|
+
flash(sheet, lime);
|
|
105
|
+
cue(pop);
|
|
106
|
+
show(saus, 0.2);
|
|
107
|
+
shift3(saus, (0, 0, -2.2), 0.9, bounce);
|
|
108
|
+
say(cap, "Add filling: TACO", 0.4);
|
|
109
|
+
wait(0.7);
|
|
110
|
+
|
|
111
|
+
// keep turning the SAME knob: taco -> hotdog
|
|
112
|
+
say(cap, "Keep folding. Nothing tears, nothing sticks", 0.5);
|
|
113
|
+
par { to(fold, value, 1.0, 2.6, smooth); orbit3(25, 16, 10.0, 2.6, smooth); fade(ltaco, 0.6); }
|
|
114
|
+
show(lhot, 0.5);
|
|
115
|
+
flash(sheet, coral);
|
|
116
|
+
say(cap, "HOTDOG. Same disc - just more fold", 0.4);
|
|
117
|
+
wait(0.6);
|
|
118
|
+
|
|
119
|
+
// homeomorphism runs both ways: rewind it before their eyes
|
|
120
|
+
say(cap, "And back again... a homeomorphism must run both directions", 0.5);
|
|
121
|
+
to(fold, value, 0.55, 1.6, smooth);
|
|
122
|
+
to(fold, value, 1.0, 1.6, smooth);
|
|
123
|
+
|
|
124
|
+
// ---- QED
|
|
125
|
+
cue(chime);
|
|
126
|
+
rewrite(eqT, `\textbf{Theorem.}\;\;\text{hotdog} \;\cong\; \text{taco}\quad\blacksquare`, 0.9);
|
|
127
|
+
seq { show(conf, 0.1); burst(conf, 1.4); }
|
|
128
|
+
par { orbit3(115, 18, 10.0, 3.0, smooth); }
|
|
129
|
+
say(cap, "No cuts, no glue - QED, with mustard", 0.6);
|
|
130
|
+
wait(0.8);
|
|
131
|
+
|
|
132
|
+
// ---- coda: what a hotdog is NOT
|
|
133
|
+
cue(whoosh);
|
|
134
|
+
show(a3, 0.5); fade(a2, 0.4);
|
|
135
|
+
par { show(torus, 0.8); look3((1.3, 0, 0.7), 1.0, smooth); show(g1, 0.6); }
|
|
136
|
+
show(eqGenus, 0.6);
|
|
137
|
+
say(cap, "The bagel stays forever out of reach: making a hole needs a CUT", 0.5);
|
|
138
|
+
say(cap, "Genus is a topological invariant - it can never change under bending", 0.5);
|
|
139
|
+
flash(torus, red);
|
|
140
|
+
pulse(torus, 0.8);
|
|
141
|
+
wait(0.9);
|
|
142
|
+
par { fade(torus, 0.7); fade(g1, 0.5); fade(a3, 0.4); fade(eqGenus, 0.5); look3((0, 0, 0.7), 1.0, smooth); }
|
|
143
|
+
|
|
144
|
+
// ---- end card: the theorem breathes over a slow orbit of lunch
|
|
145
|
+
par { breathe(eqT, 3, 0.05, 0, 6); orbit3(160, 14, 10.5, 6, smooth); }
|
|
146
|
+
say(cap, "Lunch, rigorously", 0.6);
|
|
147
|
+
wait(12.0);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Hue Wave — a ring of dots, each with its own starting hue, all advancing
|
|
2
|
+
// their hue at the same rate so the rainbow *rotates* around the ring. Shows
|
|
3
|
+
// off `hue` as an animatable track: `to(id, hue, degrees)` cycles colour over
|
|
4
|
+
// time (unlike `recolor`, it travels around the colour wheel, not through grey).
|
|
5
|
+
//
|
|
6
|
+
// manic examples/hue_wave.manic
|
|
7
|
+
// manic examples/hue_wave.manic --record out --fps 60
|
|
8
|
+
|
|
9
|
+
title("Hue Wave");
|
|
10
|
+
canvas(1280, 720);
|
|
11
|
+
|
|
12
|
+
text(head, (640, 110), "an animated hue track — colour that cycles");
|
|
13
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
14
|
+
|
|
15
|
+
let n = 36; let cx = 640; let cy = 400; let r = 210;
|
|
16
|
+
|
|
17
|
+
// a ring of dots, rainbow-coloured by angle
|
|
18
|
+
for i in 0..n {
|
|
19
|
+
let a = tau * i / n;
|
|
20
|
+
dot(d{i}, (cx + r*cos(a), cy + r*sin(a)), 18);
|
|
21
|
+
hue(d{i}, 360 * i / n);
|
|
22
|
+
glow(d{i}, 1.4);
|
|
23
|
+
tag(d{i}, ring);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// --- script ---
|
|
27
|
+
show(head, 0.5);
|
|
28
|
+
|
|
29
|
+
// spin the whole rainbow: every dot advances its hue by 720 deg (two full
|
|
30
|
+
// cycles) over 6s, in parallel — the pattern rotates around the ring
|
|
31
|
+
par {
|
|
32
|
+
for i in 0..n {
|
|
33
|
+
to(d{i}, hue, 360*i/n + 720, 6.0, linear);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// hypothesis.manic — a significance test & the p-value (stats Tier 5)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// `hypothesis(id, (cx,cy), z, [alpha], [unit])` — under the null hypothesis the
|
|
5
|
+
// test statistic is standard-normal; the observed z cuts off tails whose area is
|
|
6
|
+
// the p-value. If that area is smaller than alpha, the result is too surprising
|
|
7
|
+
// to be chance — reject. Pieces: `{id}.curve`, `{id}.tails`, `{id}.zline`,
|
|
8
|
+
// `{id}.p`, `{id}.verdict`.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Hypothesis testing: is this surprising?");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
|
|
14
|
+
hypothesis(hy, (cx, cy - 10), 2.3, 0.05, 92);
|
|
15
|
+
untraced(hy.curve);
|
|
16
|
+
hidden(hy.tails); hidden(hy.zline); hidden(hy.zlbl);
|
|
17
|
+
hidden(hy.p); hidden(hy.verdict);
|
|
18
|
+
|
|
19
|
+
text(cap, (cx, h - 46), ""); size(cap, 22); color(cap, dim); display(cap);
|
|
20
|
+
|
|
21
|
+
say(cap, "if nothing's going on, the test statistic follows this bell", 0.5);
|
|
22
|
+
draw(hy.curve, 1.0);
|
|
23
|
+
wait(1.2);
|
|
24
|
+
say(cap, "we observed z = 2.3 — out here in the tails", 0.5);
|
|
25
|
+
show(hy.zline, 0.4); show(hy.zlbl, 0.3);
|
|
26
|
+
wait(1.4);
|
|
27
|
+
say(cap, "the shaded tail area is the p-value: how likely a result this extreme is", 0.5);
|
|
28
|
+
to(hy.tails, opacity, 0.5, 0.6); show(hy.p, 0.4);
|
|
29
|
+
wait(1.6);
|
|
30
|
+
say(cap, "p = 0.021 < 0.05, so it's too surprising for chance — reject the null", 0.5);
|
|
31
|
+
show(hy.verdict, 0.4);
|
|
32
|
+
wait(1.9);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// image.manic — embed a raster image (PNG/JPG) in a scene
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// `image(id, (x,y), "asset:name.png"|"path", [w], [h])` loads a bundled or
|
|
5
|
+
// user-provisioned image file and draws it
|
|
6
|
+
// centred at (x,y), w×h px — and it's an ordinary entity, so every verb
|
|
7
|
+
// (`show`/`move`/`fade`/`pulse`/`spin`/…) animates it. Here a bundled logo
|
|
8
|
+
// slides + fades in, pulses, then a caption types beside it. A missing ordinary
|
|
9
|
+
// path draws a crossed placeholder; a missing bundled asset is an error.
|
|
10
|
+
//
|
|
11
|
+
// (This unlocks real logos, avatars and photo backdrops for creator templates —
|
|
12
|
+
// a creator drops their brand image into a slot.)
|
|
13
|
+
// ============================================================================
|
|
14
|
+
|
|
15
|
+
title("Raster Images");
|
|
16
|
+
canvas("16:9");
|
|
17
|
+
|
|
18
|
+
image(logo, (cx, 340), "asset:manic-logo.png", 300, 300); hidden(logo);
|
|
19
|
+
text(cap, (cx, 600), "any PNG/JPG — and it animates like anything else");
|
|
20
|
+
color(cap, fg); size(cap, 34); bold(cap); untraced(cap);
|
|
21
|
+
|
|
22
|
+
// ================= THE SCENE =================
|
|
23
|
+
show(logo, 0.6); pulse(logo);
|
|
24
|
+
wait(0.4);
|
|
25
|
+
spin(logo, 1.0);
|
|
26
|
+
type(cap, 2.0);
|
|
27
|
+
wait(0.6);
|
|
28
|
+
par { move(logo, (cx, 320), 0.8, smooth); pulse(logo); }
|
|
29
|
+
wait(1.0);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The Incircle & Contact Triangle — the incircle touches each side at the foot
|
|
2
|
+
// of the perpendicular from the incenter, and each radius meets the side at a
|
|
3
|
+
// right angle. The three touch points form the contact triangle.
|
|
4
|
+
//
|
|
5
|
+
// manic examples/incircle_tangents.manic
|
|
6
|
+
// manic examples/incircle_tangents.manic --record out --fps 60
|
|
7
|
+
|
|
8
|
+
title("The Incircle");
|
|
9
|
+
canvas(1280, 720);
|
|
10
|
+
|
|
11
|
+
text(head, (640, 120), "tangent to all three sides");
|
|
12
|
+
display(head); color(head, cyan); size(head, 28); hidden(head);
|
|
13
|
+
text(cap, (640, 668), ""); color(cap, dim); size(cap, 22);
|
|
14
|
+
|
|
15
|
+
point(A, (300, 560), "A");
|
|
16
|
+
point(B, (1000, 560), "B");
|
|
17
|
+
point(C, (640, 160), "C");
|
|
18
|
+
hidden(A); hidden(B); hidden(C);
|
|
19
|
+
|
|
20
|
+
segment(ab, A, B); segment(bc, B, C); segment(ca, C, A);
|
|
21
|
+
untraced(ab); untraced(bc); untraced(ca);
|
|
22
|
+
|
|
23
|
+
incenter(I, A, B, C); color(I, cyan); label(I, "I", (16, -14)); hidden(I);
|
|
24
|
+
incircle(ic, A, B, C); untraced(ic);
|
|
25
|
+
|
|
26
|
+
// touch points = feet of perpendiculars from I to each side
|
|
27
|
+
foot(tBC, I, B, C); foot(tCA, I, C, A); foot(tAB, I, A, B);
|
|
28
|
+
color(tBC, magenta); color(tCA, magenta); color(tAB, magenta);
|
|
29
|
+
hidden(tBC); hidden(tCA); hidden(tAB);
|
|
30
|
+
|
|
31
|
+
// radii to the touch points, with right-angle marks
|
|
32
|
+
segment(rBC, I, tBC); segment(rCA, I, tCA); segment(rAB, I, tAB);
|
|
33
|
+
color(rBC, lime); color(rCA, lime); color(rAB, lime);
|
|
34
|
+
untraced(rBC); untraced(rCA); untraced(rAB);
|
|
35
|
+
rightangle(qBC, I, tBC, B); rightangle(qCA, I, tCA, C); rightangle(qAB, I, tAB, A);
|
|
36
|
+
untraced(qBC); untraced(qCA); untraced(qAB);
|
|
37
|
+
|
|
38
|
+
// the contact triangle
|
|
39
|
+
segment(k1, tBC, tCA); segment(k2, tCA, tAB); segment(k3, tAB, tBC);
|
|
40
|
+
untraced(k1); untraced(k2); untraced(k3);
|
|
41
|
+
|
|
42
|
+
show(head, 0.5);
|
|
43
|
+
say(cap, "a triangle and its incentre I");
|
|
44
|
+
par { show(A); show(B); show(C); }
|
|
45
|
+
par { draw(ab, 0.5); draw(bc, 0.5); draw(ca, 0.5); }
|
|
46
|
+
show(I, 0.3);
|
|
47
|
+
wait(0.3);
|
|
48
|
+
|
|
49
|
+
section("Inscribed circle");
|
|
50
|
+
say(cap, "the incircle touches each side once");
|
|
51
|
+
draw(ic, 1.0);
|
|
52
|
+
stagger(0.15) { show(tBC); show(tCA); show(tAB); }
|
|
53
|
+
wait(0.3);
|
|
54
|
+
|
|
55
|
+
section("Radii ⟂ sides");
|
|
56
|
+
say(cap, "each radius meets its side at a right angle");
|
|
57
|
+
par { draw(rBC, 0.5); draw(rCA, 0.5); draw(rAB, 0.5); }
|
|
58
|
+
par { draw(qBC, 0.4); draw(qCA, 0.4); draw(qAB, 0.4); }
|
|
59
|
+
wait(0.4);
|
|
60
|
+
|
|
61
|
+
section("Contact triangle");
|
|
62
|
+
say(cap, "the three touch points form the contact triangle");
|
|
63
|
+
par { draw(k1, 0.5); draw(k2, 0.5); draw(k3, 0.5); }
|
|
64
|
+
wait(1.2);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// incline-bumper.manic — a block slides down an incline into a spring bumper at
|
|
2
|
+
// the base, compresses it, and launches back up (one-sided contact).
|
|
3
|
+
// `inclinebumper(id,[center],[angle],[mass],[stiffness],[unit])`. PRE-SIMULATED
|
|
4
|
+
// (RK4); `energygraph` shows gravity PE ↔ kinetic ↔ spring PE (conserved).
|
|
5
|
+
title("Incline + spring bumper — slide, compress, launch");
|
|
6
|
+
canvas("16:9");
|
|
7
|
+
text(hdr, (cx, 44), "A block slides down and compresses a spring at the base, then launches back"); size(hdr, 21); color(hdr, cyan); bold(hdr); display(hdr);
|
|
8
|
+
inclinebumper(ib, (300, 500), 40, 2, 500);
|
|
9
|
+
energygraph(ib, (1010, 320), 120);
|
|
10
|
+
text(cap, (cx, h - 32), "gravity PE → kinetic → spring PE → back: one-sided contact, energy conserved"); size(cap, 15); color(cap, dim); display(cap);
|
|
11
|
+
run(ib, 6);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// incline-pulley.manic — the incline-Atwood: a block on an incline tied over a
|
|
2
|
+
// pulley at the top to a hanging mass. `inclinepulley(id,[center],[angle],[m1],
|
|
3
|
+
// [m2],[unit])`. PRE-SIMULATED (RK4); `run(id)` plays it; `energygraph` shows the
|
|
4
|
+
// KE↔PE trade. Matches the classic textbook figure.
|
|
5
|
+
title("Incline + pulley — the incline-Atwood");
|
|
6
|
+
canvas("16:9");
|
|
7
|
+
text(hdr, (cx, 44), "Block on an incline, tied over a pulley to a hanging mass"); size(hdr, 22); color(hdr, cyan); bold(hdr); display(hdr);
|
|
8
|
+
inclinepulley(ip, (280, 500), 30, 3, 2);
|
|
9
|
+
energygraph(ip, (1010, 320), 120);
|
|
10
|
+
text(cap, (cx, h - 32), "m₂ (2 kg) hanging outpulls m₁·sinθ, so m₁ climbs the incline and m₂ descends"); size(cap, 15); color(cap, dim); display(cap);
|
|
11
|
+
run(ip, 4);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// incline-showcase.manic — four incline problems, one paper page, all live
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// A single annotated lesson that puts ALL FOUR animated incline sims on one
|
|
5
|
+
// `template("paper")` page and runs them together — real base-manic composition
|
|
6
|
+
// (staged reveal with `hidden`/`show`, `say` narration, per-quadrant labels),
|
|
7
|
+
// not a physics dump. Each sim's bare id broadcasts, so `hidden(rp)`/`show(rp)`
|
|
8
|
+
// address a whole sim at once. Finishes with all four running in parallel.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Four inclined-plane problems — one page");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
template("paper");
|
|
14
|
+
|
|
15
|
+
text(hdr, (cx, 34), "Four inclined-plane problems, one page"); color(hdr, fg); size(hdr, 26); bold(hdr); display(hdr); hidden(hdr);
|
|
16
|
+
|
|
17
|
+
// the four sims (each hidden; the bare id broadcasts to all its parts)
|
|
18
|
+
ramp(rp, (110, 340), 28, 5, 0, 45); hidden(rp);
|
|
19
|
+
inclinepulley(ip, (690, 340), 30, 3, 2, 42); hidden(ip);
|
|
20
|
+
doubleincline(dw, (300, 660), 50, 30, 12, 70, 34); hidden(dw);
|
|
21
|
+
inclinebumper(ib, (720, 660), 38, 2, 500, 42); hidden(ib);
|
|
22
|
+
|
|
23
|
+
// quadrant labels
|
|
24
|
+
text(l1, (150, 175), "① friction on a ramp"); color(l1, dim); size(l1, 17); display(l1); hidden(l1);
|
|
25
|
+
text(l2, (770, 175), "② incline + pulley"); color(l2, dim); size(l2, 17); display(l2); hidden(l2);
|
|
26
|
+
text(l3, (150, 505), "③ two-slope wedge"); color(l3, dim); size(l3, 17); display(l3); hidden(l3);
|
|
27
|
+
text(l4, (770, 505), "④ spring bumper"); color(l4, dim); size(l4, 17); display(l4); hidden(l4);
|
|
28
|
+
|
|
29
|
+
text(cap, (cx, h - 26), ""); color(cap, fg); size(cap, 19); display(cap);
|
|
30
|
+
|
|
31
|
+
// ============================== SCRIPT ==============================
|
|
32
|
+
show(hdr, 0.5);
|
|
33
|
+
say(cap, "one page, four classic incline problems — all real, pre-simulated physics", 0.4);
|
|
34
|
+
wait(0.5);
|
|
35
|
+
|
|
36
|
+
say(cap, "① a block sliding down a rough ramp", 0.4);
|
|
37
|
+
show(rp, 0.5); show(l1, 0.3);
|
|
38
|
+
wait(0.5);
|
|
39
|
+
say(cap, "② a block on an incline, tied over a pulley to a hanging mass", 0.4);
|
|
40
|
+
show(ip, 0.5); show(l2, 0.3);
|
|
41
|
+
wait(0.5);
|
|
42
|
+
say(cap, "③ two blocks on a wedge, connected over the apex", 0.4);
|
|
43
|
+
show(dw, 0.5); show(l3, 0.3);
|
|
44
|
+
wait(0.5);
|
|
45
|
+
say(cap, "④ a block sliding into a spring bumper at the base", 0.4);
|
|
46
|
+
show(ib, 0.5); show(l4, 0.3);
|
|
47
|
+
wait(0.6);
|
|
48
|
+
|
|
49
|
+
say(cap, "…and they all run — same page, same physics engine, four different motions", 0.4);
|
|
50
|
+
par {
|
|
51
|
+
run(rp, 7);
|
|
52
|
+
run(ip, 7);
|
|
53
|
+
run(dw, 7);
|
|
54
|
+
run(ib, 7);
|
|
55
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Inline LaTeX everywhere: wrap math in `$…$` (backtick raw string) inside ANY
|
|
2
|
+
// text/caption/kit label. Plain text (no `$`) is unchanged. Mixed lines wrap.
|
|
3
|
+
title("Inline math");
|
|
4
|
+
canvas("16:9");
|
|
5
|
+
|
|
6
|
+
text(t1, (cx, 110), `The area of a circle is $A = \pi r^2$`);
|
|
7
|
+
color(t1, cyan);
|
|
8
|
+
|
|
9
|
+
// mixed text + math that WRAPS across lines
|
|
10
|
+
text(t2, (cx, 300), `By the Pythagorean theorem, if $a^2 + b^2 = c^2$ then the triangle with sides a, b, c is right-angled`);
|
|
11
|
+
wrap(t2, 760);
|
|
12
|
+
color(t2, lime);
|
|
13
|
+
|
|
14
|
+
// a whole-formula label (auto-typeset, centred)
|
|
15
|
+
equation(eq, (cx, 470), `\int_0^{1} x^2 \, dx = \tfrac{1}{3}`, 60);
|
|
16
|
+
color(eq, gold);
|