@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,42 @@
|
|
|
1
|
+
// The Sine Wave — a first taste of the manic math kit.
|
|
2
|
+
// manic examples/sine_wave.manic
|
|
3
|
+
// manic examples/sine_wave.manic --still 2.6 --scale 1.5 --crt
|
|
4
|
+
|
|
5
|
+
title("The Sine Wave");
|
|
6
|
+
canvas(1280, 720);
|
|
7
|
+
|
|
8
|
+
// --- cast: the world at t = 0 ---
|
|
9
|
+
|
|
10
|
+
// a coordinate frame centred on the stage
|
|
11
|
+
axes(ax, (640, 380), 520, 240);
|
|
12
|
+
text(xlab, (1180, 410), "x"); color(xlab, dim); size(xlab, 22);
|
|
13
|
+
text(ylab, (665, 152), "y"); color(ylab, dim); size(ylab, 22);
|
|
14
|
+
|
|
15
|
+
// the curve: visible but not yet drawn, so we can trace it on
|
|
16
|
+
plot(wave, (640, 380), 78, 120, sin, 6.6);
|
|
17
|
+
untraced(wave);
|
|
18
|
+
|
|
19
|
+
// a vector to point at, revealed later
|
|
20
|
+
vector(v1, (640, 380), (122, 108));
|
|
21
|
+
hidden(v1);
|
|
22
|
+
|
|
23
|
+
// headline + caption
|
|
24
|
+
text(head, (640, 118), "y = sin(x)");
|
|
25
|
+
display(head); color(head, cyan); size(head, 40); hidden(head);
|
|
26
|
+
text(cap, (640, 662), ""); color(cap, dim); size(cap, 22);
|
|
27
|
+
|
|
28
|
+
// --- script: beats, top to bottom ---
|
|
29
|
+
|
|
30
|
+
show(head, 0.5);
|
|
31
|
+
say(cap, "a coordinate frame on the void");
|
|
32
|
+
draw(wave, 1.7);
|
|
33
|
+
say(cap, "y = sin(x), traced on");
|
|
34
|
+
wait(0.6);
|
|
35
|
+
|
|
36
|
+
section("Vectors");
|
|
37
|
+
say(cap, "a vector from the origin");
|
|
38
|
+
par {
|
|
39
|
+
show(v1, 0.4);
|
|
40
|
+
pulse(v1);
|
|
41
|
+
}
|
|
42
|
+
wait(1.2);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// skew.manic — the shape of a dataset: skewness (stats Tier 1)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// `skew(id, (cx,cy), "v1 v2 v3 …", [bins], [width], [height], [color])` draws a
|
|
5
|
+
// histogram with the **mean** (gold) and **median** (magenta) marked and a
|
|
6
|
+
// labelled skewness. The tell: when the mean sits right of the median, a right
|
|
7
|
+
// tail is pulling it — the data is right-skewed (positive); left of it, left-
|
|
8
|
+
// skewed; on top of it, symmetric.
|
|
9
|
+
//
|
|
10
|
+
// TO ADAPT: paste your numbers. Incomes, wait times and prices are classically
|
|
11
|
+
// right-skewed (a few big values pull the mean up).
|
|
12
|
+
// ============================================================================
|
|
13
|
+
|
|
14
|
+
title("Skewness: which way does the tail point?");
|
|
15
|
+
canvas("16:9");
|
|
16
|
+
|
|
17
|
+
text(hdr, (cx, 66), "monthly salaries (k) — a few big earners pull the mean up");
|
|
18
|
+
size(hdr, 23); color(hdr, cyan); bold(hdr); display(hdr);
|
|
19
|
+
|
|
20
|
+
skew(sk, (cx, cy - 10),
|
|
21
|
+
"28 30 32 31 29 33 35 30 31 34 42 38 30 32 31 33 30 36 55 68 90 30 34 31", 14, 560, 240);
|
|
22
|
+
untraced(sk.bars);
|
|
23
|
+
hidden(sk.meanline); hidden(sk.meanlbl);
|
|
24
|
+
hidden(sk.medianline); hidden(sk.medianlbl);
|
|
25
|
+
hidden(sk.skewlbl);
|
|
26
|
+
|
|
27
|
+
text(cap, (cx, h - 46), ""); size(cap, 22); color(cap, dim); display(cap);
|
|
28
|
+
|
|
29
|
+
say(cap, "most salaries cluster low, with a long tail of high earners", 0.5);
|
|
30
|
+
stagger(0.05) { for k in 0..14 { draw(sk.bar{k}, 0.3); } }
|
|
31
|
+
wait(1.2);
|
|
32
|
+
|
|
33
|
+
say(cap, "the median sits in the cluster — but the mean is dragged toward the tail", 0.5);
|
|
34
|
+
show(sk.medianline, 0.4); show(sk.medianlbl, 0.3);
|
|
35
|
+
show(sk.meanline, 0.4); show(sk.meanlbl, 0.3);
|
|
36
|
+
wait(1.6);
|
|
37
|
+
|
|
38
|
+
say(cap, "mean to the right of median = right-skewed (positive skew)", 0.5);
|
|
39
|
+
show(sk.skewlbl, 0.4);
|
|
40
|
+
wait(1.8);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//! Engine smoke test: a neon frame with each primitive + a few verbs.
|
|
2
|
+
//! Renders the visual identity independently of the .manic language.
|
|
3
|
+
//!
|
|
4
|
+
//! Live: cargo run --example smoke
|
|
5
|
+
//! Still: cargo run --example smoke -- --still 2.0 --scale 1.5
|
|
6
|
+
//! CRT: cargo run --example smoke -- --crt
|
|
7
|
+
|
|
8
|
+
use manic::prelude::*;
|
|
9
|
+
|
|
10
|
+
fn main() {
|
|
11
|
+
let mut m = Movie::new("manic", 1280, 720);
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
let mut s = m.scene();
|
|
15
|
+
s.circle("a", v(360.0, 360.0), 48.0).label("A");
|
|
16
|
+
s.circle("b", v(920.0, 360.0), 48.0)
|
|
17
|
+
.color(PANEL)
|
|
18
|
+
.label("B")
|
|
19
|
+
.hidden();
|
|
20
|
+
s.arrow("e", v(408.0, 360.0), v(408.0, 360.0))
|
|
21
|
+
.color(MAGENTA)
|
|
22
|
+
.hidden();
|
|
23
|
+
s.rect("box", v(640.0, 520.0), 120.0, 70.0)
|
|
24
|
+
.outline_color(LIME)
|
|
25
|
+
.hidden();
|
|
26
|
+
s.text("cap", v(640.0, 640.0), "")
|
|
27
|
+
.size(24.0)
|
|
28
|
+
.color(DIM)
|
|
29
|
+
.hidden();
|
|
30
|
+
s.text("title", v(640.0, 200.0), "NEON TERMINAL")
|
|
31
|
+
.display()
|
|
32
|
+
.size(44.0)
|
|
33
|
+
.color(CYAN)
|
|
34
|
+
.hidden();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
m.play(act().fade_in("title").dur(0.5));
|
|
38
|
+
m.play(act().set_text("cap", "primitives, glowing, on the void"));
|
|
39
|
+
m.play(act().fade_in("b").dur(0.4));
|
|
40
|
+
m.play(par![
|
|
41
|
+
act().fade_in("e").dur(0.15),
|
|
42
|
+
act()
|
|
43
|
+
.grow_to("e", v(872.0, 360.0))
|
|
44
|
+
.dur(0.6)
|
|
45
|
+
.ease(InOutCubic),
|
|
46
|
+
]);
|
|
47
|
+
m.play(seq![
|
|
48
|
+
act().highlight("b", MAGENTA),
|
|
49
|
+
act().pulse("b"),
|
|
50
|
+
wait(0.4),
|
|
51
|
+
]);
|
|
52
|
+
m.play(act().fade_in("box").dur(0.4));
|
|
53
|
+
m.play(act().move_to("a", v(360.0, 250.0)).dur(0.6).ease(OutBack));
|
|
54
|
+
m.wait(1.0);
|
|
55
|
+
|
|
56
|
+
manic::run(m);
|
|
57
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
title("3D solids");
|
|
2
|
+
canvas(1280, 720);
|
|
3
|
+
template("terminal");
|
|
4
|
+
|
|
5
|
+
camera3((9, -11, 7), (0, 0, 1), 45);
|
|
6
|
+
grid3(floor, (0, 0, 0), 6, 1);
|
|
7
|
+
color(floor, dim);
|
|
8
|
+
axes3(world, (0, 0, 0), 3);
|
|
9
|
+
|
|
10
|
+
// hexagonal prism
|
|
11
|
+
prism3(hex, (-4, 0, 1.2), 6, 1.1, 2.4);
|
|
12
|
+
color(hex, cyan);
|
|
13
|
+
|
|
14
|
+
// a cone (a pyramid with many sides)
|
|
15
|
+
pyramid3(cone, (0, 0, 1.4), 28, 1.2, 2.8);
|
|
16
|
+
color(cone, magenta);
|
|
17
|
+
|
|
18
|
+
// a lathed vase: radius profile r(t) swept around the vertical axis
|
|
19
|
+
revolve3(vase, (4, 0, 1.5), "0.7 + 0.45*sin(t*2.4)", (0, 3), 32);
|
|
20
|
+
color(vase, gold);
|
|
21
|
+
|
|
22
|
+
orbit3(60, 24, 17, 6, smooth);
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
title("Angle Between Two Lines — Visualizing the Problem");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("black");
|
|
4
|
+
|
|
5
|
+
// --- build-time geometry (pure computation, no answer stated on screen) ---
|
|
6
|
+
let sx = 60;
|
|
7
|
+
let sy = 60;
|
|
8
|
+
let s3 = sqrt(3);
|
|
9
|
+
|
|
10
|
+
// Given line: sqrt(3)x + y = 1 => y = 1 - sqrt(3)*x
|
|
11
|
+
// Candidate line L through (3,-2) with slope sqrt(3): y = sqrt(3)*x - 3*sqrt(3) - 2
|
|
12
|
+
// (This is the configuration that both makes a 60 degree angle with the given
|
|
13
|
+
// line AND actually crosses the x-axis — we only use it to draw the picture.)
|
|
14
|
+
|
|
15
|
+
let ix = (s3 + 3) / 2;
|
|
16
|
+
let iy = 1 - s3*ix;
|
|
17
|
+
let ipx = cx + ix*sx;
|
|
18
|
+
let ipy = cy - iy*sy;
|
|
19
|
+
|
|
20
|
+
let aax = -1;
|
|
21
|
+
let aay = 1 - s3*aax;
|
|
22
|
+
let apx = cx + aax*sx;
|
|
23
|
+
let apy = cy - aay*sy;
|
|
24
|
+
|
|
25
|
+
let ppx = cx + 3*sx;
|
|
26
|
+
let ppy = cy - (-2)*sy;
|
|
27
|
+
|
|
28
|
+
let xint = 3 + 2/s3;
|
|
29
|
+
let xintpx = cx + xint*sx;
|
|
30
|
+
let xintpy = cy;
|
|
31
|
+
|
|
32
|
+
// --- cast (constructors): declare entities at t = 0 ---
|
|
33
|
+
text(problem, (cx, 60), "A line $L$ through $(3,-2)$ is inclined at $60^\circ$ to $\sqrt{3}x + y = 1$ and meets the $x$-axis.");
|
|
34
|
+
size(problem, 30);
|
|
35
|
+
color(problem, fg);
|
|
36
|
+
wrap(problem, 1050);
|
|
37
|
+
hidden(problem);
|
|
38
|
+
|
|
39
|
+
text(question, (cx, h - 50), "What is the equation of line $L$?");
|
|
40
|
+
size(question, 32);
|
|
41
|
+
color(question, gold);
|
|
42
|
+
hidden(question);
|
|
43
|
+
|
|
44
|
+
axes(axs, (cx, cy), 380, 340, 60);
|
|
45
|
+
hidden(axs);
|
|
46
|
+
|
|
47
|
+
plot(givenLine, (cx, cy), sx, sy, "1 - sqrt(3)*x", (-2, 3.4));
|
|
48
|
+
color(givenLine, cyan);
|
|
49
|
+
untraced(givenLine);
|
|
50
|
+
|
|
51
|
+
equation(givenLabel, (apx - 70, apy - 30), `\sqrt{3}x+y=1`, 28);
|
|
52
|
+
color(givenLabel, cyan);
|
|
53
|
+
hidden(givenLabel);
|
|
54
|
+
|
|
55
|
+
plot(L, (cx, cy), sx, sy, "sqrt(3)*x - 3*sqrt(3) - 2", (1.3, 5.3));
|
|
56
|
+
color(L, magenta);
|
|
57
|
+
dashed(L);
|
|
58
|
+
untraced(L);
|
|
59
|
+
|
|
60
|
+
text(Llabel, (xintpx + 30, xintpy - 60), "L");
|
|
61
|
+
size(Llabel, 30);
|
|
62
|
+
color(Llabel, magenta);
|
|
63
|
+
hidden(Llabel);
|
|
64
|
+
|
|
65
|
+
point(I, (ipx, ipy));
|
|
66
|
+
hidden(I);
|
|
67
|
+
|
|
68
|
+
point(A, (apx, apy));
|
|
69
|
+
hidden(A);
|
|
70
|
+
|
|
71
|
+
point(Bp, (ppx, ppy), "P(3, -2)");
|
|
72
|
+
color(Bp, gold);
|
|
73
|
+
size(Bp.label, 28);
|
|
74
|
+
hidden(Bp);
|
|
75
|
+
|
|
76
|
+
point(Q, (xintpx, xintpy), "L meets x-axis");
|
|
77
|
+
color(Q, lime);
|
|
78
|
+
size(Q.label, 26);
|
|
79
|
+
hidden(Q);
|
|
80
|
+
|
|
81
|
+
anglemark(ang, A, I, Bp);
|
|
82
|
+
color(ang, gold);
|
|
83
|
+
untraced(ang);
|
|
84
|
+
|
|
85
|
+
equation(angLabel, (ipx - 20, ipy - 60), `60^\circ`, 30);
|
|
86
|
+
color(angLabel, gold);
|
|
87
|
+
hidden(angLabel);
|
|
88
|
+
|
|
89
|
+
// --- script (timeline): reveal the construction step by step ---
|
|
90
|
+
show(problem, 1);
|
|
91
|
+
wait(0.5);
|
|
92
|
+
|
|
93
|
+
show(axs, 1);
|
|
94
|
+
wait(0.3);
|
|
95
|
+
|
|
96
|
+
draw(givenLine, 1.2);
|
|
97
|
+
show(givenLabel, 0.6);
|
|
98
|
+
wait(0.4);
|
|
99
|
+
|
|
100
|
+
show(Bp, 0.6);
|
|
101
|
+
wait(0.4);
|
|
102
|
+
|
|
103
|
+
draw(L, 1.2);
|
|
104
|
+
show(Llabel, 0.5);
|
|
105
|
+
wait(0.4);
|
|
106
|
+
|
|
107
|
+
draw(ang, 0.8);
|
|
108
|
+
show(angLabel, 0.6);
|
|
109
|
+
wait(0.4);
|
|
110
|
+
|
|
111
|
+
show(Q, 0.6);
|
|
112
|
+
wait(0.6);
|
|
113
|
+
|
|
114
|
+
show(question, 1);
|
|
115
|
+
wait(1.5);
|
|
116
|
+
|
|
117
|
+
// =====================================================================
|
|
118
|
+
// PART 2 — Finding the solution
|
|
119
|
+
// =====================================================================
|
|
120
|
+
|
|
121
|
+
// clear the setup off screen to make room for the algebra
|
|
122
|
+
fade(problem, 0.6);
|
|
123
|
+
fade(question, 0.6);
|
|
124
|
+
par {
|
|
125
|
+
fade(axs, 0.6);
|
|
126
|
+
fade(givenLine, 0.6);
|
|
127
|
+
fade(givenLabel, 0.6);
|
|
128
|
+
fade(L, 0.6);
|
|
129
|
+
fade(Llabel, 0.6);
|
|
130
|
+
fade(ang, 0.6);
|
|
131
|
+
fade(angLabel, 0.6);
|
|
132
|
+
fade(Bp, 0.6);
|
|
133
|
+
fade(Q, 0.6);
|
|
134
|
+
fade(I, 0.6);
|
|
135
|
+
fade(A, 0.6);
|
|
136
|
+
}
|
|
137
|
+
wait(0.4);
|
|
138
|
+
|
|
139
|
+
section("Solving for the Slope of L");
|
|
140
|
+
|
|
141
|
+
text(step1, (cx, 160), "Let the slope of $L$ be $m$. The given line $\sqrt{3}x+y=1$ has slope $m_1=-\sqrt{3}$.");
|
|
142
|
+
size(step1, 28);
|
|
143
|
+
color(step1, fg);
|
|
144
|
+
wrap(step1, 1050);
|
|
145
|
+
hidden(step1);
|
|
146
|
+
|
|
147
|
+
equation(tanFormula, (cx, 280), `\tan 60^\circ=\left|\frac{m-m_1}{1+m\,m_1}\right|`, 42);
|
|
148
|
+
hidden(tanFormula);
|
|
149
|
+
|
|
150
|
+
equation(tanSub, (cx, 380), `\sqrt{3}=\left|\frac{m+\sqrt{3}}{1-\sqrt{3}\,m}\right|`, 42);
|
|
151
|
+
hidden(tanSub);
|
|
152
|
+
|
|
153
|
+
show(step1, 0.8);
|
|
154
|
+
wait(0.4);
|
|
155
|
+
show(tanFormula, 0.8);
|
|
156
|
+
wait(0.6);
|
|
157
|
+
show(tanSub, 0.8);
|
|
158
|
+
wait(1);
|
|
159
|
+
|
|
160
|
+
text(caseLabel, (cx, 460), "Removing the modulus gives two possible slopes:");
|
|
161
|
+
size(caseLabel, 26);
|
|
162
|
+
color(caseLabel, fg);
|
|
163
|
+
hidden(caseLabel);
|
|
164
|
+
show(caseLabel, 0.6);
|
|
165
|
+
wait(0.3);
|
|
166
|
+
|
|
167
|
+
equation(case1, (cx - 260, 540), `m=0`, 40);
|
|
168
|
+
hidden(case1);
|
|
169
|
+
|
|
170
|
+
text(case1note, (cx - 260, 600), "horizontal — never meets the $x$-axis");
|
|
171
|
+
size(case1note, 22);
|
|
172
|
+
color(case1note, dim);
|
|
173
|
+
wrap(case1note, 340);
|
|
174
|
+
hidden(case1note);
|
|
175
|
+
|
|
176
|
+
equation(case2, (cx + 260, 540), `m=\sqrt{3}`, 40);
|
|
177
|
+
hidden(case2);
|
|
178
|
+
|
|
179
|
+
text(case2note, (cx + 260, 600), "meets the $x$-axis — this is $L$");
|
|
180
|
+
size(case2note, 22);
|
|
181
|
+
color(case2note, lime);
|
|
182
|
+
wrap(case2note, 340);
|
|
183
|
+
hidden(case2note);
|
|
184
|
+
|
|
185
|
+
par {
|
|
186
|
+
show(case1, 0.6);
|
|
187
|
+
show(case1note, 0.6);
|
|
188
|
+
}
|
|
189
|
+
wait(0.4);
|
|
190
|
+
par {
|
|
191
|
+
show(case2, 0.6);
|
|
192
|
+
show(case2note, 0.6);
|
|
193
|
+
}
|
|
194
|
+
wait(0.8);
|
|
195
|
+
|
|
196
|
+
par {
|
|
197
|
+
recolor(case1, dim, 0.5);
|
|
198
|
+
recolor(case1note, dim, 0.5);
|
|
199
|
+
}
|
|
200
|
+
flash(case2, lime);
|
|
201
|
+
wait(1);
|
|
202
|
+
|
|
203
|
+
// dismiss the rejected case and the tan-formula scaffolding
|
|
204
|
+
par {
|
|
205
|
+
fade(step1, 0.5);
|
|
206
|
+
fade(tanFormula, 0.5);
|
|
207
|
+
fade(tanSub, 0.5);
|
|
208
|
+
fade(caseLabel, 0.5);
|
|
209
|
+
fade(case1, 0.5);
|
|
210
|
+
fade(case1note, 0.5);
|
|
211
|
+
}
|
|
212
|
+
wait(0.3);
|
|
213
|
+
|
|
214
|
+
par {
|
|
215
|
+
move(case2, (cx, 200), 0.8);
|
|
216
|
+
fade(case2note, 0.4);
|
|
217
|
+
}
|
|
218
|
+
wait(0.6);
|
|
219
|
+
|
|
220
|
+
text(finalIntro, (cx, 300), "Using point-slope form through $P(3,-2)$ with $m=\sqrt{3}$:");
|
|
221
|
+
size(finalIntro, 28);
|
|
222
|
+
color(finalIntro, fg);
|
|
223
|
+
wrap(finalIntro, 1050);
|
|
224
|
+
hidden(finalIntro);
|
|
225
|
+
show(finalIntro, 0.7);
|
|
226
|
+
wait(0.4);
|
|
227
|
+
|
|
228
|
+
equation(eqL, (cx, 400), `y-(-2)=\sqrt{3}(x-3)`, 44);
|
|
229
|
+
hidden(eqL);
|
|
230
|
+
show(eqL, 0.8);
|
|
231
|
+
wait(0.9);
|
|
232
|
+
|
|
233
|
+
rewrite(eqL, `y+2=\sqrt{3}x-3\sqrt{3}`, 1, smooth);
|
|
234
|
+
wait(0.9);
|
|
235
|
+
|
|
236
|
+
rewrite(eqL, `\sqrt{3}x-y-3\sqrt{3}-2=0`, 1, smooth);
|
|
237
|
+
wait(1);
|
|
238
|
+
|
|
239
|
+
text(finalLabel, (cx, 500), "Equation of Line L");
|
|
240
|
+
size(finalLabel, 30);
|
|
241
|
+
color(finalLabel, gold);
|
|
242
|
+
hidden(finalLabel);
|
|
243
|
+
show(finalLabel, 0.6);
|
|
244
|
+
wait(0.3);
|
|
245
|
+
|
|
246
|
+
par {
|
|
247
|
+
move(eqL, (cx, 560), 0.6);
|
|
248
|
+
scale(eqL, 1.15, 0.6);
|
|
249
|
+
}
|
|
250
|
+
recolor(eqL, gold, 0.4);
|
|
251
|
+
pulse(eqL, 0.8);
|
|
252
|
+
wait(1.5);
|
|
253
|
+
|
|
254
|
+
// =====================================================================
|
|
255
|
+
// PART 3 — Reveal the solved line back on the original figure
|
|
256
|
+
// =====================================================================
|
|
257
|
+
|
|
258
|
+
par {
|
|
259
|
+
fade(case2, 0.5);
|
|
260
|
+
fade(finalIntro, 0.5);
|
|
261
|
+
fade(finalLabel, 0.5);
|
|
262
|
+
fade(eqL, 0.5);
|
|
263
|
+
}
|
|
264
|
+
wait(0.4);
|
|
265
|
+
|
|
266
|
+
section("The Solution, Visualized");
|
|
267
|
+
|
|
268
|
+
par {
|
|
269
|
+
show(axs, 0.8);
|
|
270
|
+
show(givenLine, 0.8);
|
|
271
|
+
show(givenLabel, 0.6);
|
|
272
|
+
}
|
|
273
|
+
wait(0.3);
|
|
274
|
+
|
|
275
|
+
par {
|
|
276
|
+
show(Bp, 0.5);
|
|
277
|
+
show(L, 0.8);
|
|
278
|
+
}
|
|
279
|
+
recolor(L, gold, 0.6);
|
|
280
|
+
show(Q, 0.6);
|
|
281
|
+
wait(0.4);
|
|
282
|
+
|
|
283
|
+
equation(answer, (xintpx + 40, xintpy - 90), `\sqrt{3}x-y-3\sqrt{3}-2=0`, 32);
|
|
284
|
+
color(answer, gold);
|
|
285
|
+
hidden(answer);
|
|
286
|
+
show(answer, 1);
|
|
287
|
+
wait(0.6);
|
|
288
|
+
|
|
289
|
+
par {
|
|
290
|
+
cam((xintpx, cy), 1.3, smooth);
|
|
291
|
+
zoom(1.3, 1.3, smooth);
|
|
292
|
+
}
|
|
293
|
+
wait(1.4);
|
|
294
|
+
|
|
295
|
+
par {
|
|
296
|
+
cam((cx, cy), 1, smooth);
|
|
297
|
+
zoom(1, 1, smooth);
|
|
298
|
+
}
|
|
299
|
+
wait(1.5);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Streamlines of potential flow around a spinning cylinder — the superposition
|
|
2
|
+
// that explains the Magnus effect (why a spun ball curves). Uniform flow (parallel
|
|
3
|
+
// streamlines) + a free vortex (concentric streamlines) superpose into the
|
|
4
|
+
// asymmetric flow around a rotating cylinder: bunched (fast, low-pressure) on one
|
|
5
|
+
// side, spread (slow, high-pressure) on the other → a net Magnus force. The combined
|
|
6
|
+
// streamlines are integrated straight from the velocity field with `trajectory`.
|
|
7
|
+
title("Why a Spinning Ball Curves");
|
|
8
|
+
canvas("16:9");
|
|
9
|
+
template("neon");
|
|
10
|
+
|
|
11
|
+
let ox = cx;
|
|
12
|
+
let oy = cy + 20;
|
|
13
|
+
let sc = 82; // px per field unit
|
|
14
|
+
let a = 98; // cylinder radius (px)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// --- stage 1: uniform flow = parallel streamlines ---
|
|
18
|
+
for k in 0..11 {
|
|
19
|
+
line(uni{k}, (ox-430, oy + (k-5)*44), (ox+430, oy + (k-5)*44));
|
|
20
|
+
color(uni{k}, cyan); untraced(uni{k}); tag(uni{k}, uniform);
|
|
21
|
+
}
|
|
22
|
+
// --- stage 2: a free vortex = concentric circular streamlines ---
|
|
23
|
+
for k in 0..5 {
|
|
24
|
+
circle(vor{k}, (ox, oy), 55 + k*52); color(vor{k}, magenta); untraced(vor{k}); tag(vor{k}, vortex);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// --- stage 3: the superposition — streamlines around the spinning cylinder ---
|
|
28
|
+
for i in 0..17 {
|
|
29
|
+
let y0 = -4.4 + i*0.55;
|
|
30
|
+
trajectory(fl{i},
|
|
31
|
+
"1 - 1.44*(x*x-y*y)/((x*x+y*y)^2) - 0.7*y/(x*x+y*y)",
|
|
32
|
+
"0 - 2.88*x*y/((x*x+y*y)^2) + 0.7*x/(x*x+y*y)",
|
|
33
|
+
(-4.6, y0), (ox, oy), sc, 520);
|
|
34
|
+
color(fl{i}, cyan); glow(fl{i}, 0.4); untraced(fl{i}); tag(fl{i}, combo);
|
|
35
|
+
}
|
|
36
|
+
circle(cyl, (ox, oy), a); color(cyl, gold); filled(cyl); hidden(cyl);
|
|
37
|
+
circle(cylo, (ox, oy), a); color(cylo, gold); outline(cylo, gold); hidden(cylo);
|
|
38
|
+
|
|
39
|
+
// spin arrow (clockwise) + labels + net force + Kutta–Joukowski
|
|
40
|
+
arrow(spinT, (ox-34, oy-a-8), (ox+34, oy-a-8)); color(spinT, gold); hidden(spinT);
|
|
41
|
+
arrow(spinB, (ox+34, oy+a+8), (ox-34, oy+a+8)); color(spinB, gold); hidden(spinB);
|
|
42
|
+
arrow(inflow, (ox-430, oy+230), (ox-330, oy+230)); color(inflow, dim); hidden(inflow);
|
|
43
|
+
text(inl, (ox-360, oy+205), "U"); size(inl, 22); color(inl, dim); hidden(inl);
|
|
44
|
+
arrow(force, (ox+a+70, oy+30), (ox+a+70, oy-90)); color(force, lime); stroke(force, 5); hidden(force);
|
|
45
|
+
text(fl_lab, (ox+a+150, oy-30), "Magnus\nforce"); size(fl_lab, 22); color(fl_lab, lime); hidden(fl_lab);
|
|
46
|
+
text(fast, (ox, oy-a-70), "streamlines bunch → faster → LOW pressure"); size(fast, 20); color(fast, cyan); wrap(fast, 520); hidden(fast);
|
|
47
|
+
text(slow, (ox, oy+a+70), "spread → slower → HIGH pressure"); size(slow, 20); color(slow, magenta); wrap(slow, 520); hidden(slow);
|
|
48
|
+
equation(kj, (cx, h-70), `L=\rho\,U\,\Gamma`, 40); color(kj, lime); hidden(kj);
|
|
49
|
+
|
|
50
|
+
text(cap, (cx, h-30), ""); size(cap, 22); color(cap, dim); wrap(cap, w*0.8); hidden(cap);
|
|
51
|
+
|
|
52
|
+
show(cap, 0.3);
|
|
53
|
+
|
|
54
|
+
// 1 — uniform flow
|
|
55
|
+
say(cap, "uniform flow — parallel streamlines");
|
|
56
|
+
stagger(0.05) { for k in 0..11 { draw(uni{k}, 0.6); } }
|
|
57
|
+
wait(0.6);
|
|
58
|
+
|
|
59
|
+
// 2 — a free vortex
|
|
60
|
+
say(cap, "a free vortex — concentric streamlines (the spin's circulation)");
|
|
61
|
+
stagger(0.08) { for k in 0..5 { draw(vor{k}, 0.7); } }
|
|
62
|
+
wait(0.7);
|
|
63
|
+
|
|
64
|
+
// 3 — superpose them
|
|
65
|
+
say(cap, "superpose them → the flow around a spinning cylinder");
|
|
66
|
+
par {
|
|
67
|
+
fade(uniform, 0.5); fade(vortex, 0.5);
|
|
68
|
+
show(cyl, 0.4); show(cylo, 0.4);
|
|
69
|
+
}
|
|
70
|
+
stagger(0.04) { for i in 0..17 { draw(fl{i}, 0.9); } }
|
|
71
|
+
wait(0.6);
|
|
72
|
+
|
|
73
|
+
// 4 — the asymmetry → pressure → force
|
|
74
|
+
say(cap, "the flow is faster on top, slower below — Bernoulli does the rest");
|
|
75
|
+
par {
|
|
76
|
+
show(spinT, 0.4); show(spinB, 0.4);
|
|
77
|
+
show(inflow, 0.4); show(inl, 0.4);
|
|
78
|
+
show(fast, 0.5); show(slow, 0.5);
|
|
79
|
+
}
|
|
80
|
+
wait(0.5);
|
|
81
|
+
par { show(force, 0.6); show(fl_lab, 0.5); show(kj, 0.5); }
|
|
82
|
+
wait(0.6);
|
|
83
|
+
|
|
84
|
+
// 5 — the payoff
|
|
85
|
+
say(cap, "a pressure difference pushes it sideways — the Magnus force that curls a free kick");
|
|
86
|
+
pulse(force, 0.8);
|
|
87
|
+
wait(1.6);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
title("A smooth curve through the data");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
text(hdr, (cx, 70), "Interpolation: one smooth curve through every point");
|
|
5
|
+
size(hdr, 26); color(hdr, cyan); bold(hdr); display(hdr); hidden(hdr);
|
|
6
|
+
|
|
7
|
+
// scattered data points — the spline passes through all of them
|
|
8
|
+
spline(s, (300, 620), (520, 340), (760, 560), (1000, 300), (1240, 480), (1500, 260));
|
|
9
|
+
color(s, cyan); stroke(s, 4); untraced(s);
|
|
10
|
+
|
|
11
|
+
text(cap, (cx, h - 60), "Catmull-Rom — it hits each knot exactly");
|
|
12
|
+
size(cap, 20); color(cap, dim); display(cap); hidden(cap);
|
|
13
|
+
|
|
14
|
+
// ---- timeline ----
|
|
15
|
+
show(hdr, 0.5);
|
|
16
|
+
// pop the knots in first
|
|
17
|
+
show(s.knots, 0.6);
|
|
18
|
+
wait(0.3);
|
|
19
|
+
// then trace the smooth curve through them
|
|
20
|
+
draw(s, 2.2);
|
|
21
|
+
show(cap, 0.4);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// spot-diagram.manic — a blur vs a point (lens quality, real optics)
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// Where does a bundle of rays actually LAND at focus? `spotdiagram` traces the
|
|
5
|
+
// real spherical surfaces and plots the hits. A fast single lens smears into a
|
|
6
|
+
// disc — the circle of least confusion from SPHERICAL ABERRATION — while a
|
|
7
|
+
// cemented doublet collapses to a point. The green dot is the ideal (point)
|
|
8
|
+
// focus; the RMS read-out is the blur radius. Both drawn to the SAME scale.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Spot Diagram — Blur vs Point");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
|
|
14
|
+
spotdiagram(bad, (370, 380), "singlet");
|
|
15
|
+
spotdiagram(good, (910, 380), "doublet");
|
|
16
|
+
|
|
17
|
+
text(cap, (cx, h - 46), ""); color(cap, fg); size(cap, 24); bold(cap); display(cap); sticky(cap);
|
|
18
|
+
|
|
19
|
+
// ================= THE SCENE =================
|
|
20
|
+
say(cap, "where do the rays actually land at focus?", 0.5);
|
|
21
|
+
wait(0.4);
|
|
22
|
+
|
|
23
|
+
say(cap, "a fast SINGLE lens → a blur disc (spherical aberration)", 0.3);
|
|
24
|
+
draw(bad.dots, 1.8);
|
|
25
|
+
wait(0.6);
|
|
26
|
+
|
|
27
|
+
say(cap, "a cemented DOUBLET → very nearly a point", 0.3);
|
|
28
|
+
draw(good.dots, 1.4);
|
|
29
|
+
wait(0.6);
|
|
30
|
+
|
|
31
|
+
say(cap, "same rays, same scale — RMS 4 px collapses to under 1 px", 0.3);
|
|
32
|
+
wait(1.2);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// spring-annotated.manic — ELEVATE a sim: typewriter narration + live data
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// One elevation flavour of several (see pulley-annotated for camera work,
|
|
5
|
+
// brachistochrone-annotated for kinetic typography). Here the story is told by
|
|
6
|
+
// a TYPEWRITER lab-note (`type` + `cursor`) and LIVE COUNTERS (`counter` +
|
|
7
|
+
// `to(_, value, …)`) that tick up — no stage-covering section cards, so the
|
|
8
|
+
// motion is never hidden. The spring's parts are ordinary entities the whole
|
|
9
|
+
// language drives directly.
|
|
10
|
+
// ============================================================================
|
|
11
|
+
|
|
12
|
+
title("Anatomy of a Spring — Hooke's Law & SHM");
|
|
13
|
+
canvas("16:9");
|
|
14
|
+
|
|
15
|
+
text(hdr, (cx, 40), "Anatomy of a Spring"); size(hdr, 28); color(hdr, cyan); bold(hdr); display(hdr); hidden(hdr);
|
|
16
|
+
|
|
17
|
+
// ---- the sim + views (staged) ----
|
|
18
|
+
spring(sp, (340, 320), 10, 1.4, 105);
|
|
19
|
+
hidden(sp.wall); hidden(sp.spring); hidden(sp.mass); hidden(sp.overlays);
|
|
20
|
+
untraced(sp.path);
|
|
21
|
+
well(sp, (1015, 230), 112); hidden(sp.well);
|
|
22
|
+
energygraph(sp, (1015, 480), 112); hidden(sp.energy);
|
|
23
|
+
|
|
24
|
+
// ---- part annotations ----
|
|
25
|
+
line(eq, (340, 268), (340, 372)); color(eq, dim); stroke(eq, 2); untraced(eq);
|
|
26
|
+
text(coilL, (285, 232), "spring, stiffness k"); size(coilL, 16); color(coilL, lime); display(coilL); hidden(coilL);
|
|
27
|
+
text(massL, (520, 272), "mass m"); size(massL, 16); color(massL, cyan); display(massL); hidden(massL);
|
|
28
|
+
bracelabel(xb, (340, 372), (487, 372), "x₀", 22); color(xb, gold); hidden(xb); hidden(xb.label);
|
|
29
|
+
text(hooke, (340, 168), "F = −k·x"); size(hooke, 24); color(hooke, gold); display(hooke); hidden(hooke);
|
|
30
|
+
|
|
31
|
+
// ---- a TYPEWRITER lab-note with a live cursor (the narration device) ----
|
|
32
|
+
text(note, (cx, h - 44), ""); size(note, 21); color(note, fg); display(note); cursor(note);
|
|
33
|
+
text(kick, (96, 92), ""); size(kick, 17); color(kick, magenta); bold(kick); display(kick);
|
|
34
|
+
|
|
35
|
+
// ---- LIVE COUNTERS (tick up on reveal) ----
|
|
36
|
+
counter(kC, (150, 470), 0, 1, "k = ", " N/m"); size(kC, 26); color(kC, lime); display(kC); hidden(kC);
|
|
37
|
+
counter(tC, (150, 512), 0, 2, "T = ", " s"); size(tC, 26); color(tC, cyan); display(tC); hidden(tC);
|
|
38
|
+
|
|
39
|
+
// ============================== SCRIPT ==============================
|
|
40
|
+
show(hdr, 0.5);
|
|
41
|
+
|
|
42
|
+
say(kick, "SETUP", 0.2);
|
|
43
|
+
say(note, "a wall, a coil of stiffness k, and a mass", 0.1); type(note, 1.4);
|
|
44
|
+
show(sp.wall, 0.4); pulse(sp.wall); show(coilL, 0.4);
|
|
45
|
+
show(sp.spring, 0.4); flash(sp.spring, lime); show(sp.mass, 0.4); pulse(sp.mass); show(massL, 0.4);
|
|
46
|
+
show(kC, 0.3); to(kC, value, 10, 0.8);
|
|
47
|
+
wait(0.5);
|
|
48
|
+
|
|
49
|
+
say(kick, "HOOKE'S LAW", 0.2);
|
|
50
|
+
say(note, "pull it x₀ from rest — it pulls back, F = −k·x", 0.1); type(note, 1.7);
|
|
51
|
+
draw(eq, 0.4); show(xb, 0.4); show(xb.label, 0.4); show(hooke, 0.4); flash(sp.spring, gold);
|
|
52
|
+
show(tC, 0.3); to(tC, value, 1.99, 0.9); // period 2π√(m/k)
|
|
53
|
+
wait(0.6);
|
|
54
|
+
fade(coilL, 0.3); fade(massL, 0.3); fade(xb, 0.3); fade(xb.label, 0.3); fade(hooke, 0.3);
|
|
55
|
+
wait(0.2);
|
|
56
|
+
|
|
57
|
+
say(kick, "MOTION", 0.2);
|
|
58
|
+
say(note, "release — simple harmonic motion; every panel tells the same swing", 0.1); type(note, 1.9);
|
|
59
|
+
show(sp.well, 0.5); show(sp.overlays, 0.4); show(sp.energy, 0.5); draw(sp.path, 0.6);
|
|
60
|
+
run(sp, 10);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// spring-chain.manic — three blocks joined by two springs on an incline: coupled
|
|
2
|
+
// oscillators / normal modes. `springchain(id,[center],[angle],[unit])`. A uniform
|
|
3
|
+
// gravity component doesn't change the internal motion, so it's shown in the
|
|
4
|
+
// incline's frame (CM held). `energygraph` shows the energy sloshing (beating).
|
|
5
|
+
title("Spring chain on an incline — coupled oscillators");
|
|
6
|
+
canvas("16:9");
|
|
7
|
+
text(hdr, (cx, 44), "Three masses, two springs — the energy sloshs between the modes"); size(hdr, 21); color(hdr, cyan); bold(hdr); display(hdr);
|
|
8
|
+
springchain(sc, (500, 300), 22);
|
|
9
|
+
energygraph(sc, (1010, 340), 120);
|
|
10
|
+
text(cap, (cx, h - 32), "pull one block and the whole chain rings — normal modes / beating (coupled springs)"); size(cap, 15); color(cap, dim); display(cap);
|
|
11
|
+
run(sc, 9);
|