@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,296 @@
|
|
|
1
|
+
title("Two Figures Meet, Shake Hands, and Continue Walking");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
let groundY = cy + 160;
|
|
5
|
+
let startX1 = cx - 420;
|
|
6
|
+
let startX2 = cx + 420;
|
|
7
|
+
let stepDist = 15;
|
|
8
|
+
let swingAmp = 26;
|
|
9
|
+
let bobAmp = 10;
|
|
10
|
+
let meetX = cx;
|
|
11
|
+
let endX1 = cx + 420;
|
|
12
|
+
let endX2 = cx - 420;
|
|
13
|
+
|
|
14
|
+
// ================= road =================
|
|
15
|
+
|
|
16
|
+
rect(road, (0, groundY), w, h - groundY);
|
|
17
|
+
color(road, dim);
|
|
18
|
+
filled(road);
|
|
19
|
+
untraced(road);
|
|
20
|
+
|
|
21
|
+
line(roadLine, (0, groundY + 40), (w, groundY + 40));
|
|
22
|
+
color(roadLine, panel);
|
|
23
|
+
stroke(roadLine, 2);
|
|
24
|
+
untraced(roadLine);
|
|
25
|
+
|
|
26
|
+
for i in 0..14 {
|
|
27
|
+
rect(dash{i}, (i*120 - 40, groundY + 36), 50, 8);
|
|
28
|
+
color(dash{i}, fg);
|
|
29
|
+
filled(dash{i});
|
|
30
|
+
untraced(dash{i});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ================= figure 1 (walks left -> right) =================
|
|
34
|
+
|
|
35
|
+
point(neck1, (startX1, groundY - 118));
|
|
36
|
+
point(hip1, (startX1, groundY - 10));
|
|
37
|
+
point(handL1, (startX1 - 30, groundY - 40));
|
|
38
|
+
point(handR1, (startX1 + 30, groundY - 40));
|
|
39
|
+
point(footL1, (startX1 - 30, groundY + 100));
|
|
40
|
+
point(footR1, (startX1 + 30, groundY + 100));
|
|
41
|
+
|
|
42
|
+
hidden(neck1); hidden(hip1);
|
|
43
|
+
hidden(handL1); hidden(handR1);
|
|
44
|
+
hidden(footL1); hidden(footR1);
|
|
45
|
+
|
|
46
|
+
circle(head1, (startX1, groundY - 140), 22);
|
|
47
|
+
color(head1, fg);
|
|
48
|
+
outlined(head1);
|
|
49
|
+
stroke(head1, 3);
|
|
50
|
+
untraced(head1);
|
|
51
|
+
|
|
52
|
+
segment(spine1, neck1, hip1);
|
|
53
|
+
segment(armL1, neck1, handL1);
|
|
54
|
+
segment(armR1, neck1, handR1);
|
|
55
|
+
segment(legL1, hip1, footL1);
|
|
56
|
+
segment(legR1, hip1, footR1);
|
|
57
|
+
|
|
58
|
+
color(spine1, fg);
|
|
59
|
+
color(armL1, cyan);
|
|
60
|
+
color(armR1, cyan);
|
|
61
|
+
color(legL1, gold);
|
|
62
|
+
color(legR1, gold);
|
|
63
|
+
stroke(spine1, 4); stroke(armL1, 4); stroke(armR1, 4);
|
|
64
|
+
stroke(legL1, 4); stroke(legR1, 4);
|
|
65
|
+
untraced(spine1); untraced(armL1); untraced(armR1);
|
|
66
|
+
untraced(legL1); untraced(legR1);
|
|
67
|
+
|
|
68
|
+
// ================= figure 2 (walks right -> left, mirrored) =================
|
|
69
|
+
|
|
70
|
+
point(neck2, (startX2, groundY - 118));
|
|
71
|
+
point(hip2, (startX2, groundY - 10));
|
|
72
|
+
point(handL2, (startX2 - 30, groundY - 40));
|
|
73
|
+
point(handR2, (startX2 + 30, groundY - 40));
|
|
74
|
+
point(footL2, (startX2 - 30, groundY + 100));
|
|
75
|
+
point(footR2, (startX2 + 30, groundY + 100));
|
|
76
|
+
|
|
77
|
+
hidden(neck2); hidden(hip2);
|
|
78
|
+
hidden(handL2); hidden(handR2);
|
|
79
|
+
hidden(footL2); hidden(footR2);
|
|
80
|
+
|
|
81
|
+
circle(head2, (startX2, groundY - 140), 22);
|
|
82
|
+
color(head2, fg);
|
|
83
|
+
outlined(head2);
|
|
84
|
+
stroke(head2, 3);
|
|
85
|
+
untraced(head2);
|
|
86
|
+
|
|
87
|
+
segment(spine2, neck2, hip2);
|
|
88
|
+
segment(armL2, neck2, handL2);
|
|
89
|
+
segment(armR2, neck2, handR2);
|
|
90
|
+
segment(legL2, hip2, footL2);
|
|
91
|
+
segment(legR2, hip2, footR2);
|
|
92
|
+
|
|
93
|
+
color(spine2, fg);
|
|
94
|
+
color(armL2, magenta);
|
|
95
|
+
color(armR2, magenta);
|
|
96
|
+
color(legL2, lime);
|
|
97
|
+
color(legR2, lime);
|
|
98
|
+
stroke(spine2, 4); stroke(armL2, 4); stroke(armR2, 4);
|
|
99
|
+
stroke(legL2, 4); stroke(legR2, 4);
|
|
100
|
+
untraced(spine2); untraced(armL2); untraced(armR2);
|
|
101
|
+
untraced(legL2); untraced(legR2);
|
|
102
|
+
|
|
103
|
+
// ================= text =================
|
|
104
|
+
|
|
105
|
+
text(head_label, (cx, 55), "Two Figures Meet, Shake Hands, and Continue Walking");
|
|
106
|
+
color(head_label, cyan);
|
|
107
|
+
hidden(head_label);
|
|
108
|
+
|
|
109
|
+
text(caption, (cx, h - 30), "");
|
|
110
|
+
color(caption, dim);
|
|
111
|
+
hidden(caption);
|
|
112
|
+
|
|
113
|
+
// ================= script =================
|
|
114
|
+
|
|
115
|
+
show(head_label, 0.6);
|
|
116
|
+
wait(0.3);
|
|
117
|
+
|
|
118
|
+
par {
|
|
119
|
+
draw(road, 0.5);
|
|
120
|
+
draw(roadLine, 0.5);
|
|
121
|
+
stagger(0.03) {
|
|
122
|
+
for i in 0..14 {
|
|
123
|
+
draw(dash{i}, 0.1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
par {
|
|
129
|
+
show(neck1, 0.01); show(hip1, 0.01);
|
|
130
|
+
show(handL1, 0.01); show(handR1, 0.01);
|
|
131
|
+
show(footL1, 0.01); show(footR1, 0.01);
|
|
132
|
+
draw(head1, 0.4);
|
|
133
|
+
draw(spine1, 0.3);
|
|
134
|
+
draw(armL1, 0.3);
|
|
135
|
+
draw(armR1, 0.3);
|
|
136
|
+
draw(legL1, 0.3);
|
|
137
|
+
draw(legR1, 0.3);
|
|
138
|
+
|
|
139
|
+
show(neck2, 0.01); show(hip2, 0.01);
|
|
140
|
+
show(handL2, 0.01); show(handR2, 0.01);
|
|
141
|
+
show(footL2, 0.01); show(footR2, 0.01);
|
|
142
|
+
draw(head2, 0.4);
|
|
143
|
+
draw(spine2, 0.3);
|
|
144
|
+
draw(armL2, 0.3);
|
|
145
|
+
draw(armR2, 0.3);
|
|
146
|
+
draw(legL2, 0.3);
|
|
147
|
+
draw(legR2, 0.3);
|
|
148
|
+
}
|
|
149
|
+
wait(0.3);
|
|
150
|
+
|
|
151
|
+
show(caption, 0.4);
|
|
152
|
+
say(caption, "Camera pulls back to see the whole road");
|
|
153
|
+
par {
|
|
154
|
+
cam((cx, cy), 1.0, smooth);
|
|
155
|
+
zoom(0.85, 1.0, smooth);
|
|
156
|
+
}
|
|
157
|
+
wait(0.3);
|
|
158
|
+
|
|
159
|
+
// --- walk cycle: both figures walk toward each other, meeting at meetX ---
|
|
160
|
+
|
|
161
|
+
for i in 0..24 {
|
|
162
|
+
let baseX1 = startX1 + i*stepDist;
|
|
163
|
+
let baseX2 = startX2 - i*stepDist;
|
|
164
|
+
let phase = i*90;
|
|
165
|
+
let swing = swingAmp*sin(phase*pi/180);
|
|
166
|
+
let legLift = bobAmp*abs(sin(phase*pi/180));
|
|
167
|
+
|
|
168
|
+
par {
|
|
169
|
+
move(neck1, (baseX1, groundY - 118 - legLift*0.4), 0.15, smooth);
|
|
170
|
+
move(hip1, (baseX1, groundY - 10), 0.15, smooth);
|
|
171
|
+
move(handL1, (baseX1 - swing, groundY - 40), 0.15, smooth);
|
|
172
|
+
move(handR1, (baseX1 + swing, groundY - 40), 0.15, smooth);
|
|
173
|
+
move(footL1, (baseX1 + swing, groundY + 100 - legLift), 0.15, smooth);
|
|
174
|
+
move(footR1, (baseX1 - swing, groundY + 100 - legLift), 0.15, smooth);
|
|
175
|
+
move(head1, (baseX1, groundY - 140 - legLift*0.4), 0.15, smooth);
|
|
176
|
+
|
|
177
|
+
move(neck2, (baseX2, groundY - 118 - legLift*0.4), 0.15, smooth);
|
|
178
|
+
move(hip2, (baseX2, groundY - 10), 0.15, smooth);
|
|
179
|
+
move(handL2, (baseX2 - swing, groundY - 40), 0.15, smooth);
|
|
180
|
+
move(handR2, (baseX2 + swing, groundY - 40), 0.15, smooth);
|
|
181
|
+
move(footL2, (baseX2 + swing, groundY + 100 - legLift), 0.15, smooth);
|
|
182
|
+
move(footR2, (baseX2 - swing, groundY + 100 - legLift), 0.15, smooth);
|
|
183
|
+
move(head2, (baseX2, groundY - 140 - legLift*0.4), 0.15, smooth);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
wait(0.2);
|
|
188
|
+
say(caption, "They arrive face to face");
|
|
189
|
+
par {
|
|
190
|
+
cam((meetX, groundY - 80), 1.2, smooth);
|
|
191
|
+
zoom(1.8, 1.2, smooth);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// settle into a standing pose facing each other
|
|
195
|
+
par {
|
|
196
|
+
move(neck1, (meetX - 40, groundY - 118), 0.3, smooth);
|
|
197
|
+
move(hip1, (meetX - 40, groundY - 10), 0.3, smooth);
|
|
198
|
+
move(footL1, (meetX - 60, groundY + 100), 0.3, smooth);
|
|
199
|
+
move(footR1, (meetX - 20, groundY + 100), 0.3, smooth);
|
|
200
|
+
move(head1, (meetX - 40, groundY - 140), 0.3, smooth);
|
|
201
|
+
move(handL1, (meetX - 70, groundY - 40), 0.3, smooth);
|
|
202
|
+
|
|
203
|
+
move(neck2, (meetX + 40, groundY - 118), 0.3, smooth);
|
|
204
|
+
move(hip2, (meetX + 40, groundY - 10), 0.3, smooth);
|
|
205
|
+
move(footL2, (meetX + 60, groundY + 100), 0.3, smooth);
|
|
206
|
+
move(footR2, (meetX + 20, groundY + 100), 0.3, smooth);
|
|
207
|
+
move(head2, (meetX + 40, groundY - 140), 0.3, smooth);
|
|
208
|
+
move(handR2, (meetX + 70, groundY - 40), 0.3, smooth);
|
|
209
|
+
}
|
|
210
|
+
wait(0.3);
|
|
211
|
+
|
|
212
|
+
say(caption, "Reaching out to shake hands");
|
|
213
|
+
|
|
214
|
+
par {
|
|
215
|
+
move(handR1, (meetX - 5, groundY - 55), 0.4, smooth);
|
|
216
|
+
move(handL2, (meetX + 5, groundY - 55), 0.4, smooth);
|
|
217
|
+
}
|
|
218
|
+
wait(0.2);
|
|
219
|
+
|
|
220
|
+
par {
|
|
221
|
+
move(handR1, (meetX, groundY - 55), 0.25, smooth);
|
|
222
|
+
move(handL2, (meetX, groundY - 55), 0.25, smooth);
|
|
223
|
+
}
|
|
224
|
+
wait(0.2);
|
|
225
|
+
|
|
226
|
+
say(caption, "Shaking hands");
|
|
227
|
+
|
|
228
|
+
for i in 0..4 {
|
|
229
|
+
par {
|
|
230
|
+
move(handR1, (meetX, groundY - 65), 0.12, smooth);
|
|
231
|
+
move(handL2, (meetX, groundY - 65), 0.12, smooth);
|
|
232
|
+
}
|
|
233
|
+
par {
|
|
234
|
+
move(handR1, (meetX, groundY - 48), 0.12, smooth);
|
|
235
|
+
move(handL2, (meetX, groundY - 48), 0.12, smooth);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
par {
|
|
240
|
+
move(handR1, (meetX, groundY - 55), 0.15, smooth);
|
|
241
|
+
move(handL2, (meetX, groundY - 55), 0.15, smooth);
|
|
242
|
+
}
|
|
243
|
+
wait(0.3);
|
|
244
|
+
|
|
245
|
+
flash(handR1, gold);
|
|
246
|
+
flash(handL2, gold);
|
|
247
|
+
wait(0.3);
|
|
248
|
+
|
|
249
|
+
say(caption, "Letting go and continuing on their separate ways");
|
|
250
|
+
par {
|
|
251
|
+
cam((cx, cy), 1.2, smooth);
|
|
252
|
+
zoom(1, 1.2, smooth);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// release hands back to normal swing position before resuming walk
|
|
256
|
+
par {
|
|
257
|
+
move(handR1, (meetX - 40 + 30, groundY - 40), 0.25, smooth);
|
|
258
|
+
move(handL2, (meetX + 40 - 30, groundY - 40), 0.25, smooth);
|
|
259
|
+
}
|
|
260
|
+
wait(0.2);
|
|
261
|
+
|
|
262
|
+
// --- resume walk cycle: figure1 continues toward endX1, figure2 toward endX2 ---
|
|
263
|
+
|
|
264
|
+
for i in 0..24 {
|
|
265
|
+
let baseX1 = (meetX - 40) + i*stepDist;
|
|
266
|
+
let baseX2 = (meetX + 40) - i*stepDist;
|
|
267
|
+
let phase = i*90;
|
|
268
|
+
let swing = swingAmp*sin(phase*pi/180);
|
|
269
|
+
let legLift = bobAmp*abs(sin(phase*pi/180));
|
|
270
|
+
|
|
271
|
+
par {
|
|
272
|
+
move(neck1, (baseX1, groundY - 118 - legLift*0.4), 0.15, smooth);
|
|
273
|
+
move(hip1, (baseX1, groundY - 10), 0.15, smooth);
|
|
274
|
+
move(handL1, (baseX1 - swing, groundY - 40), 0.15, smooth);
|
|
275
|
+
move(handR1, (baseX1 + swing, groundY - 40), 0.15, smooth);
|
|
276
|
+
move(footL1, (baseX1 + swing, groundY + 100 - legLift), 0.15, smooth);
|
|
277
|
+
move(footR1, (baseX1 - swing, groundY + 100 - legLift), 0.15, smooth);
|
|
278
|
+
move(head1, (baseX1, groundY - 140 - legLift*0.4), 0.15, smooth);
|
|
279
|
+
|
|
280
|
+
move(neck2, (baseX2, groundY - 118 - legLift*0.4), 0.15, smooth);
|
|
281
|
+
move(hip2, (baseX2, groundY - 10), 0.15, smooth);
|
|
282
|
+
move(handL2, (baseX2 - swing, groundY - 40), 0.15, smooth);
|
|
283
|
+
move(handR2, (baseX2 + swing, groundY - 40), 0.15, smooth);
|
|
284
|
+
move(footL2, (baseX2 + swing, groundY + 100 - legLift), 0.15, smooth);
|
|
285
|
+
move(footR2, (baseX2 - swing, groundY + 100 - legLift), 0.15, smooth);
|
|
286
|
+
move(head2, (baseX2, groundY - 140 - legLift*0.4), 0.15, smooth);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
wait(0.3);
|
|
291
|
+
say(caption, "Two generic stick figures -- no specific persons depicted");
|
|
292
|
+
par {
|
|
293
|
+
cam((cx, cy), 1.0, smooth);
|
|
294
|
+
zoom(0.85, 1.0, smooth);
|
|
295
|
+
}
|
|
296
|
+
wait(0.4);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Two Pointers — the `pointer`/`pointat` primitive. `pointer(id, arr, slot, label)`
|
|
2
|
+
// drops a caret under a slot; `pointat(id, arr, slot)` slides it to another slot
|
|
3
|
+
// (its label follows). Pointers track slot *positions*, so they stay put as
|
|
4
|
+
// values move. Here `lo`/`hi` scan inward on a sorted array.
|
|
5
|
+
//
|
|
6
|
+
// manic examples/two_pointer.manic
|
|
7
|
+
|
|
8
|
+
title("Two Pointers");
|
|
9
|
+
canvas("16:9");
|
|
10
|
+
|
|
11
|
+
text(head, (cx, 120), "two pointers scan toward the middle");
|
|
12
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
13
|
+
text(cap, (cx, 560), ""); color(cap, dim); size(cap, 26);
|
|
14
|
+
|
|
15
|
+
array(a, "1 3 5 7 9 11", (cx, 340), 92, 92);
|
|
16
|
+
pointer(lo, a, 0, "lo");
|
|
17
|
+
pointer(hi, a, 5, "hi");
|
|
18
|
+
|
|
19
|
+
show(head, 0.5);
|
|
20
|
+
say(cap, "start at both ends");
|
|
21
|
+
wait(0.5);
|
|
22
|
+
compare(a, 0, 5);
|
|
23
|
+
|
|
24
|
+
say(cap, "step both inward");
|
|
25
|
+
par { pointat(lo, a, 1); pointat(hi, a, 4); }
|
|
26
|
+
compare(a, 1, 4);
|
|
27
|
+
|
|
28
|
+
par { pointat(lo, a, 2); pointat(hi, a, 3); }
|
|
29
|
+
compare(a, 2, 3);
|
|
30
|
+
|
|
31
|
+
say(cap, "the pointers have met");
|
|
32
|
+
wait(1.2);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// type-to-sdf — flat 2D typography dismantled into a point field, rebuilt as
|
|
2
|
+
// reactive 3D signed-distance volumes, then handed to raw GLSL.
|
|
3
|
+
// act 1 cloud ... from text("SDF") - the glyphs dissolve into positions
|
|
4
|
+
// act 2 raymarch, ALL-SCALAR - S, D, F re-authored as SDF volumes
|
|
5
|
+
// (scalar-only => GPU transpile; parameters bind as uniforms;
|
|
6
|
+
// tori are carved with box INTERSECTIONS, no rot2/vec2 anywhere)
|
|
7
|
+
// act 3 glsl - the SAME sliders drive raw GLSL
|
|
8
|
+
// Three UI parameters are the whole interface: weight / wave / melt.
|
|
9
|
+
title("Type, Dismantled");
|
|
10
|
+
canvas("16:9");
|
|
11
|
+
template("black");
|
|
12
|
+
|
|
13
|
+
// ---------- HUD ----------
|
|
14
|
+
text(head, (cx, 60), "Type, Dismantled: Flat Glyphs to SDF Volumes"); display(head); cursor(head);
|
|
15
|
+
text(cap, (cx, h - 42), ""); size(cap, 26);
|
|
16
|
+
|
|
17
|
+
// the UI: three sliders, visibly driving everything
|
|
18
|
+
parameter(wgt, (w - 180, 150), 0.15, 0, 1, "weight", 2);
|
|
19
|
+
parameter(wav, (w - 180, 220), 0, 0, 1, "wave", 2);
|
|
20
|
+
parameter(mlt, (w - 180, 290), 0, 0, 1, "melt", 2);
|
|
21
|
+
|
|
22
|
+
// ---------- act 1: the glyph field ----------
|
|
23
|
+
// 2600 points born INSIDE the glyphs of "SDF"; each remembers home (hx, hy).
|
|
24
|
+
// They swarm out at t~3.2 and fly home at t~6 - the word dismantled and recalled.
|
|
25
|
+
cloud(dust, 2600, #ffffff, 0.9) from text("SDF") {
|
|
26
|
+
let rn = mod(abs(sin(i * 12.9898) * 43758.55), 1);
|
|
27
|
+
let sc = smoothstep(3.2, 4.6, t) - smoothstep(6.0, 7.6, t);
|
|
28
|
+
let ang = i * 2.399;
|
|
29
|
+
let rad = 40 + 230 * rn;
|
|
30
|
+
let x = hx + sc * rad * cos(ang + 0.5 * t);
|
|
31
|
+
let y = hy + sc * rad * sin(ang + 0.5 * t) * 0.8;
|
|
32
|
+
let r = 1.6 + 1.4 * rn;
|
|
33
|
+
let hue = 190 + 50 * sin(0.7 * i + t);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ---------- act 2: the volumes ----------
|
|
37
|
+
camera3((0, -4.6, 1.6), (0, 0, 0.95), 40);
|
|
38
|
+
|
|
39
|
+
raymarch(vol) {
|
|
40
|
+
// domain warp: the WAVE slider bends the coordinate field itself
|
|
41
|
+
let xw = x + wav * 0.16 * sin(2.6 * z + 2 * t);
|
|
42
|
+
let zw = z + wav * 0.10 * sin(2.2 * x - 1.6 * t);
|
|
43
|
+
// ---- S (at x = -1.5): two torus arcs, quadrants removed by intersection
|
|
44
|
+
let sx = xw + 1.5;
|
|
45
|
+
let torU = sdtorus(sx, zw - 1.15, y, 0.26, 0.09);
|
|
46
|
+
let torL = sdtorus(sx, zw - 0.63, y, 0.26, 0.09);
|
|
47
|
+
let upC = smin(sdint(torU, sdbox3(sx + 0.30, y, zw - 1.15, 0.32, 0.6, 0.45)), sdint(torU, sdbox3(sx, y, zw - 1.32, 0.6, 0.6, 0.20)), 0.02);
|
|
48
|
+
let loC = smin(sdint(torL, sdbox3(sx - 0.30, y, zw - 0.63, 0.32, 0.6, 0.45)), sdint(torL, sdbox3(sx, y, zw - 0.44, 0.6, 0.6, 0.20)), 0.02);
|
|
49
|
+
let dS = smin(upC, loC, 0.05);
|
|
50
|
+
// ---- D (at x = 0): stem + right half of a ring
|
|
51
|
+
let stemD = sdbox3(xw + 0.26, y, zw - 0.9, 0.09, 0.10, 0.55);
|
|
52
|
+
let bowl = sdint(sdtorus(xw + 0.10, zw - 0.9, y, 0.36, 0.09), sdbox3(xw - 0.22, y, zw - 0.9, 0.34, 0.6, 0.6));
|
|
53
|
+
let dD = smin(stemD, bowl, 0.05);
|
|
54
|
+
// ---- F (at x = +1.5): stem + two arms
|
|
55
|
+
let fx = xw - 1.5;
|
|
56
|
+
let stemF = sdbox3(fx + 0.22, y, zw - 0.9, 0.09, 0.10, 0.55);
|
|
57
|
+
let armT = sdbox3(fx, y, zw - 1.36, 0.30, 0.10, 0.09);
|
|
58
|
+
let armM = sdbox3(fx - 0.03, y, zw - 0.98, 0.24, 0.10, 0.08);
|
|
59
|
+
let dF = smin(stemF, smin(armT, armM, 0.03), 0.05);
|
|
60
|
+
// ---- the word: MELT widens the union until letterforms dissolve;
|
|
61
|
+
// WEIGHT is one sdround inflation - bold is literally deeper
|
|
62
|
+
let k = 0.05 + 0.5 * mlt;
|
|
63
|
+
let word = smin(smin(dS, dD, k), dF, k);
|
|
64
|
+
let fluid = mlt * 0.03 * sin(5 * xw + 2.4 * t) * sin(4 * zw - 1.8 * t);
|
|
65
|
+
let d = sdround(word, 0.02 + 0.09 * wgt) + fluid;
|
|
66
|
+
let hue = 190 + 40 * nx + 50 * mlt + 20 * sin(3 * hz + t);
|
|
67
|
+
let sat = 0.75;
|
|
68
|
+
let val = 0.9 + 0.1 * nz;
|
|
69
|
+
let alpha = 1;
|
|
70
|
+
}
|
|
71
|
+
hidden(vol);
|
|
72
|
+
|
|
73
|
+
// ---------- act 3: the same sliders, raw GLSL ----------
|
|
74
|
+
glsl(neon, `
|
|
75
|
+
uniform float u_wgt;
|
|
76
|
+
uniform float u_mlt;
|
|
77
|
+
float smin2(float a, float b, float k){ float h = clamp(0.5 + 0.5*(b - a)/k, 0.0, 1.0); return mix(b, a, h) - k*h*(1.0 - h); }
|
|
78
|
+
void mainImage(out vec4 O, in vec2 I){
|
|
79
|
+
vec2 p = (2.0*I - iResolution.xy)/iResolution.y;
|
|
80
|
+
float k = 0.15 + 0.6*u_mlt;
|
|
81
|
+
float d = 1e5;
|
|
82
|
+
for (int i = 0; i < 3; i++) {
|
|
83
|
+
float fi = float(i);
|
|
84
|
+
vec2 c = vec2(-0.9 + 0.9*fi, 0.12*sin(iTime*1.3 + fi*2.1));
|
|
85
|
+
float r = 0.26 + 0.12*u_wgt + 0.05*sin(iTime*2.0 + fi);
|
|
86
|
+
d = smin2(d, length(p - c) - r, k);
|
|
87
|
+
}
|
|
88
|
+
float glow = pow(0.02/max(abs(d), 0.004), 0.9);
|
|
89
|
+
vec3 col = glow * mix(vec3(0.1, 0.8, 1.0), vec3(1.0, 0.4, 0.9), 0.5 + 0.5*sin(3.0*u_mlt + p.x));
|
|
90
|
+
O = vec4(col, clamp(glow, 0.0, 1.0));
|
|
91
|
+
}
|
|
92
|
+
`);
|
|
93
|
+
hidden(neon);
|
|
94
|
+
|
|
95
|
+
// ================= timeline =================
|
|
96
|
+
|
|
97
|
+
// ---- act 1: flat, then dismantled
|
|
98
|
+
type(head, 1.1);
|
|
99
|
+
say(cap, "this is type as your screen stores it: flat outlines, frozen in place", 0.6);
|
|
100
|
+
wait(1.4);
|
|
101
|
+
cue(whoosh);
|
|
102
|
+
say(cap, "step one: DISMANTLE - a glyph is nothing but a field of positions", 0.5);
|
|
103
|
+
wait(2.6);
|
|
104
|
+
say(cap, "...and every position remembers home", 0.5);
|
|
105
|
+
wait(2.6);
|
|
106
|
+
|
|
107
|
+
// ---- act 2: rebuilt as signed-distance volumes
|
|
108
|
+
cue(whoosh);
|
|
109
|
+
par { fade(dust, 0.9); show(vol, 1.2); }
|
|
110
|
+
say(cap, "step two: REBUILD - each letter re-authored as a signed distance volume", 0.5);
|
|
111
|
+
orbit3(-24, 16, 5.0, 2.0, smooth);
|
|
112
|
+
|
|
113
|
+
// weight: variable font, one number
|
|
114
|
+
cue(tick);
|
|
115
|
+
say(cap, "one slider inflates every stroke: WEIGHT - bold is literally deeper", 0.5);
|
|
116
|
+
to(wgt, value, 1, 1.6, smooth);
|
|
117
|
+
to(wgt, value, 0.35, 1.2, smooth);
|
|
118
|
+
|
|
119
|
+
// wave: the coordinate field bends
|
|
120
|
+
cue(tick);
|
|
121
|
+
say(cap, "WAVE bends the coordinate field itself - the letters ride it", 0.5);
|
|
122
|
+
par { to(wav, value, 1, 1.8, smooth); orbit3(18, 22, 4.8, 1.8, smooth); }
|
|
123
|
+
to(wav, value, 0.35, 1.2, smooth);
|
|
124
|
+
|
|
125
|
+
// melt: typography as fluid
|
|
126
|
+
cue(pop);
|
|
127
|
+
say(cap, "MELT widens the union - and the word forgets its letterforms", 0.5);
|
|
128
|
+
par { to(mlt, value, 1, 2.6, smooth); orbit3(40, 14, 5.2, 2.6, smooth); }
|
|
129
|
+
wait(1.0);
|
|
130
|
+
|
|
131
|
+
// ---- act 3: the bridge to raw GLSL
|
|
132
|
+
cue(chime);
|
|
133
|
+
say(cap, "step three: the SAME sliders, handed to raw GLSL at full resolution", 0.5);
|
|
134
|
+
par { fade(vol, 1.0); show(neon, 1.0); }
|
|
135
|
+
to(mlt, value, 0.25, 1.6, smooth);
|
|
136
|
+
par { to(mlt, value, 0.9, 1.8, smooth); to(wgt, value, 0.8, 1.8, smooth); }
|
|
137
|
+
to(wgt, value, 0.3, 1.4, smooth);
|
|
138
|
+
say(cap, "flat vectors in - living volumes out", 0.6);
|
|
139
|
+
wait(2.5);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Typewriter — text revealed letter by letter (Manim's AddTextLetterByLetter),
|
|
2
|
+
// then removed letter by letter (RemoveTextLetterByLetter). `type` animates the
|
|
3
|
+
// text's `trace` 0->1 (a fraction of characters shown); `erase` runs it back.
|
|
4
|
+
// Declare the text `untraced` so it starts hidden, then `type` reveals it.
|
|
5
|
+
//
|
|
6
|
+
// manic examples/typewriter.manic
|
|
7
|
+
|
|
8
|
+
title("Typewriter");
|
|
9
|
+
canvas("16:9");
|
|
10
|
+
|
|
11
|
+
text(head, (cx, 150), "text, one letter at a time");
|
|
12
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
13
|
+
|
|
14
|
+
// untraced = trace 0 = no characters shown yet
|
|
15
|
+
text(line1, (cx, 320), "the quick brown fox"); color(line1, lime); size(line1, 44); untraced(line1);
|
|
16
|
+
text(line2, (cx, 400), "jumps over the lazy dog"); color(line2, cyan); size(line2, 44); untraced(line2);
|
|
17
|
+
cursor(line2); // this line types with a trailing cursor
|
|
18
|
+
|
|
19
|
+
// --- script ---
|
|
20
|
+
show(head, 0.5);
|
|
21
|
+
type(line1, 1.6); // AddTextLetterByLetter
|
|
22
|
+
type(line2, 1.6); // AddTextLetterByLetter, with a cursor
|
|
23
|
+
wait(1.0);
|
|
24
|
+
|
|
25
|
+
section("...and back");
|
|
26
|
+
erase(line2, 1.0); // RemoveTextLetterByLetter
|
|
27
|
+
erase(line1, 1.0);
|
|
28
|
+
wait(0.8);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Vector Field — a grid of arrows sampling a named field, coloured by
|
|
2
|
+
// magnitude (cyan → lime → magenta), à la Manim's ArrowVectorField.
|
|
3
|
+
//
|
|
4
|
+
// manic examples/vector_field.manic
|
|
5
|
+
// manic examples/vector_field.manic --record out --fps 60
|
|
6
|
+
//
|
|
7
|
+
// Named fields: radial, sink, swirl, saddle, wave, shear, uniform, spiral.
|
|
8
|
+
|
|
9
|
+
title("Vector Field");
|
|
10
|
+
canvas(1280, 720);
|
|
11
|
+
|
|
12
|
+
text(head, (640, 118), ""); display(head); color(head, cyan); size(head, 34); hidden(head);
|
|
13
|
+
text(cap, (640, 668), ""); color(cap, dim); size(cap, 22);
|
|
14
|
+
|
|
15
|
+
// two fields, revealed in turn
|
|
16
|
+
arrowfield(swirl, (640, 384), 520, 250, swirl, 15);
|
|
17
|
+
untraced(swirl);
|
|
18
|
+
arrowfield(rad, (640, 384), 520, 250, radial, 15);
|
|
19
|
+
untraced(rad); hidden(rad);
|
|
20
|
+
|
|
21
|
+
show(head, 0.4);
|
|
22
|
+
say(head, "swirl");
|
|
23
|
+
say(cap, "a rotational field: (-y, x)");
|
|
24
|
+
draw(swirl, 1.2);
|
|
25
|
+
wait(1.0);
|
|
26
|
+
|
|
27
|
+
section("Radial");
|
|
28
|
+
say(head, "radial");
|
|
29
|
+
say(cap, "an outward source: (x, y) — arrows grow with distance");
|
|
30
|
+
par { fade(swirl, 0.5); show(rad, 0.01); }
|
|
31
|
+
draw(rad, 1.2);
|
|
32
|
+
wait(1.2);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// vertical-spring.manic — a mass bobbing on a vertical spring under gravity.
|
|
2
|
+
title("Vertical spring — bobbing under gravity");
|
|
3
|
+
canvas("16:9");
|
|
4
|
+
text(hdr,(cx,44),"Vertical spring — a mass bobs about its stretched equilibrium"); size(hdr,22); color(hdr,cyan); bold(hdr); display(hdr);
|
|
5
|
+
verticalspring(vs, (400,170), 0.7);
|
|
6
|
+
untraced(vs.path);
|
|
7
|
+
phase(vs, (900,190), 95); // d vs ḋ
|
|
8
|
+
well(vs, (900,470), 95); // parabolic well (shifted by gravity)
|
|
9
|
+
text(cap,(cx,h-32),"gravity shifts the equilibrium down; the well is still a parabola"); size(cap,16); color(cap,dim); display(cap);
|
|
10
|
+
par { run(vs, 10); draw(vs.path, 10); }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
title("Volume under a surface — a double integral, made solid");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
camera3((9, -11, 8), (0, 0, 0.6), 40);
|
|
5
|
+
axes3(world, (0, 0, 0), 3);
|
|
6
|
+
color(world, dim);
|
|
7
|
+
|
|
8
|
+
// a smooth bump
|
|
9
|
+
surface3(hill, "1.6*exp(-(x*x + y*y)*0.28)", (-3, 3), (-3, 3), 28);
|
|
10
|
+
color(hill, cyan); untraced(hill);
|
|
11
|
+
|
|
12
|
+
// the volume beneath it, as a grid of columns (a 3D Riemann sum)
|
|
13
|
+
volume3(vol, hill, 11);
|
|
14
|
+
color(vol, lime); hidden(vol);
|
|
15
|
+
|
|
16
|
+
// ---- timeline ----
|
|
17
|
+
show(world, 0.6);
|
|
18
|
+
draw(hill, 1.6);
|
|
19
|
+
wait(0.4);
|
|
20
|
+
show(vol, 1.0);
|
|
21
|
+
orbit3(70, 32, 16, 4.5);
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// volumes-solid-of-revolution — Plate IX of the Problem Book, built from the
|
|
2
|
+
// classic slide: y = sqrt(x) rotated about the x-axis on [0, 4]; find the
|
|
3
|
+
// volume. Fig (a): the region + one red strip R(x) = sqrt(x). Fig (b): the
|
|
4
|
+
// solid, with that same strip now a red DISC. The slide's equation chain is
|
|
5
|
+
// replayed verbatim by rewrite: pi R^2 (thickness) -> pi ∫ x dx -> 8 pi.
|
|
6
|
+
// (revolve3 spins about the vertical axis, so we stand the x-axis upright -
|
|
7
|
+
// then roll3(90) lays the finished solid back down, just like the book.)
|
|
8
|
+
title("Volumes - Solid of Revolution");
|
|
9
|
+
canvas("16:9");
|
|
10
|
+
template("paper");
|
|
11
|
+
masthead("The Problem Book", "Plate IX");
|
|
12
|
+
|
|
13
|
+
// ---------- HUD ----------
|
|
14
|
+
text(head, (cx, 96), "Volumes - Solid of Revolution"); display(head); cursor(head);
|
|
15
|
+
text(sub, (cx, 140), `$y=\sqrt{x}$ rotated about the x-axis on [0, 4] - find the volume of the solid`); size(sub, 26); color(sub, teal); hidden(sub);
|
|
16
|
+
text(cap, (cx, h - 40), ""); size(cap, 26);
|
|
17
|
+
text(figl, (455, 640), ""); size(figl, 24); color(figl, dim);
|
|
18
|
+
counter(vol, (w - 185, 130), 0, 2, "V = ", ""); color(vol, gold); hidden(vol);
|
|
19
|
+
|
|
20
|
+
// the slide's derivation, one living equation
|
|
21
|
+
equation(eqV, (955, 250), `V_{\text{disk}} \;=\; \pi R^{2}\,(\text{thickness})`, 30); hidden(eqV);
|
|
22
|
+
|
|
23
|
+
// ---------- fig (a): the region and one strip ----------
|
|
24
|
+
let gx = 240;
|
|
25
|
+
let gy = 520;
|
|
26
|
+
arrow(xax, (gx - 60, gy), (gx + 4*110 + 60, gy)); untraced(xax); stroke(xax, 3); tag(xax, f2);
|
|
27
|
+
arrow(yax, (gx, gy), (gx, 195)); untraced(yax); stroke(yax, 3); tag(yax, f2);
|
|
28
|
+
text(xl0, (gx, gy + 26), "0"); size(xl0, 22); color(xl0, dim); hidden(xl0); tag(xl0, f2);
|
|
29
|
+
text(xl4, (gx + 440, gy + 26), "4"); size(xl4, 22); color(xl4, dim); hidden(xl4); tag(xl4, f2);
|
|
30
|
+
plot(rq, (gx, gy), 110, 150, "sqrt(x)", (0, 4));
|
|
31
|
+
untraced(rq); stroke(rq, 4); color(rq, blue); tag(rq, f2);
|
|
32
|
+
dot(rider, (gx, gy), 7); color(rider, gold); glow(rider, 8); hidden(rider); tag(rider, f2);
|
|
33
|
+
area(arq, rq, 0, 0); color(arq, cyan); opacity(arq, 0.3); tag(arq, f2);
|
|
34
|
+
// the representative strip at x = 2.25 (declared low, rises into place)
|
|
35
|
+
rect(strip, (gx + 2.25*110, gy - 1.5*150/2 + 24), 14, 1.5*150);
|
|
36
|
+
color(strip, red); opacity(strip, 0.85); hidden(strip); tag(strip, f2);
|
|
37
|
+
text(rlab, (gx + 2.25*110 + 128, gy - 140), `$R(x)=\sqrt{x}$`); size(rlab, 26); color(rlab, red); hidden(rlab); tag(rlab, f2);
|
|
38
|
+
|
|
39
|
+
// ---------- fig (b): the solid ----------
|
|
40
|
+
camera3((5.2, -6.2, 3.6), (0, 0, 1.5), 42);
|
|
41
|
+
curve3(prof, "sqrt(t)", "0", "t", (0, 4)); untraced(prof); thick(prof, 0.04); color(prof, blue);
|
|
42
|
+
revolve3(ghost, (0, 0, 0), "sqrt(t)", (0, 4), 64);
|
|
43
|
+
finish3(ghost, "wire=1"); color(ghost, teal); opacity(ghost, 0.35); untraced(ghost);
|
|
44
|
+
revolve3(solid, (0, 0, 0), "sqrt(t)", (0, 4), 64);
|
|
45
|
+
finish3(solid, "shading=smooth depth=0.2 shadow=0.2"); color(solid, gold); opacity(solid, 0.9); hidden(solid);
|
|
46
|
+
// the same strip, now a red disc at x = 2.25 with R = 1.5
|
|
47
|
+
prism3(slice, (0, 0, 2.25), 48, 1.5, 0.16); color(slice, red); hidden(slice);
|
|
48
|
+
arrow3(rarr, (0, 0, 2.25), (1.5, 0, 2.25)); thick(rarr, 0.03); color(rarr, red); untraced(rarr);
|
|
49
|
+
text(rlab3, (cx, cy), `$R(x)=\sqrt{x}$`); size(rlab3, 26); color(rlab3, red); hidden(rlab3);
|
|
50
|
+
pin3(rlab3, (0.9, 0, 2.6), (0, -28));
|
|
51
|
+
text(ax4, (cx, cy), "x = 4"); size(ax4, 22); color(ax4, dim); hidden(ax4);
|
|
52
|
+
pin3(ax4, (0, 0, 4.2), (0, -14));
|
|
53
|
+
|
|
54
|
+
// ================= timeline =================
|
|
55
|
+
|
|
56
|
+
// ---- the problem
|
|
57
|
+
type(head, 1.1);
|
|
58
|
+
show(sub, 0.6);
|
|
59
|
+
say(figl, "Fig. (a) - the region and one strip", 0.3);
|
|
60
|
+
par { draw(xax, 0.6); draw(yax, 0.6); show(xl0, 0.5); show(xl4, 0.5); }
|
|
61
|
+
show(rider, 0.2);
|
|
62
|
+
par { draw(rq, 1.3); travel(rider, rq, 1.3, smooth); }
|
|
63
|
+
fade(rider, 0.3);
|
|
64
|
+
say(cap, `the region under $y=\sqrt{x}$, from 0 to 4`, 0.5);
|
|
65
|
+
to(arq, x, 4, 1.6, smooth);
|
|
66
|
+
par { show(strip, 0.4); shift(strip, (0, -24), 0.4, out); show(rlab, 0.5); }
|
|
67
|
+
pulse(strip, 0.8);
|
|
68
|
+
say(cap, `one strip at $x$, height $R(x)=\sqrt{x}$ - now SPIN it around the x-axis`, 0.5);
|
|
69
|
+
cue(whoosh);
|
|
70
|
+
|
|
71
|
+
// ---- the derivation begins
|
|
72
|
+
show(eqV, 0.6);
|
|
73
|
+
wait(0.9);
|
|
74
|
+
cue(tick);
|
|
75
|
+
rewrite(eqV, `V \;=\; \pi\!\int_{0}^{4}\big(\sqrt{x}\,\big)^{2}\,dx`, 0.9);
|
|
76
|
+
say(cap, "each strip sweeps a disc: area pi R squared, thickness dx", 0.5);
|
|
77
|
+
cue(tick);
|
|
78
|
+
rewrite(eqV, `V \;=\; \pi\!\int_{0}^{4} x\,dx`, 0.9);
|
|
79
|
+
say(cap, "square the square root - the integrand collapses to plain x", 0.5);
|
|
80
|
+
wait(0.8);
|
|
81
|
+
|
|
82
|
+
// ---- fig (b): the solid generated
|
|
83
|
+
say(figl, "Fig. (b) - the solid generated", 0.3);
|
|
84
|
+
fade(f2, 0.7);
|
|
85
|
+
draw(prof, 1.2);
|
|
86
|
+
par { turn3(prof, (0, 0, 2), z, 360, 2.4, smooth); draw(ghost, 2.4); }
|
|
87
|
+
show(solid, 1.2);
|
|
88
|
+
show(ax4, 0.5);
|
|
89
|
+
par { show(slice, 0.5); draw(rarr, 0.5); show(rlab3, 0.5); }
|
|
90
|
+
pulse(slice, 0.9);
|
|
91
|
+
say(cap, `the same strip, returned as a red DISC of radius $\sqrt{x}$`, 0.5);
|
|
92
|
+
wait(0.6);
|
|
93
|
+
|
|
94
|
+
// ---- evaluate: the number arrives
|
|
95
|
+
show(vol, 0.3);
|
|
96
|
+
cue(tick);
|
|
97
|
+
rewrite(eqV, `V \;=\; \pi\,\tfrac{x^{2}}{2}\,\Big|_{0}^{4}`, 0.9);
|
|
98
|
+
par { to(vol, value, 25.13, 2.0, smooth); fade(ghost, 1.5); }
|
|
99
|
+
cue(tick);
|
|
100
|
+
rewrite(eqV, `\boxed{\;V \;=\; \tfrac{\pi}{2}\,(16-0) \;=\; 8\pi \ \text{units}^{3}\;}`, 1.0);
|
|
101
|
+
cue(chime);
|
|
102
|
+
flash(slice, red);
|
|
103
|
+
say(cap, `$V = 8\pi \approx 25.13$ cubic units - exactly`, 0.5);
|
|
104
|
+
wait(0.8);
|
|
105
|
+
|
|
106
|
+
// ---- lay it down, like the book
|
|
107
|
+
say(cap, "and to match the textbook: lay the axis back down", 0.5);
|
|
108
|
+
roll3(90, 1.6, smooth);
|
|
109
|
+
breathe(eqV, 3, 0.05, 0, 5);
|
|
110
|
+
say(cap, "one strip, spun into a solid - volumes by discs", 0.6);
|
|
111
|
+
wait(2.4);
|