@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,118 @@
|
|
|
1
|
+
title("The Equal-Area Point Inside a Triangle");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
let unit = 80;
|
|
5
|
+
let ox = cx - 3*unit;
|
|
6
|
+
let oy = h*0.80;
|
|
7
|
+
let px = cx;
|
|
8
|
+
let py = oy - 4*unit;
|
|
9
|
+
let qx = ox + 6*unit;
|
|
10
|
+
let qy = oy;
|
|
11
|
+
let rx = (ox + px + qx)/3;
|
|
12
|
+
let ry = (oy + py + qy)/3;
|
|
13
|
+
|
|
14
|
+
// --- cast (constructors): declare entities at t = 0 ---
|
|
15
|
+
text(head, (cx, h*0.07), "The Equal-Area Point Inside a Triangle");
|
|
16
|
+
display(head); size(head, 40); color(head, gold); hidden(head);
|
|
17
|
+
|
|
18
|
+
text(prob1, (cx, h*0.13), "Let $O(0,0)$, $P(3,4)$, $Q(6,0)$ be the vertices of triangle $OPQ$.");
|
|
19
|
+
display(prob1); size(prob1, 26); color(prob1, fg); hidden(prob1);
|
|
20
|
+
|
|
21
|
+
text(prob2, (cx, h*0.185), "Point $R$ inside satisfies $[OPR]=[PQR]=[OQR]$. Find the coordinates of $R$.");
|
|
22
|
+
display(prob2); size(prob2, 26); color(prob2, fg); hidden(prob2);
|
|
23
|
+
|
|
24
|
+
text(cap, (cx, h*0.93), "");
|
|
25
|
+
display(cap); size(cap, 26); color(cap, cyan); hidden(cap);
|
|
26
|
+
|
|
27
|
+
point(O, (ox, oy), "O(0,0)");
|
|
28
|
+
hidden(O); hidden(O.label); size(O.label, 26); color(O.label, fg);
|
|
29
|
+
|
|
30
|
+
point(P, (px, py), "P(3,4)");
|
|
31
|
+
hidden(P); hidden(P.label); size(P.label, 26); color(P.label, fg);
|
|
32
|
+
|
|
33
|
+
point(Q, (qx, qy), "Q(6,0)");
|
|
34
|
+
hidden(Q); hidden(Q.label); size(Q.label, 26); color(Q.label, fg);
|
|
35
|
+
|
|
36
|
+
segment(OP, O, P); untraced(OP); color(OP, fg); stroke(OP, 3);
|
|
37
|
+
segment(PQ, P, Q); untraced(PQ); color(PQ, fg); stroke(PQ, 3);
|
|
38
|
+
segment(QO, Q, O); untraced(QO); color(QO, fg); stroke(QO, 3);
|
|
39
|
+
|
|
40
|
+
centroid(R, O, P, Q);
|
|
41
|
+
label(R, "R(3, 4/3)");
|
|
42
|
+
hidden(R); hidden(R.label); size(R.label, 26); color(R.label, gold);
|
|
43
|
+
|
|
44
|
+
segment(RO, R, O); untraced(RO); color(RO, gold); stroke(RO, 2.5);
|
|
45
|
+
segment(RP, R, P); untraced(RP); color(RP, gold); stroke(RP, 2.5);
|
|
46
|
+
segment(RQ, R, Q); untraced(RQ); color(RQ, gold); stroke(RQ, 2.5);
|
|
47
|
+
|
|
48
|
+
polygon(regOPR, (ox, oy), (px, py), (rx, ry), cyan);
|
|
49
|
+
filled(regOPR); opacity(regOPR, 0.30); hidden(regOPR);
|
|
50
|
+
|
|
51
|
+
polygon(regPQR, (px, py), (qx, qy), (rx, ry), magenta);
|
|
52
|
+
filled(regPQR); opacity(regPQR, 0.30); hidden(regPQR);
|
|
53
|
+
|
|
54
|
+
polygon(regOQR, (ox, oy), (qx, qy), (rx, ry), lime);
|
|
55
|
+
filled(regOQR); opacity(regOQR, 0.30); hidden(regOQR);
|
|
56
|
+
|
|
57
|
+
equation(eqCond, (cx, h*0.855), `[OPQ]=12 \quad\Rightarrow\quad [OPR]=[PQR]=[OQR]=4`, 26);
|
|
58
|
+
hidden(eqCond);
|
|
59
|
+
|
|
60
|
+
equation(eqAns, (cx, h*0.855), `R=\left(3,\ \tfrac{4}{3}\right)`, 34);
|
|
61
|
+
hidden(eqAns);
|
|
62
|
+
|
|
63
|
+
// --- script (timeline): verbs play in order ---
|
|
64
|
+
show(head, 0.6);
|
|
65
|
+
show(prob1, 0.5);
|
|
66
|
+
show(prob2, 0.5);
|
|
67
|
+
show(cap, 0.3);
|
|
68
|
+
say(cap, "Three vertices, one triangle. We need the point that splits it into three equal areas.");
|
|
69
|
+
wait(1.0);
|
|
70
|
+
|
|
71
|
+
section("Setting up the triangle");
|
|
72
|
+
par {
|
|
73
|
+
show(O, 0.4); show(O.label, 0.4);
|
|
74
|
+
show(P, 0.4); show(P.label, 0.4);
|
|
75
|
+
show(Q, 0.4); show(Q.label, 0.4);
|
|
76
|
+
}
|
|
77
|
+
say(cap, "Place O, P, and Q on the plane.");
|
|
78
|
+
wait(0.6);
|
|
79
|
+
|
|
80
|
+
draw(OP, 0.5);
|
|
81
|
+
draw(PQ, 0.5);
|
|
82
|
+
draw(QO, 0.5);
|
|
83
|
+
say(cap, "Connect them to form triangle OPQ.");
|
|
84
|
+
wait(0.8);
|
|
85
|
+
|
|
86
|
+
section("Finding the equal-area point");
|
|
87
|
+
say(cap, "For R to split it into three EQUAL-area triangles, R must be the centroid.");
|
|
88
|
+
wait(1.2);
|
|
89
|
+
|
|
90
|
+
par { show(R, 0.5); show(R.label, 0.5); }
|
|
91
|
+
say(cap, "The centroid averages the three vertices.");
|
|
92
|
+
wait(0.6);
|
|
93
|
+
|
|
94
|
+
par {
|
|
95
|
+
draw(RO, 0.6);
|
|
96
|
+
draw(RP, 0.6);
|
|
97
|
+
draw(RQ, 0.6);
|
|
98
|
+
}
|
|
99
|
+
say(cap, "Draw the three cevians from R to each vertex.");
|
|
100
|
+
wait(0.8);
|
|
101
|
+
|
|
102
|
+
par {
|
|
103
|
+
show(regOPR, 0.5);
|
|
104
|
+
show(regPQR, 0.5);
|
|
105
|
+
show(regOQR, 0.5);
|
|
106
|
+
}
|
|
107
|
+
say(cap, "Each of the three regions has exactly the same area.");
|
|
108
|
+
wait(1.0);
|
|
109
|
+
|
|
110
|
+
show(eqCond, 0.6);
|
|
111
|
+
say(cap, "Total area 12, split evenly into three fours.");
|
|
112
|
+
wait(1.5);
|
|
113
|
+
|
|
114
|
+
fade(eqCond, 0.4);
|
|
115
|
+
show(eqAns, 0.6);
|
|
116
|
+
flash(R, gold);
|
|
117
|
+
say(cap, "So R is the centroid: R = (3, 4/3).");
|
|
118
|
+
wait(2.0);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
title("Reading a curve: slope, tangent, normal, area");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
text(hdr, (cx, 58), "Asking a curve questions");
|
|
5
|
+
size(hdr, 30); color(hdr, cyan); bold(hdr); display(hdr); hidden(hdr);
|
|
6
|
+
|
|
7
|
+
// one curve — everything below asks IT, by name
|
|
8
|
+
plot(f, (cx - 440, cy + 30), 140, 110, "sin(x)", (0, 6.3));
|
|
9
|
+
color(f, cyan); stroke(f, 3); untraced(f);
|
|
10
|
+
|
|
11
|
+
// the area under it — starts collapsed at x=0.6, sweeps open
|
|
12
|
+
area(reg, f, 0.6, 0.6);
|
|
13
|
+
color(reg, lime);
|
|
14
|
+
|
|
15
|
+
// a live integral readout that climbs as the area sweeps
|
|
16
|
+
integral(area_val, f, 0.6, 0.6, (cx + 340, cy - 210));
|
|
17
|
+
color(area_val, lime);
|
|
18
|
+
|
|
19
|
+
// tangent + its live slope number, both riding the same point
|
|
20
|
+
tangent(tan, f, 0.6, 240);
|
|
21
|
+
color(tan, gold);
|
|
22
|
+
|
|
23
|
+
slope(sl, f, 0.6);
|
|
24
|
+
color(sl, gold);
|
|
25
|
+
|
|
26
|
+
// the normal, perpendicular at the same place
|
|
27
|
+
normal(nrm, f, 0.6, 150);
|
|
28
|
+
color(nrm, magenta); hidden(nrm);
|
|
29
|
+
|
|
30
|
+
// ---- timeline ----
|
|
31
|
+
show(hdr, 0.5);
|
|
32
|
+
draw(f, 1.4);
|
|
33
|
+
show(tan, 0.5);
|
|
34
|
+
show(sl, 0.4);
|
|
35
|
+
wait(0.4);
|
|
36
|
+
|
|
37
|
+
// sweep the area open while the tangent + slope slide together and the
|
|
38
|
+
// integral readout climbs
|
|
39
|
+
par {
|
|
40
|
+
to(reg, x, 5.7, 4);
|
|
41
|
+
to(area_val, x, 5.7, 4);
|
|
42
|
+
to(tan, x, 5.7, 4);
|
|
43
|
+
to(sl, x, 5.7, 4);
|
|
44
|
+
}
|
|
45
|
+
wait(0.4);
|
|
46
|
+
|
|
47
|
+
// reveal the normal and glide everything back to the first peak (slope 0)
|
|
48
|
+
show(nrm, 0.4);
|
|
49
|
+
par {
|
|
50
|
+
to(tan, x, 1.571, 2.5);
|
|
51
|
+
to(sl, x, 1.571, 2.5);
|
|
52
|
+
to(nrm, x, 1.571, 2.5);
|
|
53
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Approximating pi — Archimedes' method (c. 250 BC): inscribe a regular polygon
|
|
2
|
+
// in a circle and its perimeter closes in on the circumference. For an n-gon in
|
|
3
|
+
// a circle of radius R the perimeter is 2R * n*sin(pi/n), so pi ~ n*sin(pi/n),
|
|
4
|
+
// which -> pi as n grows. We sweep n = 6, 24, 96 (Archimedes' own 96-gon) and
|
|
5
|
+
// zoom in to see the last polygon nearly kiss the circle.
|
|
6
|
+
//
|
|
7
|
+
// Uses: a `for` loop per polygon, computed estimates, a live counter, and the
|
|
8
|
+
// camera (cam + zoom).
|
|
9
|
+
//
|
|
10
|
+
// manic examples/archimedes_pi.manic
|
|
11
|
+
// manic examples/archimedes_pi.manic --record out --fps 60
|
|
12
|
+
|
|
13
|
+
title("Approximating pi");
|
|
14
|
+
canvas("16:9");
|
|
15
|
+
|
|
16
|
+
let ox = 440; let oy = 400; let R = 240; // circle centre + radius
|
|
17
|
+
|
|
18
|
+
// the estimates, computed in-language
|
|
19
|
+
let e6 = 6 * sin(pi/6); // 3.000
|
|
20
|
+
let e24 = 24 * sin(pi/24); // 3.133
|
|
21
|
+
let e96 = 96 * sin(pi/96); // 3.141
|
|
22
|
+
|
|
23
|
+
text(head, (640, 78), "Archimedes: straight lines closing in on a circle");
|
|
24
|
+
display(head); color(head, cyan); size(head, 25); hidden(head);
|
|
25
|
+
text(cap, (640, 675), ""); color(cap, dim); size(cap, 22);
|
|
26
|
+
|
|
27
|
+
// the true circle (the target)
|
|
28
|
+
circle(circ, (ox, oy), R); outlined(circ); outline(circ, dim); stroke(circ, 2); untraced(circ);
|
|
29
|
+
|
|
30
|
+
// live pi readout
|
|
31
|
+
counter(est, (990, 330), 0, 3, "pi ~ ", ""); display(est); color(est, lime); size(est, 40); hidden(est);
|
|
32
|
+
text(truth, (990, 395), "true pi = 3.14159..."); color(truth, dim); size(truth, 20); hidden(truth);
|
|
33
|
+
|
|
34
|
+
// --- hexagon: n = 6 (magenta) ---
|
|
35
|
+
let n = 6;
|
|
36
|
+
for i in 0..n {
|
|
37
|
+
let a0 = tau*i/n; let a1 = tau*(i+1)/n;
|
|
38
|
+
line(h{i}, (ox + R*cos(a0), oy + R*sin(a0)), (ox + R*cos(a1), oy + R*sin(a1)));
|
|
39
|
+
color(h{i}, magenta); stroke(h{i}, 3); untraced(h{i}); tag(h{i}, p6);
|
|
40
|
+
}
|
|
41
|
+
// --- 24-gon (cyan) ---
|
|
42
|
+
let n = 24;
|
|
43
|
+
for i in 0..n {
|
|
44
|
+
let a0 = tau*i/n; let a1 = tau*(i+1)/n;
|
|
45
|
+
line(g{i}, (ox + R*cos(a0), oy + R*sin(a0)), (ox + R*cos(a1), oy + R*sin(a1)));
|
|
46
|
+
color(g{i}, cyan); stroke(g{i}, 3); untraced(g{i}); tag(g{i}, p24);
|
|
47
|
+
}
|
|
48
|
+
// --- 96-gon (lime), Archimedes' own ---
|
|
49
|
+
let n = 96;
|
|
50
|
+
for i in 0..n {
|
|
51
|
+
let a0 = tau*i/n; let a1 = tau*(i+1)/n;
|
|
52
|
+
line(k{i}, (ox + R*cos(a0), oy + R*sin(a0)), (ox + R*cos(a1), oy + R*sin(a1)));
|
|
53
|
+
color(k{i}, lime); stroke(k{i}, 2); untraced(k{i}); tag(k{i}, p96);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// --- script ---
|
|
57
|
+
show(head, 0.5);
|
|
58
|
+
say(cap, "how close can straight lines get to a curve?");
|
|
59
|
+
draw(circ, 1.0);
|
|
60
|
+
par { show(est, 0.3); show(truth, 0.3); }
|
|
61
|
+
wait(0.4);
|
|
62
|
+
|
|
63
|
+
section("6 sides");
|
|
64
|
+
say(cap, "start with a hexagon inside the circle");
|
|
65
|
+
draw(p6, 0.8);
|
|
66
|
+
to(est, value, e6, 1.0);
|
|
67
|
+
wait(0.7);
|
|
68
|
+
fade(p6, 0.4);
|
|
69
|
+
|
|
70
|
+
section("24 sides");
|
|
71
|
+
say(cap, "more sides hug the circle more tightly");
|
|
72
|
+
draw(p24, 1.0);
|
|
73
|
+
to(est, value, e24, 1.0);
|
|
74
|
+
wait(0.7);
|
|
75
|
+
fade(p24, 0.4);
|
|
76
|
+
|
|
77
|
+
section("96 sides");
|
|
78
|
+
say(cap, "Archimedes went to 96 sides -- around 250 BC");
|
|
79
|
+
draw(p96, 1.2);
|
|
80
|
+
to(est, value, e96, 1.0);
|
|
81
|
+
pulse(est);
|
|
82
|
+
wait(0.7);
|
|
83
|
+
|
|
84
|
+
section("Almost a circle");
|
|
85
|
+
say(cap, "zoom in: the polygon edge and the arc nearly touch");
|
|
86
|
+
par { cam((ox, oy - R), 1.5, smooth); zoom(5, 1.5, smooth); }
|
|
87
|
+
wait(1.4);
|
|
88
|
+
par { cam((cx, cy), 1.0, smooth); zoom(1, 1.0, smooth); }
|
|
89
|
+
wait(0.8);
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// Area Under a Curve — a Riemann sum sweeping n = 5, 10, 20, 40 to show the
|
|
2
|
+
// rectangles converging to the exact integral of x^2 on [0, 2.5] = 125/24.
|
|
3
|
+
//
|
|
4
|
+
// This is the FIRST example to use manic's loop layer: `let` variables,
|
|
5
|
+
// arithmetic in arguments, a `for` range loop, and id interpolation (`s5{i}`).
|
|
6
|
+
// The four bar-sets differ only in n / prefix / colour — a future `def` macro
|
|
7
|
+
// would collapse them to one call; loops already do the per-bar work.
|
|
8
|
+
//
|
|
9
|
+
// manic examples/area_under_curve.manic
|
|
10
|
+
// manic examples/area_under_curve.manic --record out --fps 60
|
|
11
|
+
|
|
12
|
+
title("Area Under a Curve");
|
|
13
|
+
canvas(1280, 720);
|
|
14
|
+
|
|
15
|
+
// --- parameters (edit freely) ---
|
|
16
|
+
let ox = 360; let oy = 590; // origin, in screen px
|
|
17
|
+
let ux = 200; let uy = 52; // px per unit on each axis
|
|
18
|
+
let a = 0; let b = 2.5; // integrate x^2 over [a, b]
|
|
19
|
+
|
|
20
|
+
text(head, (640, 96), "a Riemann sum becomes an integral");
|
|
21
|
+
display(head); color(head, cyan); size(head, 26); hidden(head);
|
|
22
|
+
text(cap, (640, 656), ""); color(cap, dim); size(cap, 24);
|
|
23
|
+
|
|
24
|
+
// axes
|
|
25
|
+
arrow(xax, (ox - 40, oy), (920, oy)); color(xax, dim); untraced(xax);
|
|
26
|
+
arrow(yax, (ox, oy + 20), (ox, 250)); color(yax, dim); untraced(yax);
|
|
27
|
+
text(t1, (ox + 1*ux, oy + 24), "1"); color(t1, dim); size(t1, 18);
|
|
28
|
+
text(t2, (ox + 2*ux, oy + 24), "2"); color(t2, dim); size(t2, 18);
|
|
29
|
+
text(tb, (ox + b*ux, oy + 24), "2.5"); color(tb, dim); size(tb, 18);
|
|
30
|
+
|
|
31
|
+
// the curve y = x^2 over [0, 2.5]
|
|
32
|
+
plot(curve, (ox, oy), ux, uy, "x*x", (a, b)); color(curve, cyan); z(curve, 3); untraced(curve);
|
|
33
|
+
text(clab, (ox + b*ux + 30, oy - b*b*uy), "y = x^2"); color(clab, cyan); size(clab, 22); hidden(clab);
|
|
34
|
+
|
|
35
|
+
// --- midpoint rectangles, one loop per count ---
|
|
36
|
+
let n = 5; let dx = (b - a) / n;
|
|
37
|
+
for i in 0..n {
|
|
38
|
+
let mid = a + (i + 0.5) * dx; let h = mid * mid;
|
|
39
|
+
rect(s5{i}, (ox + mid*ux, oy - h*uy/2), dx*ux, h*uy);
|
|
40
|
+
filled(s5{i}); color(s5{i}, magenta); opacity(s5{i}, 0.4); tag(s5{i}, r5);
|
|
41
|
+
}
|
|
42
|
+
let n = 10; let dx = (b - a) / n;
|
|
43
|
+
for i in 0..n {
|
|
44
|
+
let mid = a + (i + 0.5) * dx; let h = mid * mid;
|
|
45
|
+
rect(s10{i}, (ox + mid*ux, oy - h*uy/2), dx*ux, h*uy);
|
|
46
|
+
filled(s10{i}); color(s10{i}, magenta); opacity(s10{i}, 0.4); tag(s10{i}, r10);
|
|
47
|
+
}
|
|
48
|
+
let n = 20; let dx = (b - a) / n;
|
|
49
|
+
for i in 0..n {
|
|
50
|
+
let mid = a + (i + 0.5) * dx; let h = mid * mid;
|
|
51
|
+
rect(s20{i}, (ox + mid*ux, oy - h*uy/2), dx*ux, h*uy);
|
|
52
|
+
filled(s20{i}); color(s20{i}, magenta); opacity(s20{i}, 0.4); tag(s20{i}, r20);
|
|
53
|
+
}
|
|
54
|
+
let n = 40; let dx = (b - a) / n;
|
|
55
|
+
for i in 0..n {
|
|
56
|
+
let mid = a + (i + 0.5) * dx; let h = mid * mid;
|
|
57
|
+
rect(s40{i}, (ox + mid*ux, oy - h*uy/2), dx*ux, h*uy);
|
|
58
|
+
filled(s40{i}); color(s40{i}, magenta); opacity(s40{i}, 0.4); tag(s40{i}, r40);
|
|
59
|
+
}
|
|
60
|
+
hidden(r5); hidden(r10); hidden(r20); hidden(r40);
|
|
61
|
+
|
|
62
|
+
// --- script ---
|
|
63
|
+
show(head, 0.5);
|
|
64
|
+
say(cap, "the shaded area under y = x^2 from 0 to 2.5");
|
|
65
|
+
par { draw(xax, 0.5); draw(yax, 0.5); }
|
|
66
|
+
draw(curve, 0.9);
|
|
67
|
+
show(clab, 0.3);
|
|
68
|
+
wait(0.4);
|
|
69
|
+
|
|
70
|
+
section("Rectangles");
|
|
71
|
+
say(cap, "n = 5 rectangles -> area ~ 5.16");
|
|
72
|
+
show(r5, 0.6);
|
|
73
|
+
wait(0.7);
|
|
74
|
+
fade(r5, 0.3);
|
|
75
|
+
|
|
76
|
+
say(cap, "n = 10 -> area ~ 5.20");
|
|
77
|
+
show(r10, 0.5);
|
|
78
|
+
wait(0.6);
|
|
79
|
+
fade(r10, 0.3);
|
|
80
|
+
|
|
81
|
+
say(cap, "n = 20 -> area ~ 5.20");
|
|
82
|
+
show(r20, 0.5);
|
|
83
|
+
wait(0.6);
|
|
84
|
+
fade(r20, 0.3);
|
|
85
|
+
|
|
86
|
+
say(cap, "n = 40 -> area ~ 5.21 (hugging the curve)");
|
|
87
|
+
show(r40, 0.5);
|
|
88
|
+
wait(0.8);
|
|
89
|
+
|
|
90
|
+
section("The integral");
|
|
91
|
+
say(cap, "as n grows without bound, the sum IS the integral");
|
|
92
|
+
fade(r40, 0.4);
|
|
93
|
+
text(ans, (640, 300), "exact area = 125/24 = 5.208"); display(ans); color(ans, lime); size(ans, 30); hidden(ans);
|
|
94
|
+
show(ans, 0.5);
|
|
95
|
+
pulse(ans);
|
|
96
|
+
wait(1.6);
|
|
97
|
+
|
|
98
|
+
// BEGIN WORKBENCH CANVAS
|
|
99
|
+
// Scene built visually. Every line is ordinary Manic — edit freely.
|
|
100
|
+
template("black");
|
|
101
|
+
|
|
102
|
+
text(idea, (351, 89), "Start with an idea");
|
|
103
|
+
size(idea, 52);
|
|
104
|
+
color(idea, fg);
|
|
105
|
+
hidden(idea);
|
|
106
|
+
|
|
107
|
+
circle(focus, (509, 397), 118);
|
|
108
|
+
color(focus, cyan);
|
|
109
|
+
hidden(focus, center);
|
|
110
|
+
|
|
111
|
+
text(note, (362, 605), "Add, arrange, then animate.");
|
|
112
|
+
size(note, 26);
|
|
113
|
+
color(note, dim);
|
|
114
|
+
hidden(note);
|
|
115
|
+
|
|
116
|
+
rect(rect, (197, 285), 240, 140);
|
|
117
|
+
color(rect, magenta);
|
|
118
|
+
|
|
119
|
+
step("Reveal") {
|
|
120
|
+
stagger(0.2) {
|
|
121
|
+
show(idea, 0.6);
|
|
122
|
+
show(focus, 0.7, overshoot);
|
|
123
|
+
show(note, 0.5);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
step("Focus") {
|
|
128
|
+
pulse(focus, 0.9);
|
|
129
|
+
flash(idea, gold, 0.9);
|
|
130
|
+
}
|
|
131
|
+
// END WORKBENCH CANVAS
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// art-rakkan — E.C.H (Eiichi Ishii)'s "dailycoding 20260803" reimagined as ONE
|
|
2
|
+
// per-pixel `shader`. The p5 original scatters ~100 lens/eye modules (parallel
|
|
3
|
+
// bowed béziers inside a rounded shape, some with a soft-shadow glow) across a
|
|
4
|
+
// white field and stamps a red rakkan (落款, artist's seal) in the corner. manic
|
|
5
|
+
// can't draw béziers per pixel — but the LOOK is an SDF field: each module is a
|
|
6
|
+
// `sdvesica` lens filled with bowed stripe-veins, scattered by a per-cell hash,
|
|
7
|
+
// a few carrying a `gaussian` glow; the seal is a `sdroundbox` with white marks.
|
|
8
|
+
// Pure in (u,v,t) — the whole plate scrubs and records; a slow breath keeps it live.
|
|
9
|
+
//
|
|
10
|
+
// manic examples/art-rakkan.manic
|
|
11
|
+
title("Rakkan — E.C.H generative art, reimagined per-pixel");
|
|
12
|
+
canvas("1:1");
|
|
13
|
+
template("black");
|
|
14
|
+
|
|
15
|
+
shader(art) {
|
|
16
|
+
// --- paper ground (warm off-white with a fine tooth) ---
|
|
17
|
+
let grain = rand2(floor(u * 540.0), floor(v * 540.0));
|
|
18
|
+
let paper = 0.95 - 0.035 * grain;
|
|
19
|
+
|
|
20
|
+
// --- scattered lens modules: tile into cells, hash each cell ---
|
|
21
|
+
let C = 0.135; // cell size
|
|
22
|
+
let gx = floor(u / C);
|
|
23
|
+
let gy = floor(v / C);
|
|
24
|
+
let present = step(0.42, rand2(gx, gy)); // ~58% of cells carry a module
|
|
25
|
+
let lu = fract(u / C) - 0.5; // local coord in the cell
|
|
26
|
+
let lv = fract(v / C) - 0.5;
|
|
27
|
+
let jx = (rand2(gx + 3.3, gy) - 0.5) * 0.34; // jitter the centre
|
|
28
|
+
let jy = (rand2(gx, gy + 4.7) - 0.5) * 0.34;
|
|
29
|
+
let ex = lu - jx;
|
|
30
|
+
let ey = lv - jy;
|
|
31
|
+
let flip = step(0.5, rand2(gx + 9.1, gy + 2.2)); // 90° orientation
|
|
32
|
+
let ax = mix(ex, ey, flip);
|
|
33
|
+
let ay = mix(ey, ex, flip);
|
|
34
|
+
let sz = 0.30 + 0.12 * rand2(gx + 6.0, gy + 6.0); // half-size (fits the cell)
|
|
35
|
+
|
|
36
|
+
// the lens (vesica) + bowed parallel veins inside it
|
|
37
|
+
let d = sdvesica(ax / sz, ay / sz, 1.0, 0.62);
|
|
38
|
+
let inside = step(d, 0.0);
|
|
39
|
+
let nv = 4.0 + floor(4.0 * rand2(gx + 1.1, gy + 1.1)); // 4..7 veins
|
|
40
|
+
let bow = ay / sz + 0.32 * (ax / sz) * (ax / sz); // bow toward centre
|
|
41
|
+
let stripe = abs(fract(bow * nv) - 0.5);
|
|
42
|
+
let veins = inside * smoothstep(0.14, 0.05, stripe);
|
|
43
|
+
let outline = smoothstep(0.04, 0.0, abs(d));
|
|
44
|
+
let ink = present * clamp(outline + veins, 0.0, 1.0);
|
|
45
|
+
|
|
46
|
+
// --- soft glow dot on a few modules (the p5 shadow-blur ellipse) ---
|
|
47
|
+
let glowon = present * step(0.82, rand2(gx + 13.0, gy + 11.0));
|
|
48
|
+
let pulse = 0.7 + 0.3 * sin(t * 0.8 + gx + gy);
|
|
49
|
+
let glow = glowon * gaussian(hypot(lu, lv), 0.15) * 0.6 * pulse; // tight round soft dot
|
|
50
|
+
|
|
51
|
+
// --- compose the greyscale field: paper, dark ink, soft glow ---
|
|
52
|
+
let field = clamp(mix(paper, 0.07, ink) + glow, 0.0, 1.0);
|
|
53
|
+
|
|
54
|
+
// --- red rakkan seal, bottom-left (rounded stone + white seal-script marks) ---
|
|
55
|
+
let sx = u - 0.135;
|
|
56
|
+
let sy = v - 0.85;
|
|
57
|
+
let body = step(sdroundbox(sx, sy, 0.05, 0.08, 0.014), 0.0);
|
|
58
|
+
let inner = step(sdroundbox(sx, sy, 0.035, 0.065, 0.006), 0.0); // inset mark area (stone border)
|
|
59
|
+
let vb = step(0.28, abs(fract(sx * 42.0) - 0.5)); // vertical seal strokes
|
|
60
|
+
let hb = step(0.30, abs(fract(sy * 30.0) - 0.5)); // broken into a seal-script lattice
|
|
61
|
+
let marks = inner * vb * hb;
|
|
62
|
+
|
|
63
|
+
// red = #e2041b ≈ (0.886, 0.016, 0.106); marks paint the paper-white back in
|
|
64
|
+
let r = mix(field, mix(0.886, paper, marks), body);
|
|
65
|
+
let g = mix(field, mix(0.016, paper, marks), body);
|
|
66
|
+
let b = mix(field, mix(0.106, paper, marks), body);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
wait(12);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// aspheric-lens.manic — how an asphere kills spherical aberration
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// A prescription surface has a CONIC constant. A plain spherical lens can't
|
|
5
|
+
// focus a wide beam to a point — the edges bend too much (spherical aberration,
|
|
6
|
+
// a blur). Reshape that surface into the right ellipse/hyperbola (a conic ≠ 0)
|
|
7
|
+
// and every ray meets at ONE point. Two real ray-traced lenses, side by side:
|
|
8
|
+
// same shape, one spherical, one aspheric.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Aspheric Correction");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
|
|
14
|
+
spotdiagram(sph, (360, 380), "plano-convex"); // spherical surface → a blur
|
|
15
|
+
spotdiagram(asp, (912, 380), "aspheric"); // conic surface (K≈−0.55) → a point
|
|
16
|
+
|
|
17
|
+
text(cap, (cx, h - 46), ""); color(cap, fg); size(cap, 24); bold(cap); display(cap); sticky(cap);
|
|
18
|
+
|
|
19
|
+
// ================= THE SCENE =================
|
|
20
|
+
say(cap, "same lens shape — where do the rays land at focus?", 0.5);
|
|
21
|
+
wait(0.4);
|
|
22
|
+
|
|
23
|
+
say(cap, "a SPHERICAL surface can't focus the edges — a blur (RMS 1.5 px)", 0.3);
|
|
24
|
+
draw(sph.dots, 1.6);
|
|
25
|
+
wait(0.6);
|
|
26
|
+
|
|
27
|
+
say(cap, "reshape it to an ASPHERE (conic surface) — a point (RMS 0.1 px)", 0.3);
|
|
28
|
+
draw(asp.dots, 1.4);
|
|
29
|
+
wait(0.6);
|
|
30
|
+
|
|
31
|
+
say(cap, "one conic constant in the prescription — spherical aberration, gone", 0.3);
|
|
32
|
+
wait(1.2);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// astronomical-watch — a textbook orrery: a clockwork solar system built from
|
|
2
|
+
// REAL SVG assets (Twemoji, vendored by scripts/fetch-svg-assets.sh). The Sun
|
|
3
|
+
// and eight planets are imported vector art; each planet is swept around the Sun by
|
|
4
|
+
// `turn` about the shared pivot, inner planets faster (Kepler's third law). The
|
|
5
|
+
// starfield is a `cloud` (per-point `alpha` twinkle), and the eight real
|
|
6
|
+
// moon-phase glyphs run along the bottom. The maths is derived on the left.
|
|
7
|
+
//
|
|
8
|
+
// # assets first (one-time): scripts/fetch-svg-assets.sh
|
|
9
|
+
// manic examples/astronomical-watch.manic
|
|
10
|
+
title("An orrery — a clockwork solar system");
|
|
11
|
+
canvas(1280, 720);
|
|
12
|
+
template("black");
|
|
13
|
+
|
|
14
|
+
// ---- starfield (a dense cloud; drifts, twinkles, and has depth) ----
|
|
15
|
+
cloud(stars, 320, #dfeaff, 1) {
|
|
16
|
+
let x = 1280 * noise(i, 1);
|
|
17
|
+
let y = mod(720 * noise(i, 5) + t * 8, 720); // slow drift down + wrap
|
|
18
|
+
let sz = noise(i, 9);
|
|
19
|
+
let r = 1.1 + sz * sz * 2.6; // 1.1..3.7 — depth, all visible
|
|
20
|
+
let alpha = 0.62 + 0.34 * sin(t * (1.0 + noise(i, 3)) + i * 7); // 0.28..0.96
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ---- orbit rings (faint, dashed), centred on the Sun at (830, 300) ----
|
|
24
|
+
circle(r1, (830, 300), 40); outlined(r1); dashed(r1); color(r1, #2a2a4e);
|
|
25
|
+
circle(r2, (830, 300), 64); outlined(r2); dashed(r2); color(r2, #2a2a4e);
|
|
26
|
+
circle(r3, (830, 300), 90); outlined(r3); dashed(r3); color(r3, #2a2a4e);
|
|
27
|
+
circle(r4, (830, 300), 118); outlined(r4); dashed(r4); color(r4, #2a2a4e);
|
|
28
|
+
circle(r5, (830, 300), 152); outlined(r5); dashed(r5); color(r5, #2a2a4e);
|
|
29
|
+
circle(r6, (830, 300), 192); outlined(r6); dashed(r6); color(r6, #2a2a4e);
|
|
30
|
+
circle(r7, (830, 300), 232); outlined(r7); dashed(r7); color(r7, #2a2a4e);
|
|
31
|
+
circle(r8, (830, 300), 270); outlined(r8); dashed(r8); color(r8, #2a2a4e);
|
|
32
|
+
|
|
33
|
+
// ---- the Sun + all eight planets (real imported SVGs) ----
|
|
34
|
+
svg(sun, (830, 300), "asset:svg/emoji/sun.svg", 60);
|
|
35
|
+
svg(mercury, (870, 300), "asset:svg/emoji/mercury.svg", 15);
|
|
36
|
+
svg(venus, (894, 300), "asset:svg/emoji/venus.svg", 22);
|
|
37
|
+
svg(earth, (920, 300), "asset:svg/emoji/earth.svg", 26);
|
|
38
|
+
svg(mars, (948, 300), "asset:svg/emoji/mars.svg", 19);
|
|
39
|
+
svg(jupiter, (982, 300), "asset:svg/emoji/jupiter.svg", 40);
|
|
40
|
+
svg(saturn, (1022, 300), "asset:svg/emoji/saturn.svg", 46);
|
|
41
|
+
svg(uranus, (1062, 300), "asset:svg/emoji/uranus.svg", 28);
|
|
42
|
+
svg(neptune, (1100, 300), "asset:svg/emoji/neptune.svg", 28);
|
|
43
|
+
|
|
44
|
+
// ---- the lesson (left column; text/caption CENTRE on their point) ----
|
|
45
|
+
caption(head, "A clockwork solar system", (240, 54), 30);
|
|
46
|
+
caption(sub, "inner planets orbit faster", (240, 98), 20);
|
|
47
|
+
hidden(head);
|
|
48
|
+
hidden(sub);
|
|
49
|
+
equation(eq1, (240, 240), `\vec p = (R\cos\omega t,\; R\sin\omega t)`, 26);
|
|
50
|
+
text(lab1, (240, 292), "swept around the Sun");
|
|
51
|
+
hidden(eq1);
|
|
52
|
+
hidden(lab1);
|
|
53
|
+
equation(eq2, (240, 410), `T^{2} \propto R^{3}`, 34);
|
|
54
|
+
text(lab2, (240, 466), "far = slow (Kepler)");
|
|
55
|
+
hidden(eq2);
|
|
56
|
+
hidden(lab2);
|
|
57
|
+
|
|
58
|
+
// ---- the Moon's phases: eight real glyphs along the bottom ----
|
|
59
|
+
caption(moonlab, "the Moon's phases", (640, 620), 22);
|
|
60
|
+
svg(p1, (300, 668), "asset:svg/emoji/newmoon.svg", 42);
|
|
61
|
+
svg(p2, (405, 668), "asset:svg/emoji/waxingcrescent.svg",42);
|
|
62
|
+
svg(p3, (510, 668), "asset:svg/emoji/firstquarter.svg", 42);
|
|
63
|
+
svg(p4, (615, 668), "asset:svg/emoji/waxinggibbous.svg", 42);
|
|
64
|
+
svg(p5, (720, 668), "asset:svg/emoji/fullmoon.svg", 42);
|
|
65
|
+
svg(p6, (825, 668), "asset:svg/emoji/waninggibbous.svg", 42);
|
|
66
|
+
svg(p7, (930, 668), "asset:svg/emoji/lastquarter.svg", 42);
|
|
67
|
+
svg(p8, (1035, 668),"asset:svg/emoji/waningcrescent.svg",42);
|
|
68
|
+
hidden(moonlab);
|
|
69
|
+
hidden(p1); hidden(p2); hidden(p3); hidden(p4);
|
|
70
|
+
hidden(p5); hidden(p6); hidden(p7); hidden(p8);
|
|
71
|
+
|
|
72
|
+
// ---- run it: planets orbit (in parallel), the lesson reveals alongside ----
|
|
73
|
+
par {
|
|
74
|
+
turn(mercury, (830, 300), 4320, 24, linear); // 12 revolutions — fastest
|
|
75
|
+
turn(venus, (830, 300), 2520, 24, linear); // 7
|
|
76
|
+
turn(earth, (830, 300), 1620, 24, linear); // 4.5
|
|
77
|
+
turn(mars, (830, 300), 1080, 24, linear); // 3
|
|
78
|
+
turn(jupiter, (830, 300), 432, 24, linear); // 1.2
|
|
79
|
+
turn(saturn, (830, 300), 252, 24, linear); // 0.7
|
|
80
|
+
turn(uranus, (830, 300), 162, 24, linear); // 0.45
|
|
81
|
+
turn(neptune, (830, 300), 108, 24, linear); // 0.3 — slowest
|
|
82
|
+
seq {
|
|
83
|
+
show(head);
|
|
84
|
+
wait(0.9);
|
|
85
|
+
show(sub);
|
|
86
|
+
wait(1.4);
|
|
87
|
+
show(eq1); show(lab1);
|
|
88
|
+
wait(2.4);
|
|
89
|
+
show(eq2); show(lab2);
|
|
90
|
+
wait(2.2);
|
|
91
|
+
show(moonlab);
|
|
92
|
+
show(p1); show(p2); show(p3); show(p4);
|
|
93
|
+
show(p5); show(p6); show(p7); show(p8);
|
|
94
|
+
wait(4);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// The seven Asymptote randomwalk examples reduce to two reusable models:
|
|
2
|
+
// six world-axis choices, or a local 3D turtle that turns by 90°/60°.
|
|
3
|
+
|
|
4
|
+
title("Deterministic 3D Random Walks");
|
|
5
|
+
canvas("16:9");
|
|
6
|
+
template("mono");
|
|
7
|
+
|
|
8
|
+
watermark(mark, (w*0.11,h*0.075), "Made With Manic");
|
|
9
|
+
text(kicker, (cx,h*0.07), "GENERATIVE 3D · RANDOMWALK3");
|
|
10
|
+
text(headline, (cx,h*0.13), "The seed fixes the journey. The model changes its shape.");
|
|
11
|
+
text(caption, (cx,h*0.91), "Axis walk · uniform choices · direction colour · camera-aware depth");
|
|
12
|
+
size(kicker,19); bold(kicker); color(kicker,dim);
|
|
13
|
+
size(headline,32); bold(headline);
|
|
14
|
+
size(caption,20); bold(caption); color(caption,gold);
|
|
15
|
+
|
|
16
|
+
camera3((12,-15,10),(0,0,0),38,orthographic);
|
|
17
|
+
|
|
18
|
+
randomwalk3(axisWalk, (0,0,0), 12000, 21,
|
|
19
|
+
"mode=axis distribution=uniform color=direction shade=depth scale=0.12");
|
|
20
|
+
untraced(axisWalk);
|
|
21
|
+
|
|
22
|
+
randomwalk3(turtle90, (0,0,0), 9000, 21,
|
|
23
|
+
"mode=turtle angle=90 distribution=gaussian color=turn shade=depth scale=0.12");
|
|
24
|
+
untraced(turtle90); hidden(turtle90);
|
|
25
|
+
|
|
26
|
+
randomwalk3(turtle60, (0,0,0), 9000, 21,
|
|
27
|
+
"mode=turtle angle=60 distribution=uniform color=turn shade=depth scale=0.12");
|
|
28
|
+
untraced(turtle60); hidden(turtle60);
|
|
29
|
+
|
|
30
|
+
step("six world directions") {
|
|
31
|
+
par { draw(axisWalk,2.20,smooth); view3(axisWalk,"fit",0.60,smooth,1.20); }
|
|
32
|
+
}
|
|
33
|
+
wait(0.65);
|
|
34
|
+
|
|
35
|
+
step("the frame can turn with the walker") {
|
|
36
|
+
par {
|
|
37
|
+
fade(axisWalk,0.40);
|
|
38
|
+
show(turtle90,0.05);
|
|
39
|
+
say(caption,"Turtle frame · Gaussian choices · 90° turns",0.40);
|
|
40
|
+
}
|
|
41
|
+
par { draw(turtle90,2.20,smooth); view3(turtle90,"fit",0.60,smooth,1.20); }
|
|
42
|
+
}
|
|
43
|
+
wait(0.65);
|
|
44
|
+
|
|
45
|
+
step("change one angle") {
|
|
46
|
+
par {
|
|
47
|
+
fade(turtle90,0.40);
|
|
48
|
+
show(turtle60,0.05);
|
|
49
|
+
say(caption,"Turtle frame · uniform choices · 60° turns",0.40);
|
|
50
|
+
}
|
|
51
|
+
par { draw(turtle60,2.20,smooth); view3(turtle60,"fit",0.60,smooth,1.20); }
|
|
52
|
+
}
|
|
53
|
+
wait(0.70);
|
|
54
|
+
|
|
55
|
+
step("inspect the structure") {
|
|
56
|
+
orbit3(115,28,13,2.10,smooth);
|
|
57
|
+
}
|
|
58
|
+
wait(1.20);
|