@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,47 @@
|
|
|
1
|
+
// flow-lorenz — the Lorenz attractor seen through an artist's lens, via the new
|
|
2
|
+
// `cloud … from flow(...)` bridge. `flow` integrates the 3-D Lorenz ODE (a
|
|
3
|
+
// STATEFUL system clouds alone can't do); each of 30,000 points receives the
|
|
4
|
+
// i-th integrated state as hx/hy/hz, and the cloud's own formulas project that
|
|
5
|
+
// state to the screen — here a polar lens fanned into 9 layers (mod(i,9)). So one
|
|
6
|
+
// primitive now visualises ANY dynamical system through ANY projection you write.
|
|
7
|
+
//
|
|
8
|
+
// Original idea by @yuruyurau (https://x.com/yuruyurau); our hue'd, annotated,
|
|
9
|
+
// bloomed take on a 9:16 Short. The maths is the real Lorenz flow, not a picture.
|
|
10
|
+
//
|
|
11
|
+
// manic examples/flow-lorenz.manic
|
|
12
|
+
title("A chaotic flow, projected");
|
|
13
|
+
canvas("9:16");
|
|
14
|
+
template("black");
|
|
15
|
+
|
|
16
|
+
cloud(art, 30000, #ffffff, 0.55)
|
|
17
|
+
from flow("9*(y - x)", "x*(28 - z) - y", "x*y - 2*z", (9, 9, 9), 0.0005) {
|
|
18
|
+
// hx, hy, hz = the i-th integrated Lorenz state; project it through the lens
|
|
19
|
+
let e = sin(t*pi/20 - hx*hx/99 + mod(i, 9)) + 1;
|
|
20
|
+
let q = hx*e + 89;
|
|
21
|
+
let k = hz/59 - e/29 + t*pi/480 + mod(i, 9)*8;
|
|
22
|
+
let px = q*cos(k);
|
|
23
|
+
let py = (q + 60*cos(k/2)) * sin(k);
|
|
24
|
+
let grow = tanh(t*0.5 + 0.12); // bloom from the centre
|
|
25
|
+
let x = 540 + px * 2.2 * grow;
|
|
26
|
+
let y = 960 - py * 2.2 * grow;
|
|
27
|
+
let hue = mod(mod(i, 9)*40 + hz*3 + t*14, 360); // colour by layer + depth
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ---- textbook annotations ----
|
|
31
|
+
caption(head, "A chaotic flow, projected", (540, 140), 36);
|
|
32
|
+
caption(sub, "integrate the Lorenz system, then project it", (540, 208), 22);
|
|
33
|
+
hidden(head);
|
|
34
|
+
hidden(sub);
|
|
35
|
+
equation(eq, (540, 1706),
|
|
36
|
+
`\dot x=\sigma(y{-}x),\;\; \dot y=x(\rho{-}z){-}y,\;\; \dot z=xy-\beta z`, 24);
|
|
37
|
+
caption(lab, "the state → your own lens, per point", (540, 1786), 20);
|
|
38
|
+
hidden(eq);
|
|
39
|
+
hidden(lab);
|
|
40
|
+
|
|
41
|
+
show(head);
|
|
42
|
+
wait(1.4);
|
|
43
|
+
show(sub);
|
|
44
|
+
wait(2.6);
|
|
45
|
+
show(eq);
|
|
46
|
+
show(lab);
|
|
47
|
+
wait(25);
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// A focused Fourier story: every orbit and every partial sum is generated from
|
|
2
|
+
// the same live collection. The circles move; their histories become the wave.
|
|
3
|
+
|
|
4
|
+
title("A Wave Drawn by Rotating Circles");
|
|
5
|
+
canvas("9:16");
|
|
6
|
+
template("blank");
|
|
7
|
+
|
|
8
|
+
watermark(mark,(w*0.15,h*0.045),"Made With Manic");
|
|
9
|
+
text(kicker,(cx,h*0.075),"FOURIER SERIES · LIVE DERIVED HISTORY");
|
|
10
|
+
text(headline,(cx,h*0.115),"Can rotating circles draw a wave?");
|
|
11
|
+
text(caption,(cx,h*0.18),"Every coloured trace is the real history of one moving endpoint.");
|
|
12
|
+
text(cta,(cx,h*0.925),"BUILD YOUR OWN VISUAL STORY → 8gwifi.org/manic");
|
|
13
|
+
size(kicker,18); color(kicker,dim); bold(kicker); hidden(kicker);
|
|
14
|
+
size(headline,31); bold(headline); wrap(headline,w*0.84); hidden(headline);
|
|
15
|
+
size(caption,20); color(caption,dim); wrap(caption,w*0.84); hidden(caption);
|
|
16
|
+
size(cta,21); color(cta,cyan); bold(cta); hidden(cta);
|
|
17
|
+
|
|
18
|
+
camera3((-29,-25,43),(1,-2,0),42,orthographic);
|
|
19
|
+
|
|
20
|
+
collection3(harmonics,(-3,5,0),12,(0,0,0),11,0.065);
|
|
21
|
+
line3(sweep,(-3,5,0),(10,5,0)); hidden(sweep);
|
|
22
|
+
links3(arms,harmonics,chain);
|
|
23
|
+
child3(tip,harmonics,11,0.13);
|
|
24
|
+
|
|
25
|
+
arrow3(chainX,(-11,5,0),(7,5,0));
|
|
26
|
+
arrow3(chainY,(-3,-2,0),(-3,10.5,0));
|
|
27
|
+
arrow3(plotX,(-7,-10.5,0),(12,-10.5,0));
|
|
28
|
+
arrow3(plotY,(-7,-10.5,0),(-7,-4.2,0));
|
|
29
|
+
|
|
30
|
+
point3(shotA,(-7.5,-11,0),0.01);
|
|
31
|
+
point3(shotB,(8.5,10.5,0),0.01);
|
|
32
|
+
tag(shotA,shot); tag(shotB,shot);
|
|
33
|
+
hidden(shotA); hidden(shotB);
|
|
34
|
+
|
|
35
|
+
tag(harmonics,construction); tag(arms,construction); tag(tip,construction);
|
|
36
|
+
tag(chainX,construction); tag(chainY,construction);
|
|
37
|
+
tag(plotX,construction); tag(plotY,construction);
|
|
38
|
+
|
|
39
|
+
for i in 0..12 {
|
|
40
|
+
ring3(orbit{i},harmonics,i,72);
|
|
41
|
+
historyplot3(partial{i},harmonics,i,y,(-7,-10.5,0),(19,6));
|
|
42
|
+
thick(orbit{i},0.030);
|
|
43
|
+
thick(partial{i},0.020);
|
|
44
|
+
tag(orbit{i},construction);
|
|
45
|
+
tag(partial{i},construction);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
equation(formula,(0,0),`f(t)=\sum_{n=1}^{12}\frac{2(-1)^{n+1}}{\pi n}\sin(nt)`,25);
|
|
49
|
+
label3(formula,(-4,-2.7,0),0.82);
|
|
50
|
+
tag(formula,construction);
|
|
51
|
+
|
|
52
|
+
color(harmonics,fg); color(arms,fg); color(tip,fg);
|
|
53
|
+
color(chainX,fg); color(chainY,fg); color(plotX,fg); color(plotY,fg);
|
|
54
|
+
color(formula,fg);
|
|
55
|
+
thick(chainX,0.016); thick(chainY,0.016);
|
|
56
|
+
thick(plotX,0.016); thick(plotY,0.016);
|
|
57
|
+
|
|
58
|
+
color(orbit0,lime); color(partial0,lime);
|
|
59
|
+
color(orbit1,gold); color(partial1,gold);
|
|
60
|
+
color(orbit2,orange); color(partial2,orange);
|
|
61
|
+
color(orbit3,coral); color(partial3,coral);
|
|
62
|
+
color(orbit4,red); color(partial4,red);
|
|
63
|
+
color(orbit5,magenta); color(partial5,magenta);
|
|
64
|
+
color(orbit6,violet); color(partial6,violet);
|
|
65
|
+
color(orbit7,indigo); color(partial7,indigo);
|
|
66
|
+
color(orbit8,blue); color(partial8,blue);
|
|
67
|
+
color(orbit9,cyan); color(partial9,cyan);
|
|
68
|
+
color(orbit10,mint); color(partial10,mint);
|
|
69
|
+
color(orbit11,fg); color(partial11,fg);
|
|
70
|
+
|
|
71
|
+
hidden(construction);
|
|
72
|
+
|
|
73
|
+
step("ask the visual question") {
|
|
74
|
+
show(kicker,0.30);
|
|
75
|
+
show(headline,0.42);
|
|
76
|
+
show(caption,0.38);
|
|
77
|
+
}
|
|
78
|
+
wait(0.35);
|
|
79
|
+
|
|
80
|
+
step("reveal one connected machine") {
|
|
81
|
+
par {
|
|
82
|
+
show(construction,0.85);
|
|
83
|
+
view3(shot,"top",1.35,smooth,1.08);
|
|
84
|
+
say(caption,"Each circle starts where the previous circle ends.",0.38);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
wait(0.30);
|
|
88
|
+
|
|
89
|
+
step("let motion become data") {
|
|
90
|
+
par {
|
|
91
|
+
// Doubling every angular rate makes the base harmonic complete exactly
|
|
92
|
+
// two revolutions while preserving all relative frequencies.
|
|
93
|
+
chain3(harmonics,"2.0372 -1.0186 0.6791 -0.5093 0.4074 -0.3395 0.2910 -0.2546 0.2264 -0.2037 0.1852 -0.1698","2 4 6 8 10 12 14 16 18 20 22 24",16.0);
|
|
94
|
+
travel3(harmonics,sweep,16.0,linear);
|
|
95
|
+
seq {
|
|
96
|
+
say(caption,"Cycle one: the broad motion appears, then smaller circles restore its detail.",0.40);
|
|
97
|
+
wait(6.10);
|
|
98
|
+
say(caption,"Cycle two: the same relationships repeat continuously—without a reset or jump.",0.40);
|
|
99
|
+
wait(5.20);
|
|
100
|
+
say(caption,"The endpoint histories now contain two complete periods of the signal.",0.40);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
wait(0.35);
|
|
105
|
+
|
|
106
|
+
step("create with Manic") {
|
|
107
|
+
par {
|
|
108
|
+
pulse(tip,0.75);
|
|
109
|
+
pulse(partial11,0.75);
|
|
110
|
+
show(cta,0.45);
|
|
111
|
+
say(caption,"Describe the relationship. Manic keeps the circles, histories, motion, and camera together.",0.42);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
wait(1.45);
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Odd harmonics build a square wave. Every partial sum is a live history of
|
|
2
|
+
// the corresponding endpoint, so the corners emerge from the geometry itself.
|
|
3
|
+
|
|
4
|
+
title("How Odd Harmonics Build a Square Wave");
|
|
5
|
+
canvas("9:16");
|
|
6
|
+
template("paper");
|
|
7
|
+
|
|
8
|
+
watermark(mark,(w*0.15,h*0.045),"Made With Manic");
|
|
9
|
+
text(kicker,(cx,h*0.075),"FOURIER · ODD HARMONICS");
|
|
10
|
+
text(headline,(cx,h*0.115),"Watch a square wave find its corners");
|
|
11
|
+
text(caption,(cx,h*0.18),"Start with n = 1. Then add 3, 5, 7 … all the way to 25.");
|
|
12
|
+
text(cta,(cx,h*0.925),"TURN IDEAS INTO ANIMATION → 8gwifi.org/manic");
|
|
13
|
+
size(kicker,18); color(kicker,dim); bold(kicker); hidden(kicker);
|
|
14
|
+
size(headline,31); bold(headline); wrap(headline,w*0.84); hidden(headline);
|
|
15
|
+
size(caption,20); color(caption,dim); wrap(caption,w*0.84); hidden(caption);
|
|
16
|
+
size(cta,21); color(cta,cyan); bold(cta); hidden(cta);
|
|
17
|
+
|
|
18
|
+
camera3((-29,-25,43),(1,-2,0),42,orthographic);
|
|
19
|
+
|
|
20
|
+
collection3(series,(-3,5,0),13,(0,0,0),11,0.065);
|
|
21
|
+
line3(sweep,(-3,5,0),(10,5,0)); hidden(sweep);
|
|
22
|
+
links3(arms,series,chain);
|
|
23
|
+
child3(tip,series,12,0.13);
|
|
24
|
+
|
|
25
|
+
arrow3(chainX,(-11,5,0),(7,5,0));
|
|
26
|
+
arrow3(chainY,(-3,-2,0),(-3,10.5,0));
|
|
27
|
+
arrow3(plotX,(-7,-10.5,0),(12,-10.5,0));
|
|
28
|
+
arrow3(plotY,(-7,-10.5,0),(-7,-4.2,0));
|
|
29
|
+
|
|
30
|
+
point3(shotA,(-7.5,-11,0),0.01);
|
|
31
|
+
point3(shotB,(8.5,10.5,0),0.01);
|
|
32
|
+
tag(shotA,shot); tag(shotB,shot);
|
|
33
|
+
hidden(shotA); hidden(shotB);
|
|
34
|
+
|
|
35
|
+
tag(series,construction); tag(arms,construction); tag(tip,construction);
|
|
36
|
+
tag(chainX,construction); tag(chainY,construction);
|
|
37
|
+
tag(plotX,construction); tag(plotY,construction);
|
|
38
|
+
|
|
39
|
+
for i in 0..13 {
|
|
40
|
+
ring3(orbit{i},series,i,72);
|
|
41
|
+
historyplot3(partial{i},series,i,y,(-7,-10.5,0),(19,6));
|
|
42
|
+
thick(orbit{i},0.030);
|
|
43
|
+
thick(partial{i},0.020);
|
|
44
|
+
tag(orbit{i},construction);
|
|
45
|
+
tag(partial{i},construction);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
equation(formula,(0,0),`S_{13}(t)=\sum_{k=0}^{12}\frac{4}{\pi(2k+1)}\sin((2k+1)t)`,24);
|
|
49
|
+
label3(formula,(-4,-2.7,0),0.80);
|
|
50
|
+
tag(formula,construction);
|
|
51
|
+
|
|
52
|
+
color(series,fg); color(arms,fg); color(tip,fg);
|
|
53
|
+
color(chainX,fg); color(chainY,fg); color(plotX,fg); color(plotY,fg);
|
|
54
|
+
color(formula,fg);
|
|
55
|
+
thick(chainX,0.016); thick(chainY,0.016);
|
|
56
|
+
thick(plotX,0.016); thick(plotY,0.016);
|
|
57
|
+
|
|
58
|
+
color(orbit0,lime); color(partial0,lime);
|
|
59
|
+
color(orbit1,gold); color(partial1,gold);
|
|
60
|
+
color(orbit2,orange); color(partial2,orange);
|
|
61
|
+
color(orbit3,coral); color(partial3,coral);
|
|
62
|
+
color(orbit4,red); color(partial4,red);
|
|
63
|
+
color(orbit5,magenta); color(partial5,magenta);
|
|
64
|
+
color(orbit6,violet); color(partial6,violet);
|
|
65
|
+
color(orbit7,indigo); color(partial7,indigo);
|
|
66
|
+
color(orbit8,blue); color(partial8,blue);
|
|
67
|
+
color(orbit9,cyan); color(partial9,cyan);
|
|
68
|
+
color(orbit10,mint); color(partial10,mint);
|
|
69
|
+
color(orbit11,lime); color(partial11,lime);
|
|
70
|
+
color(orbit12,fg); color(partial12,fg);
|
|
71
|
+
|
|
72
|
+
hidden(construction);
|
|
73
|
+
|
|
74
|
+
step("begin with one sine wave") {
|
|
75
|
+
show(kicker,0.30);
|
|
76
|
+
show(headline,0.42);
|
|
77
|
+
show(caption,0.38);
|
|
78
|
+
}
|
|
79
|
+
wait(0.35);
|
|
80
|
+
|
|
81
|
+
step("reveal the odd-harmonic chain") {
|
|
82
|
+
par {
|
|
83
|
+
show(construction,0.85);
|
|
84
|
+
view3(shot,"top",1.35,smooth,1.08);
|
|
85
|
+
say(caption,"Every smaller orbit contributes the next odd frequency.",0.38);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
wait(0.30);
|
|
89
|
+
|
|
90
|
+
step("build the corners live") {
|
|
91
|
+
par {
|
|
92
|
+
// Two complete base cycles: all odd harmonic rates are doubled together.
|
|
93
|
+
chain3(series,"4.0744 1.3581 0.8149 0.5821 0.4527 0.3704 0.3134 0.2716 0.2397 0.2144 0.1940 0.1771 0.1630","2 6 10 14 18 22 26 30 34 38 42 46 50",16.0);
|
|
94
|
+
travel3(series,sweep,16.0,linear);
|
|
95
|
+
seq {
|
|
96
|
+
say(caption,"Cycle one: odd harmonics flatten the plateaus and steepen both sides.",0.40);
|
|
97
|
+
wait(6.10);
|
|
98
|
+
say(caption,"Cycle two: every orbit closes and the square-wave pattern returns continuously.",0.40);
|
|
99
|
+
wait(5.20);
|
|
100
|
+
say(caption,"Two complete periods make the repeating structure impossible to miss.",0.40);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
wait(0.35);
|
|
105
|
+
|
|
106
|
+
step("create with Manic") {
|
|
107
|
+
par {
|
|
108
|
+
pulse(tip,0.75);
|
|
109
|
+
pulse(partial12,0.75);
|
|
110
|
+
show(cta,0.45);
|
|
111
|
+
say(caption,"One declarative chain becomes circles, partial sums, a live waveform, and a complete visual story.",0.42);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
wait(1.45);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Fractal Tree — a recursive `def` macro draws a branching tree. Each branch
|
|
2
|
+
// splits into two shorter branches at a fixed angle; `if depth > 0` is the base
|
|
3
|
+
// case that stops the recursion. Branches are keyed by a binary-heap index
|
|
4
|
+
// (k -> 2k, 2k+1) so every segment gets a unique id, hued and thinned by depth.
|
|
5
|
+
//
|
|
6
|
+
// Showcases the Phase-2 language layer: `def`, recursion, `if`, comparisons.
|
|
7
|
+
//
|
|
8
|
+
// manic examples/fractal_tree.manic
|
|
9
|
+
// manic examples/fractal_tree.manic --record out --fps 60
|
|
10
|
+
|
|
11
|
+
title("Fractal Tree");
|
|
12
|
+
canvas(1280, 720);
|
|
13
|
+
|
|
14
|
+
text(head, (640, 92), "one recursive rule, drawn to depth 9");
|
|
15
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
16
|
+
|
|
17
|
+
// draw a branch, then recurse into two children (unless we've bottomed out)
|
|
18
|
+
def branch(k, x, y, ang, len, depth) {
|
|
19
|
+
// stop at the base depth OR once a branch is too short to see — so even a
|
|
20
|
+
// large `depth` self-limits (the tree is bounded by branch length)
|
|
21
|
+
if depth > 0 && len > 2 {
|
|
22
|
+
let x2 = x + len * cos(ang);
|
|
23
|
+
let y2 = y - len * sin(ang); // screen y grows downward
|
|
24
|
+
line(seg{k}, (x, y), (x2, y2));
|
|
25
|
+
stroke(seg{k}, 1 + depth * 0.8);
|
|
26
|
+
hue(seg{k}, 120 + depth * 15); // trunk bluish -> tips green
|
|
27
|
+
untraced(seg{k}); tag(seg{k}, tree);
|
|
28
|
+
branch(2*k, x2, y2, ang + 0.42, len * 0.72, depth - 1);
|
|
29
|
+
branch(2*k + 1, x2, y2, ang - 0.42, len * 0.72, depth - 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// grow from the bottom centre, pointing up (angle pi/2)
|
|
34
|
+
branch(1, 640, 700, 1.5708, 150, 20);
|
|
35
|
+
|
|
36
|
+
// --- script ---
|
|
37
|
+
show(head, 0.5);
|
|
38
|
+
draw(tree, 1.8);
|
|
39
|
+
wait(1.6);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Review file for the six Asymptote grid3 policies that motivated frame3.
|
|
2
|
+
// Each chapter is a normal frame3 declaration, not a renderer special case.
|
|
3
|
+
|
|
4
|
+
title("Scientific Grid Planes — Asymptote Parity");
|
|
5
|
+
canvas("16:9");
|
|
6
|
+
template("mono");
|
|
7
|
+
watermark(manicMark,(170,70),"Made With Manic");
|
|
8
|
+
|
|
9
|
+
text(titleText,(640,68),"One frame vocabulary · six grid policies"); size(titleText,30); bold(titleText);
|
|
10
|
+
text(caption,(640,670),"Three lower walls"); size(caption,24); bold(caption); color(caption,gold);
|
|
11
|
+
|
|
12
|
+
camera3((10,-12,8),(0,0,0),15,orthographic);
|
|
13
|
+
|
|
14
|
+
frame3(walls,(0,0,0),(8,8,6),"x=-2..2 y=-2..2 z=-1..3 planes=xy:min,xz:min,yz:min major=1 mode=textbook");
|
|
15
|
+
frame3(logWalls,(0,0,0),(8,8,6),"x=0..4 y=0..4 z=0.1..100 planes=xy:min,xz:min zscale=log major=1 mode=textbook");
|
|
16
|
+
frame3(positioned,(0,0,0),(8,8,6),"x=-2..2 y=-2..2 z=-2..2 planes=xy:max,xz:0 major=1 mode=textbook");
|
|
17
|
+
frame3(parallel,(0,0,0),(8,8,6),"x=-2..2 y=-2..2 z=-2..2 planes=xy:-0.5@cyan,xy:1.5@magenta major=1 mode=textbook");
|
|
18
|
+
frame3(majorMinor,(0,0,0),(8,8,6),"x=-2..2 y=-2..2 z=-1..2 planes=xy:min major=1 minor=0.5 mode=textbook");
|
|
19
|
+
frame3(axisPolicy,(0,0,0),(8,8,6),"x=-2..2 y=-2..2 z=-2..2 planes=xy:min,yz:min xmajor=0.5 ymajor=1 zmajor=2 mode=textbook");
|
|
20
|
+
|
|
21
|
+
hidden(logWalls); hidden(positioned); hidden(parallel); hidden(majorMinor); hidden(axisPolicy);
|
|
22
|
+
|
|
23
|
+
step("three lower walls") {
|
|
24
|
+
show(walls,0.65);
|
|
25
|
+
wait(0.70);
|
|
26
|
+
}
|
|
27
|
+
step("linear floor with logarithmic height") {
|
|
28
|
+
par { fade(walls,0.45); show(logWalls,0.60); say(caption,"Linear floor · logarithmic z",0.40,smooth); }
|
|
29
|
+
wait(0.70);
|
|
30
|
+
}
|
|
31
|
+
step("top and explicit-position planes") {
|
|
32
|
+
par { fade(logWalls,0.45); show(positioned,0.60); say(caption,"XY at max · XZ at y=0",0.40,smooth); }
|
|
33
|
+
wait(0.70);
|
|
34
|
+
}
|
|
35
|
+
step("parallel colored sections") {
|
|
36
|
+
par { fade(positioned,0.45); show(parallel,0.60); say(caption,"Two parallel XY sections",0.40,smooth); }
|
|
37
|
+
wait(0.70);
|
|
38
|
+
}
|
|
39
|
+
step("major and minor lines") {
|
|
40
|
+
par { fade(parallel,0.45); show(majorMinor,0.60); say(caption,"Major ticks derive the major grid",0.40,smooth); }
|
|
41
|
+
wait(0.70);
|
|
42
|
+
}
|
|
43
|
+
step("independent axis policy") {
|
|
44
|
+
par { fade(majorMinor,0.45); show(axisPolicy,0.60); say(caption,"Each axis chooses its own interval",0.40,smooth); }
|
|
45
|
+
present3(axisPolicy,spatial,0.70,smooth);
|
|
46
|
+
orbit3(118,30,12,2.10,smooth);
|
|
47
|
+
wait(1.40);
|
|
48
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
title("The Fundamental Theorem of Calculus");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
let ox = cx - 460; // math x=0 maps here
|
|
5
|
+
let oy = cy + 20;
|
|
6
|
+
|
|
7
|
+
text(hdr, (cx, 52), "Differentiate the area — and the function comes back");
|
|
8
|
+
size(hdr, 26); color(hdr, cyan); bold(hdr); display(hdr); hidden(hdr);
|
|
9
|
+
|
|
10
|
+
axes(ax, (ox, oy), 900, 200, 1);
|
|
11
|
+
color(ax, dim); untraced(ax);
|
|
12
|
+
|
|
13
|
+
// f(x) = cos x
|
|
14
|
+
plot(f, (ox, oy), 140, 150, "cos(x)", (0, 6.3));
|
|
15
|
+
color(f, cyan); stroke(f, 4); untraced(f);
|
|
16
|
+
|
|
17
|
+
// F(x) = area under f from 0 to x = sin x
|
|
18
|
+
accum(bigF, f);
|
|
19
|
+
color(bigF, lime); stroke(bigF, 3); untraced(bigF);
|
|
20
|
+
|
|
21
|
+
// F'(x): differentiate the area function — it lands right back on f
|
|
22
|
+
deriv(dF, bigF);
|
|
23
|
+
color(dF, gold); stroke(dF, 3); untraced(dF);
|
|
24
|
+
|
|
25
|
+
// legend
|
|
26
|
+
text(lf, (cx + 300, 150), "f(x) = cos x");
|
|
27
|
+
size(lf, 20); color(lf, cyan); display(lf); hidden(lf);
|
|
28
|
+
text(lF, (cx + 300, 190), "F(x) = area so far");
|
|
29
|
+
size(lF, 20); color(lF, lime); display(lF); hidden(lF);
|
|
30
|
+
text(ld, (cx + 300, 230), "F'(x) = f(x)");
|
|
31
|
+
size(ld, 20); color(ld, gold); bold(ld); display(ld); hidden(ld);
|
|
32
|
+
|
|
33
|
+
text(cap, (cx, h - 52), "the slope of the area-so-far IS the original curve");
|
|
34
|
+
size(cap, 20); color(cap, dim); display(cap); hidden(cap);
|
|
35
|
+
|
|
36
|
+
// ================= timeline =================
|
|
37
|
+
show(hdr, 0.6);
|
|
38
|
+
draw(ax, 0.7);
|
|
39
|
+
|
|
40
|
+
// 1. the function
|
|
41
|
+
draw(f, 1.3);
|
|
42
|
+
show(lf, 0.4);
|
|
43
|
+
wait(0.3);
|
|
44
|
+
|
|
45
|
+
// 2. its accumulated area, as a new curve (this is sin x)
|
|
46
|
+
draw(bigF, 1.6);
|
|
47
|
+
show(lF, 0.4);
|
|
48
|
+
wait(0.4);
|
|
49
|
+
|
|
50
|
+
// 3. differentiate that area function — it traces back onto f
|
|
51
|
+
draw(dF, 1.6);
|
|
52
|
+
show(ld, 0.4);
|
|
53
|
+
flash(dF, gold);
|
|
54
|
+
show(cap, 0.5);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Function Graphs — plot ANY formula, not just a named curve. manic's answer to
|
|
2
|
+
// Manim's FunctionGraph(lambda t: ...): pass a formula string in x (alias t) and
|
|
3
|
+
// plot() samples it. This reproduces Manim's ExampleFunctionGraph — two
|
|
4
|
+
// Fourier-style packets and a domain-clipped, lifted copy of the second.
|
|
5
|
+
//
|
|
6
|
+
// manic examples/function_graph.manic
|
|
7
|
+
// manic examples/function_graph.manic --record out --fps 60
|
|
8
|
+
|
|
9
|
+
title("Function Graphs");
|
|
10
|
+
canvas(1280, 720);
|
|
11
|
+
|
|
12
|
+
text(head, (640, 92), "plot any formula — y = f(x)");
|
|
13
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
14
|
+
text(cap, (640, 656), ""); color(cap, dim); size(cap, 22);
|
|
15
|
+
|
|
16
|
+
// a faint frame to read the curves against (unit = 70 px)
|
|
17
|
+
plane(pl, (640, 384), 620, 300, 70);
|
|
18
|
+
hidden(pl.grid); untraced(pl.x); untraced(pl.y);
|
|
19
|
+
|
|
20
|
+
// a cosine packet: cos t + 1/2 cos 7t + 1/7 cos 14t, over x in [-7, 7]
|
|
21
|
+
plot(cosf, (640, 384), 70, 70, "cos(x) + 0.5*cos(7*x) + (1/7)*cos(14*x)", 7);
|
|
22
|
+
color(cosf, magenta); untraced(cosf);
|
|
23
|
+
|
|
24
|
+
// the sine version of the same packet
|
|
25
|
+
plot(sinf, (640, 384), 70, 70, "sin(x) + 0.5*sin(7*x) + (1/7)*sin(14*x)", 7);
|
|
26
|
+
color(sinf, cyan); untraced(sinf);
|
|
27
|
+
|
|
28
|
+
// same formula, clipped to x in [-4, 4] and lifted one unit (centre y - 70)
|
|
29
|
+
plot(sinf2, (640, 314), 70, 70, "sin(x) + 0.5*sin(7*x) + (1/7)*sin(14*x)", 4);
|
|
30
|
+
color(sinf2, lime); untraced(sinf2);
|
|
31
|
+
|
|
32
|
+
// --- reveal ---
|
|
33
|
+
show(head, 0.5);
|
|
34
|
+
section("The plane");
|
|
35
|
+
say(cap, "a grid to read against — arrows on the axes");
|
|
36
|
+
show(pl.grid, 0.6);
|
|
37
|
+
par { draw(pl.x, 0.5); draw(pl.y, 0.5); }
|
|
38
|
+
wait(0.3);
|
|
39
|
+
|
|
40
|
+
section("A cosine packet");
|
|
41
|
+
say(cap, "y = cos t + 1/2 cos 7t + 1/7 cos 14t");
|
|
42
|
+
draw(cosf, 1.3);
|
|
43
|
+
wait(0.6);
|
|
44
|
+
|
|
45
|
+
section("A sine packet");
|
|
46
|
+
say(cap, "same shape, sin for cos");
|
|
47
|
+
draw(sinf, 1.3);
|
|
48
|
+
wait(0.6);
|
|
49
|
+
|
|
50
|
+
section("Clip the domain");
|
|
51
|
+
say(cap, "same formula, but only x in [-4, 4], lifted one unit");
|
|
52
|
+
draw(sinf2, 1.1);
|
|
53
|
+
par { pulse(cosf); pulse(sinf); pulse(sinf2); }
|
|
54
|
+
wait(1.4);
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// GALTON BOARD — RANDOM LOCALLY, PREDICTABLE GLOBALLY
|
|
2
|
+
//
|
|
3
|
+
// This is a probability story built from generic process vocabulary. Ordinary
|
|
4
|
+
// tagged lines form the board; `branch` preserves each ball through eight
|
|
5
|
+
// choices; `collect` and `observe` build the distribution from real arrivals.
|
|
6
|
+
|
|
7
|
+
title("How Random Choices Become a Bell Curve");
|
|
8
|
+
canvas("9:16");
|
|
9
|
+
template("blank");
|
|
10
|
+
|
|
11
|
+
watermark(mark,(w*0.16,h*0.042),"Made With Manic");
|
|
12
|
+
text(kicker,(cx,h*0.070),"PROBABILITY · RANDOM LOCALLY, ORDERED GLOBALLY");
|
|
13
|
+
text(headline,(cx,h*0.115),"Can random choices create a predictable shape?");
|
|
14
|
+
text(chapter,(cx,h*0.195),"1 · BEGIN WITH ONE FORK");
|
|
15
|
+
text(caption,(cx,h*0.855),"One ball can land almost anywhere.");
|
|
16
|
+
text(insight,(cx,h*0.815),"MORE ROUTES LEAD TO THE CENTER");
|
|
17
|
+
text(cta,(cx,h*0.930),"MAKE PROBABILITY VISIBLE → 8gwifi.org/manic");
|
|
18
|
+
|
|
19
|
+
size(kicker,18); color(kicker,dim); bold(kicker); hidden(kicker);
|
|
20
|
+
size(headline,31); bold(headline); wrap(headline,w*0.84); hidden(headline);
|
|
21
|
+
size(chapter,19); color(chapter,cyan); bold(chapter); hidden(chapter);
|
|
22
|
+
size(caption,21); color(caption,dim); wrap(caption,w*0.84); hidden(caption);
|
|
23
|
+
size(insight,19); color(insight,lime); bold(insight); hidden(insight);
|
|
24
|
+
size(cta,21); color(cta,cyan); bold(cta); hidden(cta);
|
|
25
|
+
|
|
26
|
+
equation(law,(cx,h*0.158),`X\sim\operatorname{Binomial}\!\left(8,\frac12\right)`,29);
|
|
27
|
+
hidden(law);
|
|
28
|
+
|
|
29
|
+
let levels = 8;
|
|
30
|
+
let boardX = cx;
|
|
31
|
+
let topY = h*0.235;
|
|
32
|
+
let dx = w*0.065;
|
|
33
|
+
let dy = h*0.034;
|
|
34
|
+
|
|
35
|
+
// Every directed edge joins one row to the next. Converging endpoints create
|
|
36
|
+
// the ordinary rooted DAG followed by `branch`.
|
|
37
|
+
for r in 0..levels {
|
|
38
|
+
for k in 0..r+1 {
|
|
39
|
+
let x1 = boardX + (k-r*0.5)*dx;
|
|
40
|
+
let y1 = topY + r*dy;
|
|
41
|
+
let xl = boardX + (k-(r+1)*0.5)*dx;
|
|
42
|
+
let xr = boardX + (k+1-(r+1)*0.5)*dx;
|
|
43
|
+
let y2 = topY + (r+1)*dy;
|
|
44
|
+
|
|
45
|
+
line(left{r}_{k},(x1,y1),(xl,y2));
|
|
46
|
+
line(right{r}_{k},(x1,y1),(xr,y2));
|
|
47
|
+
tag(left{r}_{k},boardRoutes); tag(right{r}_{k},boardRoutes);
|
|
48
|
+
color(left{r}_{k},dim); color(right{r}_{k},dim);
|
|
49
|
+
stroke(left{r}_{k},1.7); stroke(right{r}_{k},1.7);
|
|
50
|
+
opacity(left{r}_{k},0.30); opacity(right{r}_{k},0.30);
|
|
51
|
+
|
|
52
|
+
dot(peg{r}_{k},(x1,y1),4.8);
|
|
53
|
+
color(peg{r}_{k},fg); glow(peg{r}_{k},0.36); tag(peg{r}_{k},pegs);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
untraced(boardRoutes);
|
|
57
|
+
|
|
58
|
+
for k in 0..levels+1 {
|
|
59
|
+
let tx = boardX + (k-levels*0.5)*dx;
|
|
60
|
+
let ty = topY + levels*dy;
|
|
61
|
+
dot(exit{k},(tx,ty),5);
|
|
62
|
+
color(exit{k},gold); glow(exit{k},0.45); tag(exit{k},exits);
|
|
63
|
+
counter(bin{k},(tx,ty+28),k,0);
|
|
64
|
+
size(bin{k},15); color(bin{k},dim); tag(bin{k},exitLabels);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
text(leftChoice,(boardX-dx*0.72,topY+dy*0.72),"LEFT");
|
|
68
|
+
text(rightChoice,(boardX+dx*0.72,topY+dy*0.72),"RIGHT");
|
|
69
|
+
size(leftChoice,15); size(rightChoice,15);
|
|
70
|
+
color(leftChoice,cyan); color(rightChoice,magenta);
|
|
71
|
+
hidden(leftChoice); hidden(rightChoice);
|
|
72
|
+
|
|
73
|
+
circle(source,(boardX,topY),13);
|
|
74
|
+
opacity(source,0);
|
|
75
|
+
particles(balls,source,180,4.0,73);
|
|
76
|
+
color(balls,cyan); glow(balls,0.78); z(balls,9);
|
|
77
|
+
|
|
78
|
+
let histY = h*0.695;
|
|
79
|
+
livehistogram(outcomes,(cx,histY),0,9,9,w*0.76,h*0.155,magenta);
|
|
80
|
+
text(histTitle,(cx,h*0.595),"WHERE 180 BALLS ACTUALLY LANDED");
|
|
81
|
+
size(histTitle,18); bold(histTitle); color(histTitle,dim);
|
|
82
|
+
counter(landed,(cx,h*0.785),0,0,"landed "," / 180");
|
|
83
|
+
size(landed,21); color(landed,dim);
|
|
84
|
+
|
|
85
|
+
hidden(pegs); hidden(exits); hidden(exitLabels);
|
|
86
|
+
hidden(balls); hidden(outcomes); hidden(histTitle); hidden(landed);
|
|
87
|
+
|
|
88
|
+
step("introduce one uncertain choice") {
|
|
89
|
+
par {
|
|
90
|
+
show(kicker,0.30);
|
|
91
|
+
show(headline,0.45);
|
|
92
|
+
show(law,0.45);
|
|
93
|
+
show(chapter,0.35);
|
|
94
|
+
show(caption,0.40);
|
|
95
|
+
draw(boardRoutes,0.90);
|
|
96
|
+
show(pegs,0.55);
|
|
97
|
+
show(exits,0.45);
|
|
98
|
+
show(exitLabels,0.45);
|
|
99
|
+
show(leftChoice,0.35);
|
|
100
|
+
show(rightChoice,0.35);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
wait(0.60);
|
|
104
|
+
|
|
105
|
+
step("repeat the choice eight times") {
|
|
106
|
+
par {
|
|
107
|
+
show(outcomes,0.50);
|
|
108
|
+
show(histTitle,0.35);
|
|
109
|
+
show(landed,0.35);
|
|
110
|
+
say(chapter,"2 · REPEAT LEFT OR RIGHT EIGHT TIMES",0.38);
|
|
111
|
+
say(caption,"At every peg, each ball makes another equally likely left-or-right choice.",0.44);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
wait(0.55);
|
|
115
|
+
|
|
116
|
+
step("let the crowd reveal the pattern") {
|
|
117
|
+
par {
|
|
118
|
+
branch(balls,boardRoutes,8.20,smooth);
|
|
119
|
+
collect(outcomes,balls,outcome,0.34,smooth);
|
|
120
|
+
observe(outcomes,balls,outcome);
|
|
121
|
+
observe(landed,balls,arrived);
|
|
122
|
+
show(balls,0.15);
|
|
123
|
+
seq {
|
|
124
|
+
say(chapter,"3 · WATCH 180 INDIVIDUAL JOURNEYS",0.38);
|
|
125
|
+
say(caption,"One route is unpredictable. The crowd begins to expose a stable pattern.",0.44);
|
|
126
|
+
wait(3.40);
|
|
127
|
+
say(caption,"Every bar is measured from the same balls you see falling—not animated separately.",0.44);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
wait(0.65);
|
|
132
|
+
|
|
133
|
+
step("explain why the center wins") {
|
|
134
|
+
par {
|
|
135
|
+
pulse(outcomes.bars,0.80);
|
|
136
|
+
show(insight,0.45);
|
|
137
|
+
say(chapter,"4 · ORDER EMERGES FROM MANY CHOICES",0.38);
|
|
138
|
+
say(caption,"Extreme bins need nearly all-left or all-right. Many more mixed sequences end near the center.",0.48);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
wait(0.75);
|
|
142
|
+
|
|
143
|
+
step("create with Manic") {
|
|
144
|
+
par {
|
|
145
|
+
pulse(outcomes.bars,0.75);
|
|
146
|
+
show(cta,0.45);
|
|
147
|
+
say(caption,"Describe the choices once. Manic keeps every route, arrival, count, and live distribution connected.",0.45);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
wait(1.45);
|