@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,156 @@
|
|
|
1
|
+
// circle-in-three — a story-driven textbook plate: divide one round cake among
|
|
2
|
+
// three friends using exactly two straight cuts. Wrong ideas first, then the
|
|
3
|
+
// lemma (crossing cuts always give four pieces), then the transcendental
|
|
4
|
+
// equation, solved on a graph, then the fair cut - live percentages throughout.
|
|
5
|
+
// The solved height: cos^-1(u) - u sqrt(1-u^2) = pi/3 => u = a/R = 0.2649.
|
|
6
|
+
title("Split a Circle in Three - with Two Lines");
|
|
7
|
+
canvas("16:9");
|
|
8
|
+
template("paper");
|
|
9
|
+
masthead("The Problem Book", "Plate VII");
|
|
10
|
+
|
|
11
|
+
// ---------- layout ----------
|
|
12
|
+
let R = 205;
|
|
13
|
+
let ox = 400;
|
|
14
|
+
let oy = 400;
|
|
15
|
+
let dyE = R/3; // "evenly spaced" cut height (the wrong guess)
|
|
16
|
+
let dyS = 0.2649*R; // the solved cut height
|
|
17
|
+
let sf = 1.0228; // chord length ratio: sqrt(1-0.2649^2)/sqrt(8/9)
|
|
18
|
+
|
|
19
|
+
// ---------- HUD ----------
|
|
20
|
+
text(head, (cx, 100), "Split a Circle in Three - with Two Lines"); display(head); cursor(head); sticky(head);
|
|
21
|
+
text(cap, (cx, h - 40), ""); size(cap, 26); sticky(cap);
|
|
22
|
+
text(fig, (ox, 648), ""); size(fig, 24); color(fig, dim); sticky(fig);
|
|
23
|
+
|
|
24
|
+
// ---------- the cake ----------
|
|
25
|
+
circle(cake, (ox, oy), R); outlined(cake); stroke(cake, 3); untraced(cake);
|
|
26
|
+
|
|
27
|
+
// attempt 1: two diameters
|
|
28
|
+
line(d1, (ox, oy - R), (ox, oy + R)); untraced(d1); stroke(d1, 3);
|
|
29
|
+
line(d2, (ox - R, oy), (ox + R, oy)); untraced(d2); stroke(d2, 3);
|
|
30
|
+
text(q1, (ox + 70, oy - 70), "1"); size(q1, 30); hidden(q1); tag(q1, qlab);
|
|
31
|
+
text(q2, (ox - 70, oy - 70), "2"); size(q2, 30); hidden(q2); tag(q2, qlab);
|
|
32
|
+
text(q3, (ox - 70, oy + 70), "3"); size(q3, 30); hidden(q3); tag(q3, qlab);
|
|
33
|
+
text(q4, (ox + 70, oy + 70), "4"); size(q4, 30); hidden(q4); tag(q4, qlab);
|
|
34
|
+
|
|
35
|
+
// attempt 2: parallel cuts at thirds (they will SLIDE to the true height later)
|
|
36
|
+
line(cA1, (ox - R*0.94281, oy - dyE), (ox + R*0.94281, oy - dyE)); untraced(cA1); stroke(cA1, 4); color(cA1, red);
|
|
37
|
+
line(cB1, (ox - R*0.94281, oy + dyE), (ox + R*0.94281, oy + dyE)); untraced(cB1); stroke(cB1, 4); color(cB1, red);
|
|
38
|
+
|
|
39
|
+
// boolean sources (hidden): the disc and the horizontal bands
|
|
40
|
+
circle(disc, (ox, oy), R); hidden(disc);
|
|
41
|
+
rect(rT2, (ox, oy - dyE - 75), 430, 150); hidden(rT2);
|
|
42
|
+
rect(rM2, (ox, oy), 430, 2*dyE); hidden(rM2);
|
|
43
|
+
rect(rB2, (ox, oy + dyE + 75), 430, 150); hidden(rB2);
|
|
44
|
+
rect(rT3, (ox, oy - dyS - 75), 430, 150); hidden(rT3);
|
|
45
|
+
rect(rM3, (ox, oy), 430, 2*dyS); hidden(rM3);
|
|
46
|
+
rect(rB3, (ox, oy + dyS + 75), 430, 150); hidden(rB3);
|
|
47
|
+
|
|
48
|
+
// the three shares, evenly-spaced version (29.2 / 41.7 / 29.2)
|
|
49
|
+
intersect(capT2, disc, rT2); color(capT2, cyan); opacity(capT2, 0.45); hidden(capT2); tag(capT2, att2);
|
|
50
|
+
intersect(mid2, disc, rM2); color(mid2, gold); opacity(mid2, 0.45); hidden(mid2); tag(mid2, att2);
|
|
51
|
+
intersect(capB2, disc, rB2); color(capB2, magenta); opacity(capB2, 0.45); hidden(capB2); tag(capB2, att2);
|
|
52
|
+
|
|
53
|
+
// the three shares, solved version (33.3 each)
|
|
54
|
+
intersect(capT3, disc, rT3); color(capT3, cyan); opacity(capT3, 0.45); hidden(capT3); tag(capT3, att3);
|
|
55
|
+
intersect(mid3, disc, rM3); color(mid3, gold); opacity(mid3, 0.45); hidden(mid3); tag(mid3, att3);
|
|
56
|
+
intersect(capB3, disc, rB3); color(capB3, magenta); opacity(capB3, 0.45); hidden(capB3); tag(capB3, att3);
|
|
57
|
+
|
|
58
|
+
// live percentages, one per share
|
|
59
|
+
counter(pcT, (ox, oy - 128), 0, 1, "", "%"); hidden(pcT);
|
|
60
|
+
counter(pcM, (ox, oy), 0, 1, "", "%"); hidden(pcM);
|
|
61
|
+
counter(pcB, (ox, oy + 128), 0, 1, "", "%"); hidden(pcB);
|
|
62
|
+
|
|
63
|
+
// ---------- the mathematics panel (right side) ----------
|
|
64
|
+
equation(eqA, (960, 205), `A_{\text{cap}}(a) \;=\; R^2\cos^{-1}\!\frac{a}{R} \;-\; a\sqrt{R^2-a^2}`, 32); hidden(eqA); sticky(eqA);
|
|
65
|
+
equation(eqG, (960, 430), `f(u)=\cos^{-1}u \;-\; u\sqrt{1-u^2} \;-\; \tfrac{\pi}{3}`, 26); hidden(eqG); sticky(eqG);
|
|
66
|
+
arrow(gxa, (850, 560), (1195, 560)); untraced(gxa); stroke(gxa, 2);
|
|
67
|
+
arrow(gya, (880, 655), (880, 495)); untraced(gya); stroke(gya, 2);
|
|
68
|
+
plot(pf, (880, 560), 300, 90, "acos(x)-x*sqrt(1-x^2)-1.047198", (0.01, 0.99));
|
|
69
|
+
untraced(pf); stroke(pf, 3); color(pf, blue);
|
|
70
|
+
roots(rt, pf, magenta); hidden(rt);
|
|
71
|
+
text(rlab, (1040, 596), "u ≈ 0.2649"); size(rlab, 24); color(rlab, magenta); hidden(rlab);
|
|
72
|
+
|
|
73
|
+
// ================= timeline =================
|
|
74
|
+
|
|
75
|
+
// ---- the problem
|
|
76
|
+
type(head, 1.1);
|
|
77
|
+
say(cap, "Three friends. One round cake. Two straight cuts. Make it fair.", 0.6);
|
|
78
|
+
draw(cake, 1.2);
|
|
79
|
+
say(fig, "Fig. 1 - the cake", 0.3);
|
|
80
|
+
wait(0.5);
|
|
81
|
+
|
|
82
|
+
// ---- attempt 1: through the middle, twice
|
|
83
|
+
cue(whoosh);
|
|
84
|
+
say(cap, "First idea: cut through the middle - twice.", 0.5);
|
|
85
|
+
par { draw(d1, 0.7); draw(d2, 0.7); }
|
|
86
|
+
stagger(0.12) { show(q1, 0.3); show(q2, 0.3); show(q3, 0.3); show(q4, 0.3); }
|
|
87
|
+
say(cap, "Four pieces. Perfectly equal - and perfectly useless. We are THREE.", 0.5);
|
|
88
|
+
wait(0.6);
|
|
89
|
+
|
|
90
|
+
// ---- the lemma: crossing cuts always make four
|
|
91
|
+
say(cap, "Tilt a cut, slide it anywhere: two CROSSING cuts always make four pieces.", 0.5);
|
|
92
|
+
rotate(d2, 38, 1.0, smooth);
|
|
93
|
+
shift(d2, (55, 35), 1.0, smooth);
|
|
94
|
+
pulse(qlab, 0.8);
|
|
95
|
+
say(cap, "Lemma: the two cuts must never cross inside the cake. They must be PARALLEL.", 0.5);
|
|
96
|
+
cue(tick);
|
|
97
|
+
par { fade(d1, 0.5); fade(d2, 0.5); fade(qlab, 0.4); }
|
|
98
|
+
|
|
99
|
+
// ---- attempt 2: parallel, evenly spaced
|
|
100
|
+
say(fig, "Fig. 2 - parallel cuts at thirds", 0.3);
|
|
101
|
+
say(cap, "Second idea: space the parallel cuts evenly - at thirds of the diameter.", 0.5);
|
|
102
|
+
par { draw(cA1, 0.7); draw(cB1, 0.7); }
|
|
103
|
+
stagger(0.15) { show(capT2, 0.5); show(mid2, 0.5); show(capB2, 0.5); }
|
|
104
|
+
par { show(pcT, 0.3); show(pcM, 0.3); show(pcB, 0.3); }
|
|
105
|
+
par { to(pcT, value, 29.2, 1.3, smooth); to(pcM, value, 41.7, 1.3, smooth); to(pcB, value, 29.2, 1.3, smooth); }
|
|
106
|
+
cue(pop);
|
|
107
|
+
flash(mid2, gold);
|
|
108
|
+
say(cap, "The middle friend grins: 41.7 percent. Evenly SPACED is not evenly SHARED.", 0.5);
|
|
109
|
+
wait(0.8);
|
|
110
|
+
|
|
111
|
+
// ---- the mathematics: ask the cake
|
|
112
|
+
say(cap, "So ask the cake: how much lies beyond a cut at height a?", 0.5);
|
|
113
|
+
show(eqA, 0.6);
|
|
114
|
+
wait(0.8);
|
|
115
|
+
cue(tick);
|
|
116
|
+
rewrite(eqA, `R^2\cos^{-1}\!\frac{a}{R} - a\sqrt{R^2-a^2} \;=\; \frac{\pi R^2}{3}`, 0.9);
|
|
117
|
+
say(cap, "Each outer piece must hold a third of the cake. Divide out the radius...", 0.5);
|
|
118
|
+
cue(tick);
|
|
119
|
+
rewrite(eqA, `\cos^{-1}u \;-\; u\sqrt{1-u^2} \;=\; \frac{\pi}{3}, \qquad u=\frac{a}{R}`, 0.9);
|
|
120
|
+
say(cap, "No algebra unties this knot - it is transcendental. Let the graph solve it.", 0.5);
|
|
121
|
+
say(fig, "Fig. 3 - solving f(u) = 0", 0.3);
|
|
122
|
+
par { draw(gxa, 0.5); draw(gya, 0.5); }
|
|
123
|
+
par { draw(pf, 1.3); show(eqG, 0.7); }
|
|
124
|
+
show(rt, 0.4); show(rlab, 0.4);
|
|
125
|
+
par { cam((959, 545), 1.0, smooth); zoom(1.6, 1.0, smooth); }
|
|
126
|
+
flash(rt, magenta);
|
|
127
|
+
say(cap, "One root. The cuts belong at u = 0.2649 - about a quarter of the radius.", 0.5);
|
|
128
|
+
wait(0.7);
|
|
129
|
+
par { cam((cx, cy), 1.0, smooth); zoom(1, 1.0, smooth); }
|
|
130
|
+
cue(tick);
|
|
131
|
+
rewrite(eqA, `u \;=\; \frac{a}{R} \;\approx\; 0.2649`, 0.9);
|
|
132
|
+
|
|
133
|
+
// ---- the fair cut: slide the knives home
|
|
134
|
+
say(cap, "Nudge each cut toward the centre: from 0.333 R in to 0.2649 R.", 0.5);
|
|
135
|
+
cue(whoosh);
|
|
136
|
+
par {
|
|
137
|
+
shift(cA1, (0, dyE - dyS), 1.4, smooth); scale(cA1, sf, 1.4, smooth);
|
|
138
|
+
shift(cB1, (0, dyS - dyE), 1.4, smooth); scale(cB1, sf, 1.4, smooth);
|
|
139
|
+
fade(att2, 1.2); show(capT3, 1.2); show(mid3, 1.2); show(capB3, 1.2);
|
|
140
|
+
}
|
|
141
|
+
par { to(pcT, value, 33.3, 1.3, smooth); to(pcM, value, 33.3, 1.3, smooth); to(pcB, value, 33.3, 1.3, smooth); }
|
|
142
|
+
cue(chime);
|
|
143
|
+
par { flash(capT3, cyan); flash(mid3, gold); flash(capB3, magenta); }
|
|
144
|
+
say(cap, "33.3 - 33.3 - 33.3. Fair, to the crumb.", 0.5);
|
|
145
|
+
say(fig, "Fig. 4 - the fair cut: a = 0.2649 R", 0.3);
|
|
146
|
+
wait(0.8);
|
|
147
|
+
|
|
148
|
+
// ---- closing plate
|
|
149
|
+
cue(tick);
|
|
150
|
+
rewrite(eqA, `\boxed{\;a \;=\; 0.2649\,R\;}`, 1.0);
|
|
151
|
+
par {
|
|
152
|
+
breathe(eqA, 3, 0.05, 0, 5);
|
|
153
|
+
seq { pulse(capT3, 0.7); pulse(mid3, 0.7); pulse(capB3, 0.7); }
|
|
154
|
+
}
|
|
155
|
+
say(cap, "Two cuts. Three equal shares. One transcendental number.", 0.6);
|
|
156
|
+
wait(2.5);
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// circle-thirds-no-triangle — Plate VIII of the Problem Book: cut a circle
|
|
2
|
+
// into three EQUAL areas, but the classic three-sector answer (and the
|
|
3
|
+
// equilateral triangle hiding inside it) is banned. Two triangle-free answers:
|
|
4
|
+
// 1. the bullseye: concentric circles at r1 = R/sqrt(3), r2 = R sqrt(2/3)
|
|
5
|
+
// 2. the waves: S-curves of semicircular arcs on a thirds-divided diameter;
|
|
6
|
+
// piece_k = (pi/2)(r_k^2 - r_{k-1}^2) + (pi/2)(s_{k-1}^2 - s_k^2)
|
|
7
|
+
// = (pi R^2/18)[(2k-1) + (7-2k)] = pi R^2 / 3 for EVERY k.
|
|
8
|
+
title("Three Equal Parts - No Triangles Allowed");
|
|
9
|
+
canvas("16:9");
|
|
10
|
+
template("paper");
|
|
11
|
+
masthead("The Problem Book", "Plate VIII");
|
|
12
|
+
|
|
13
|
+
// ---------- layout ----------
|
|
14
|
+
let R = 205;
|
|
15
|
+
let ox = 400;
|
|
16
|
+
let oy = 400;
|
|
17
|
+
let r1 = R*0.57735; // R / sqrt 3
|
|
18
|
+
let r2 = R*0.8165; // R sqrt(2/3)
|
|
19
|
+
|
|
20
|
+
// ---------- HUD ----------
|
|
21
|
+
text(head, (cx, 100), "Three Equal Parts - No Triangles Allowed"); display(head); cursor(head); sticky(head);
|
|
22
|
+
text(cap, (cx, h - 40), ""); size(cap, 26); sticky(cap);
|
|
23
|
+
text(fig, (ox, 648), ""); size(fig, 24); color(fig, dim); sticky(fig);
|
|
24
|
+
|
|
25
|
+
// ---------- the cake ----------
|
|
26
|
+
circle(cake, (ox, oy), R); outlined(cake); stroke(cake, 3); untraced(cake);
|
|
27
|
+
circle(disc, (ox, oy), R); hidden(disc); // hidden filled source for booleans
|
|
28
|
+
|
|
29
|
+
// ---------- act 1: the banned answer ----------
|
|
30
|
+
line(m1, (ox, oy), (ox, oy - R)); untraced(m1); stroke(m1, 3); tag(m1, merc);
|
|
31
|
+
line(m2, (ox, oy), (ox - R*0.866, oy + R*0.5)); untraced(m2); stroke(m2, 3); tag(m2, merc);
|
|
32
|
+
line(m3, (ox, oy), (ox + R*0.866, oy + R*0.5)); untraced(m3); stroke(m3, 3); tag(m3, merc);
|
|
33
|
+
line(e1, (ox, oy - R), (ox - R*0.866, oy + R*0.5)); dashed(e1); stroke(e1, 3); color(e1, red); untraced(e1); tag(e1, tri);
|
|
34
|
+
line(e2, (ox - R*0.866, oy + R*0.5), (ox + R*0.866, oy + R*0.5)); dashed(e2); stroke(e2, 3); color(e2, red); untraced(e2); tag(e2, tri);
|
|
35
|
+
line(e3, (ox + R*0.866, oy + R*0.5), (ox, oy - R)); dashed(e3); stroke(e3, 3); color(e3, red); untraced(e3); tag(e3, tri);
|
|
36
|
+
|
|
37
|
+
// ---------- act 2: the bullseye ----------
|
|
38
|
+
circle(c1, (ox, oy), r1); outlined(c1); stroke(c1, 3); untraced(c1); tag(c1, bull);
|
|
39
|
+
circle(c2, (ox, oy), r2); outlined(c2); stroke(c2, 3); untraced(c2); tag(c2, bull);
|
|
40
|
+
circle(c1d, (ox, oy), r1); hidden(c1d);
|
|
41
|
+
circle(c2d, (ox, oy), r2); hidden(c2d);
|
|
42
|
+
circle(fin, (ox, oy), r1); color(fin, cyan); opacity(fin, 0.45); hidden(fin); tag(fin, bull);
|
|
43
|
+
difference(ringM, c2d, c1d); color(ringM, gold); opacity(ringM, 0.45); hidden(ringM); tag(ringM, bull);
|
|
44
|
+
difference(ringO, disc, c2d); color(ringO, magenta); opacity(ringO, 0.45); hidden(ringO); tag(ringO, bull);
|
|
45
|
+
counter(pb1, (ox, oy), 0, 1, "", "%"); hidden(pb1); tag(pb1, bull);
|
|
46
|
+
counter(pb2, (ox, oy - 143), 0, 1, "", "%"); hidden(pb2); tag(pb2, bull);
|
|
47
|
+
counter(pb3, (ox, oy + 186), 0, 1, "", "%"); hidden(pb3); tag(pb3, bull);
|
|
48
|
+
equation(eqB, (960, 210), `\pi r_1^2 \;=\; \pi\big(r_2^2-r_1^2\big) \;=\; \pi\big(R^2-r_2^2\big) \;=\; \frac{\pi R^2}{3}`, 26); hidden(eqB); sticky(eqB);
|
|
49
|
+
|
|
50
|
+
// ---------- act 3: the waves ----------
|
|
51
|
+
// construction guides: the diameter, divided into thirds
|
|
52
|
+
line(diam, (ox - R, oy), (ox + R, oy)); dashed(diam); stroke(diam, 2); color(diam, dim); untraced(diam); tag(diam, guide);
|
|
53
|
+
dot(dv1, (ox - R/3, oy), 6); color(dv1, gold); hidden(dv1); tag(dv1, guide);
|
|
54
|
+
dot(dv2, (ox + R/3, oy), 6); color(dv2, gold); hidden(dv2); tag(dv2, guide);
|
|
55
|
+
// cut 1: semicircle r = R/3 above on the first third + r = 2R/3 below on the rest
|
|
56
|
+
plot(pU1, (ox, oy), R, R, "sqrt(abs(0.111111-(x+0.666667)^2))", (-1, -0.3333));
|
|
57
|
+
untraced(pU1); stroke(pU1, 4); color(pU1, red); tag(pU1, waves);
|
|
58
|
+
plot(pL1, (ox, oy), R, R, "0-sqrt(abs(0.444444-(x-0.333333)^2))", (-0.3333, 1));
|
|
59
|
+
untraced(pL1); stroke(pL1, 4); color(pL1, red); tag(pL1, waves);
|
|
60
|
+
// cut 2: semicircle r = 2R/3 above on the first two thirds + r = R/3 below
|
|
61
|
+
plot(pU2, (ox, oy), R, R, "sqrt(abs(0.444444-(x+0.333333)^2))", (-1, 0.3333));
|
|
62
|
+
untraced(pU2); stroke(pU2, 4); color(pU2, red); tag(pU2, waves);
|
|
63
|
+
plot(pL2, (ox, oy), R, R, "0-sqrt(abs(0.111111-(x-0.666667)^2))", (0.3333, 1));
|
|
64
|
+
untraced(pL2); stroke(pL2, 4); color(pL2, red); tag(pL2, waves);
|
|
65
|
+
// boolean sources: half-disc sectors + the four construction circles.
|
|
66
|
+
// key fact: consecutive half-discs are INTERNALLY TANGENT, so every wave piece is
|
|
67
|
+
// either a plain sector or ONE difference(sector, circle) - no nesting needed.
|
|
68
|
+
sector(sLoB, (ox, oy), R, 180, 360); hidden(sLoB);
|
|
69
|
+
sector(sHiB, (ox, oy), R, 0, 180); hidden(sHiB);
|
|
70
|
+
sector(sU2s, (ox - R/3, oy), 2*R/3, 0, 180); hidden(sU2s);
|
|
71
|
+
sector(sL1s, (ox + R/3, oy), 2*R/3, 180, 360); hidden(sL1s);
|
|
72
|
+
circle(dU1c, (ox - 2*R/3, oy), R/3); hidden(dU1c);
|
|
73
|
+
circle(dU2c, (ox - R/3, oy), 2*R/3); hidden(dU2c);
|
|
74
|
+
circle(dL1c, (ox + R/3, oy), 2*R/3); hidden(dL1c);
|
|
75
|
+
circle(dL2c, (ox + 2*R/3, oy), R/3); hidden(dL2c);
|
|
76
|
+
// region 1 (cyan): lower-left crescent + its little bump above the diameter
|
|
77
|
+
difference(w1a, sLoB, dL1c); color(w1a, cyan); opacity(w1a, 0.45); filled(w1a); tag(w1a, wave1); tag(w1a, waves);
|
|
78
|
+
sector(sU1f, (ox - 2*R/3, oy), R/3, 0, 180); color(sU1f, cyan); opacity(sU1f, 0.45); filled(sU1f); tag(sU1f, wave1); tag(sU1f, waves);
|
|
79
|
+
// region 2 (gold): the S in the middle - one piece above the axis, one below
|
|
80
|
+
difference(w2a, sU2s, dU1c); color(w2a, gold); opacity(w2a, 0.45); filled(w2a); tag(w2a, wave2); tag(w2a, waves);
|
|
81
|
+
difference(w2b, sL1s, dL2c); color(w2b, gold); opacity(w2b, 0.45); filled(w2b); tag(w2b, wave2); tag(w2b, waves);
|
|
82
|
+
// region 3 (magenta): upper-right crescent + its little bump below
|
|
83
|
+
difference(w3a, sHiB, dU2c); color(w3a, magenta); opacity(w3a, 0.45); filled(w3a); tag(w3a, wave3); tag(w3a, waves);
|
|
84
|
+
sector(sL2f, (ox + 2*R/3, oy), R/3, 180, 360); color(sL2f, magenta); opacity(sL2f, 0.45); filled(sL2f); tag(sL2f, wave3); tag(sL2f, waves);
|
|
85
|
+
hidden(wave1); hidden(wave2); hidden(wave3);
|
|
86
|
+
counter(pc1, (300, 492), 0, 1, "", "%"); hidden(pc1);
|
|
87
|
+
counter(pc2, (370, 360), 0, 1, "", "%"); hidden(pc2);
|
|
88
|
+
counter(pc3, (508, 308), 0, 1, "", "%"); hidden(pc3);
|
|
89
|
+
equation(eqW, (960, 210), `\text{piece}_k=\frac{\pi}{2}\big(r_k^2-r_{k-1}^2\big)+\frac{\pi}{2}\big(s_{k-1}^2-s_k^2\big)`, 26); hidden(eqW); sticky(eqW); z(eqW, 10);
|
|
90
|
+
|
|
91
|
+
// ================= timeline =================
|
|
92
|
+
|
|
93
|
+
// ---- the challenge
|
|
94
|
+
type(head, 1.1);
|
|
95
|
+
say(cap, "Cut a circle into three equal parts. Everyone knows the answer...", 0.6);
|
|
96
|
+
draw(cake, 1.2);
|
|
97
|
+
say(fig, "Fig. 1 - the answer everyone knows", 0.3);
|
|
98
|
+
par { draw(m1, 0.5); draw(m2, 0.5); draw(m3, 0.5); }
|
|
99
|
+
say(cap, "Three cuts from the centre, 120 degrees apart. Equal - by symmetry.", 0.5);
|
|
100
|
+
wait(0.5);
|
|
101
|
+
say(cap, "But look what hides inside it...", 0.5);
|
|
102
|
+
par { draw(e1, 0.5); draw(e2, 0.5); draw(e3, 0.5); }
|
|
103
|
+
flash(tri, red);
|
|
104
|
+
cue(pop);
|
|
105
|
+
say(cap, "An equilateral triangle. And today, triangles are BANNED.", 0.5);
|
|
106
|
+
wait(0.5);
|
|
107
|
+
par { disintegrate(e1, 0.7); disintegrate(e2, 0.7); disintegrate(e3, 0.7); disintegrate(m1, 0.7); disintegrate(m2, 0.7); disintegrate(m3, 0.7); }
|
|
108
|
+
|
|
109
|
+
// ---- answer one: the bullseye
|
|
110
|
+
cue(whoosh);
|
|
111
|
+
say(fig, "Fig. 2 - the bullseye", 0.3);
|
|
112
|
+
say(cap, "Answer one: forget cuts across - aim for the BULLSEYE.", 0.5);
|
|
113
|
+
par { draw(c1, 0.8); draw(c2, 0.8); }
|
|
114
|
+
stagger(0.15) { show(fin, 0.5); show(ringM, 0.5); show(ringO, 0.5); }
|
|
115
|
+
par { show(pb1, 0.3); show(pb2, 0.3); show(pb3, 0.3); }
|
|
116
|
+
par { to(pb1, value, 33.3, 1.2, smooth); to(pb2, value, 33.3, 1.2, smooth); to(pb3, value, 33.3, 1.2, smooth); }
|
|
117
|
+
show(eqB, 0.6);
|
|
118
|
+
cue(tick);
|
|
119
|
+
rewrite(eqB, `r_1=\frac{R}{\sqrt{3}}\approx 0.577\,R \qquad r_2=R\sqrt{\tfrac{2}{3}}\approx 0.816\,R`, 0.9);
|
|
120
|
+
say(cap, "A disc and two rings, each exactly a third. No corners anywhere.", 0.5);
|
|
121
|
+
wait(1.2);
|
|
122
|
+
par { fade(bull, 0.6); disintegrate(eqB, 0.8); }
|
|
123
|
+
|
|
124
|
+
// ---- answer two: the waves
|
|
125
|
+
cue(whoosh);
|
|
126
|
+
say(fig, "Fig. 3 - the waves", 0.3);
|
|
127
|
+
say(cap, "Answer two: let the cuts WAVE. Divide the diameter into thirds...", 0.5);
|
|
128
|
+
draw(diam, 0.7);
|
|
129
|
+
par { show(dv1, 0.4); show(dv2, 0.4); }
|
|
130
|
+
say(cap, "...then each cut is two half-circles: one arching over, one diving under.", 0.5);
|
|
131
|
+
par { cam((ox, oy), 1.0, smooth); zoom(1.25, 1.0, smooth); }
|
|
132
|
+
seq { draw(pU1, 0.9); draw(pL1, 0.9); }
|
|
133
|
+
cue(tick);
|
|
134
|
+
seq { draw(pU2, 0.9); draw(pL2, 0.9); }
|
|
135
|
+
stagger(0.15) { show(wave1, 0.6); show(wave2, 0.6); show(wave3, 0.6); }
|
|
136
|
+
par { show(pc1, 0.3); show(pc2, 0.3); show(pc3, 0.3); }
|
|
137
|
+
par { to(pc1, value, 33.3, 1.2, smooth); to(pc2, value, 33.3, 1.2, smooth); to(pc3, value, 33.3, 1.2, smooth); }
|
|
138
|
+
par { cam((cx, cy), 1.0, smooth); zoom(1, 1.0, smooth); }
|
|
139
|
+
|
|
140
|
+
// the telescoping proof
|
|
141
|
+
show(eqW, 0.6);
|
|
142
|
+
say(cap, "Why equal? Each piece is half-circles added and subtracted...", 0.5);
|
|
143
|
+
cue(tick);
|
|
144
|
+
rewrite(eqW, `\text{piece}_k=\frac{\pi R^2}{18}\Big[(2k-1)+(7-2k)\Big]`, 0.9);
|
|
145
|
+
say(cap, "...and the k cancels itself. Every wave weighs the same.", 0.5);
|
|
146
|
+
cue(tick);
|
|
147
|
+
rewrite(eqW, `\boxed{\;\text{piece}_k=\frac{\pi R^2}{3}\quad\text{for every }k\;}`, 1.0);
|
|
148
|
+
cue(chime);
|
|
149
|
+
par { flash(wave1, cyan); flash(wave2, gold); flash(wave3, magenta); }
|
|
150
|
+
wait(0.8);
|
|
151
|
+
|
|
152
|
+
// ---- finale: still fair, whichever way it turns
|
|
153
|
+
say(fig, "Fig. 4 - still fair, spinning", 0.3);
|
|
154
|
+
par { fade(pc1, 0.4); fade(pc2, 0.4); fade(pc3, 0.4); fade(guide, 0.4); }
|
|
155
|
+
say(cap, "And a third stays a third, whichever way you turn the plate.", 0.5);
|
|
156
|
+
par {
|
|
157
|
+
turn(waves, (ox, oy), 120, 5.0, smooth);
|
|
158
|
+
breathe(eqW, 3, 0.05, 0, 5);
|
|
159
|
+
}
|
|
160
|
+
say(cap, "Three equal parts - and not a triangle in sight.", 0.6);
|
|
161
|
+
wait(2.0);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// clip-window.manic — T1 rectangular clip: reveal-through-a-window / crop-to-panel.
|
|
2
|
+
//
|
|
3
|
+
// `clip(id, region)` scissors an entity (or a whole tagged group) to another
|
|
4
|
+
// entity's rectangular bounds. The scissor is resolved every frame, so the window
|
|
5
|
+
// FOLLOWS the region — move the window and the reveal tracks it. Here a spotlight
|
|
6
|
+
// window sweeps across a big imported vector, revealing it piece by piece.
|
|
7
|
+
//
|
|
8
|
+
// manic examples/clip-window.manic
|
|
9
|
+
title("Clip — reveal through a window");
|
|
10
|
+
canvas("16:9");
|
|
11
|
+
template("blank");
|
|
12
|
+
|
|
13
|
+
// a big imported vector that overflows what one window can show
|
|
14
|
+
svg(art, (cx, cy), "asset:svg/flags/br.svg", 940);
|
|
15
|
+
|
|
16
|
+
// the spotlight window — hollow frame so the clipped vector shows through
|
|
17
|
+
// (declared BEFORE the clip that references it)
|
|
18
|
+
rect(win, (cx - 380, cy), 320, 300); outlined(win); outline(win, fg); stroke(win, 5); glow(win, 0.7);
|
|
19
|
+
|
|
20
|
+
// clip the whole vector to the window — nothing shows outside it
|
|
21
|
+
clip(art, win);
|
|
22
|
+
|
|
23
|
+
text(cap, (cx, h*0.9), "clip(id, window) — the scissor follows the window");
|
|
24
|
+
size(cap, 26); color(cap, dim); display(cap);
|
|
25
|
+
|
|
26
|
+
// sweep the window across → the flag is revealed only where the window is
|
|
27
|
+
seq {
|
|
28
|
+
wait(0.4);
|
|
29
|
+
move(win, (cx + 380, cy), 2.4, smooth);
|
|
30
|
+
wait(0.3);
|
|
31
|
+
move(win, (cx, cy), 1.0, smooth);
|
|
32
|
+
pulse(win);
|
|
33
|
+
wait(0.6);
|
|
34
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// cloud-feathers — another @yuruyurau art-tweet in ONE `cloud`: 20,000 points in
|
|
2
|
+
// FOUR layers (`mod(i,4)`) fan into feathery plumes that flutter over time. A
|
|
3
|
+
// polar plot (radius `q`, angle `c`) whose amplitude switches on a conditional —
|
|
4
|
+
// the original's `(y<5 ? … : 11)` becomes a `sign()` blend, since cloud formulas
|
|
5
|
+
// have no ternary. `mag(k,e)` here (not squared); coloured per point and bloomed
|
|
6
|
+
// on a 9:16 Short. The parameter is renamed `s` (the required output is `y`).
|
|
7
|
+
//
|
|
8
|
+
// Original idea by @yuruyurau (https://x.com/yuruyurau). Our hue'd, annotated
|
|
9
|
+
// take — pure in (i, t), so it scrubs and records; the p5 original can't.
|
|
10
|
+
//
|
|
11
|
+
// manic examples/cloud-feathers.manic
|
|
12
|
+
title("Four feathers from one formula");
|
|
13
|
+
canvas("9:16");
|
|
14
|
+
template("black");
|
|
15
|
+
|
|
16
|
+
cloud(feathers, 20000, #ffffff, 0.6) {
|
|
17
|
+
let s = i/500; // reference's "y"
|
|
18
|
+
let m = mod(i, 4) * 8; // four layers
|
|
19
|
+
let sw = 0.5*(1 + sign(5 - s)); // (y<5 ? … : …) via sign
|
|
20
|
+
let kamp = sw*(sin(t/8 + s)*35) + (1 - sw)*11;
|
|
21
|
+
let k = cos(s*9) * kamp;
|
|
22
|
+
let e = s/8 - 13;
|
|
23
|
+
let o = hypot(k, e)/6;
|
|
24
|
+
let q = k*s/19 + 49 + k*sin(s)*sin(o*2 - e/5 - t);
|
|
25
|
+
let c = o/3 - e/5 - t/8 + m;
|
|
26
|
+
let px = q*sin(c) - 79*cos(c/3);
|
|
27
|
+
let py = (q + 70)*cos(c);
|
|
28
|
+
let grow = tanh(t*0.5 + 0.12);
|
|
29
|
+
let x = 540 + px * 1.9 * grow;
|
|
30
|
+
let y = 960 + py * 1.9 * grow;
|
|
31
|
+
let hue = mod(m*45 + i*0.04 + t*14, 360);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ---- textbook annotations ----
|
|
35
|
+
caption(head, "Four feathers from one formula", (540, 138), 34);
|
|
36
|
+
caption(sub, "20,000 points, no simulation", (540, 206), 22);
|
|
37
|
+
hidden(head);
|
|
38
|
+
hidden(sub);
|
|
39
|
+
equation(eq, (540, 1706), `p = (q\sin c,\;\; (q{+}70)\cos c)`, 30);
|
|
40
|
+
caption(lab, "a polar plot in four layers (mod i,4)", (540, 1786), 20);
|
|
41
|
+
hidden(eq);
|
|
42
|
+
hidden(lab);
|
|
43
|
+
|
|
44
|
+
show(head);
|
|
45
|
+
wait(1.4);
|
|
46
|
+
show(sub);
|
|
47
|
+
wait(2.6);
|
|
48
|
+
show(eq);
|
|
49
|
+
show(lab);
|
|
50
|
+
wait(25);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// cloud-jellyfish-v2 — the @yuruyurau jellyfish `cloud` (20,000 points, two layers,
|
|
2
|
+
// pulsing bells + tendrils), now SWIMMING IN A SHADER AQUARIUM. The bells are the same
|
|
3
|
+
// particle system as v1; everything around them is one per-pixel `shader`: a depth
|
|
4
|
+
// gradient (teal surface → deep navy), animated caustics rippling near the top, and soft
|
|
5
|
+
// god-rays falling from the surface. A third element — rising bubbles — is a second tiny
|
|
6
|
+
// `cloud`. Particle art + a per-pixel ocean + generic captions, all in one 9:16 frame,
|
|
7
|
+
// all pure in (i, t) so the whole aquarium scrubs and records exactly.
|
|
8
|
+
//
|
|
9
|
+
// manic examples/cloud-jellyfish-v2.manic
|
|
10
|
+
title("Jellyfish in a shader aquarium");
|
|
11
|
+
canvas("9:16");
|
|
12
|
+
template("black");
|
|
13
|
+
|
|
14
|
+
// ===================== the aquarium — one shader, per pixel =====================
|
|
15
|
+
shader(water) {
|
|
16
|
+
let x = (u - 0.5) * asp;
|
|
17
|
+
let y = v; // 0 = surface (top), 1 = deep (bottom)
|
|
18
|
+
let depth = smoothstep(0.0, 1.0, y);
|
|
19
|
+
|
|
20
|
+
// deep-water colour ramp: bright teal near the surface, deep blue below
|
|
21
|
+
let hue = mix(186, 216, depth);
|
|
22
|
+
let base = mix(0.26, 0.045, depth);
|
|
23
|
+
|
|
24
|
+
// caustics — warped interference, bright veins that fade with depth
|
|
25
|
+
let wx = x * 4.0 + 0.5 * sin(y * 6.0 + t * 0.4);
|
|
26
|
+
let wy = y * 7.0 + 0.5 * sin(x * 5.0 - t * 0.5);
|
|
27
|
+
let cc = sin(wx + t * 0.7) + sin(wy - t * 0.6) + sin((wx + wy) * 0.7 + t * 0.5);
|
|
28
|
+
let b = 0.5 + 0.5 * sin(cc * 1.5);
|
|
29
|
+
let caust = b * b * b * (1.0 - depth * 0.75);
|
|
30
|
+
|
|
31
|
+
// god-rays — soft vertical light shafts from the surface, strongest up top
|
|
32
|
+
let ray = 0.5 + 0.5 * sin(x * 3.0 + 0.6 * sin(t * 0.2));
|
|
33
|
+
let r2 = ray * ray;
|
|
34
|
+
let rays = r2 * r2 * (1.0 - smoothstep(0.0, 0.65, y)) * 0.45;
|
|
35
|
+
|
|
36
|
+
let val = clamp(base + caust * 0.5 + rays, 0.0, 0.95);
|
|
37
|
+
let sat = mix(0.85, 0.62, caust); // bright veins read a touch whiter
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ===================== the jellyfish — the v1 cloud, re-lit ====================
|
|
41
|
+
// same polar formula as v1; the hue is pulled into a cyan↔magenta bioluminescent band
|
|
42
|
+
// so the bells glow like sea creatures against the water instead of full-spectrum.
|
|
43
|
+
cloud(jelly, 20000, #ffffff, 0.6) {
|
|
44
|
+
let s = i/99; // reference's "y" parameter
|
|
45
|
+
let m = mod(i, 2) * 3; // two layers
|
|
46
|
+
let k = 9*cos(s*2);
|
|
47
|
+
let e = s/8 - 12;
|
|
48
|
+
let d = (k*k + e*e)/79 + 1;
|
|
49
|
+
let q = 79 - e*sin(k) + k/d*(8 + 4*sin(sin(d*d + e/9 - t)));
|
|
50
|
+
let c = d/2 - cos(d*2)/5 - t/16 + m;
|
|
51
|
+
let px = q*sin(c);
|
|
52
|
+
let py = (q + 40)*cos(c);
|
|
53
|
+
let grow = tanh(t*0.5 + 0.12);
|
|
54
|
+
let x = 540 + px * 2.2 * grow;
|
|
55
|
+
let y = 960 + py * 2.2 * grow;
|
|
56
|
+
let hue = mod(198 + m*30 + 46*sin(s*0.18 + t*0.35), 360); // cyan ↔ magenta glow
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ---- rising bubbles — a second tiny cloud drifting up the tank ----
|
|
60
|
+
cloud(bubbles, 130, #dff4ff, 0.5) {
|
|
61
|
+
let sp = 0.05 + 0.06 * rand2(i, 1.3); // per-bubble rise speed
|
|
62
|
+
let ph = rand2(i, 2.7);
|
|
63
|
+
let prog = fract(ph + t * sp); // 0 → 1 rise progress
|
|
64
|
+
let x = 1080 * rand2(i, 4.1) + 24 * sin(prog * tau * 2.0 + i);
|
|
65
|
+
let y = 1920 * (1.0 - prog); // bottom → top
|
|
66
|
+
let r = 2.0 + 5.0 * rand2(i, 5.5);
|
|
67
|
+
let hue = 196;
|
|
68
|
+
let alpha = 0.5 * sin(prog * pi); // fade in low, fade out near the surface
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---- textbook annotations ----
|
|
72
|
+
caption(head, "Jellyfish in a shader aquarium", (540, 138), 33);
|
|
73
|
+
caption(sub, "a 20,000-point cloud + a per-pixel ocean", (540, 206), 22);
|
|
74
|
+
hidden(head);
|
|
75
|
+
hidden(sub);
|
|
76
|
+
equation(eq, (540, 1706), `p = (q\sin c,\;\; (q{+}40)\cos c)`, 30);
|
|
77
|
+
caption(lab, "bells: a polar cloud · water: one shader · bubbles: a second cloud", (540, 1786), 19);
|
|
78
|
+
hidden(eq);
|
|
79
|
+
hidden(lab);
|
|
80
|
+
|
|
81
|
+
show(head);
|
|
82
|
+
wait(1.4);
|
|
83
|
+
show(sub);
|
|
84
|
+
wait(2.6);
|
|
85
|
+
show(eq);
|
|
86
|
+
show(lab);
|
|
87
|
+
wait(25);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// cloud-jellyfish — another @yuruyurau art-tweet in ONE `cloud`: 20,000 points in
|
|
2
|
+
// two layers (`mod(i,2)`) drift into jellyfish-like bells with trailing tendrils
|
|
3
|
+
// and pulse over time. A polar plot (radius `q`, angle `c`) with a nested
|
|
4
|
+
// `sin(sin(...))` that gives the bell its soft ripple; coloured per point and
|
|
5
|
+
// bloomed from the centre on a 9:16 Short. `mag(k,e)^2` → `k*k+e*e`; the
|
|
6
|
+
// parameter is renamed `s` (the required output is `y`).
|
|
7
|
+
//
|
|
8
|
+
// Original idea by @yuruyurau (https://x.com/yuruyurau). Our hue'd, annotated
|
|
9
|
+
// take — pure in (i, t), so it scrubs and records; the p5 original can't.
|
|
10
|
+
//
|
|
11
|
+
// manic examples/cloud-jellyfish.manic
|
|
12
|
+
title("Two jellyfish from one formula");
|
|
13
|
+
canvas("9:16");
|
|
14
|
+
template("black");
|
|
15
|
+
|
|
16
|
+
cloud(jelly, 20000, #ffffff, 0.6) {
|
|
17
|
+
let s = i/99; // reference's "y" parameter
|
|
18
|
+
let m = mod(i, 2) * 3; // two layers
|
|
19
|
+
let k = 9*cos(s*2);
|
|
20
|
+
let e = s/8 - 12;
|
|
21
|
+
let d = (k*k + e*e)/79 + 1;
|
|
22
|
+
let q = 79 - e*sin(k) + k/d*(8 + 4*sin(sin(d*d + e/9 - t)));
|
|
23
|
+
let c = d/2 - cos(d*2)/5 - t/16 + m;
|
|
24
|
+
let px = q*sin(c);
|
|
25
|
+
let py = (q + 40)*cos(c);
|
|
26
|
+
let grow = tanh(t*0.5 + 0.12);
|
|
27
|
+
let x = 540 + px * 2.2 * grow;
|
|
28
|
+
let y = 960 + py * 2.2 * grow;
|
|
29
|
+
let hue = mod(m*70 + i*0.05 + t*15, 360);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ---- textbook annotations ----
|
|
33
|
+
caption(head, "Two jellyfish from one formula", (540, 138), 34);
|
|
34
|
+
caption(sub, "20,000 points, no simulation", (540, 206), 22);
|
|
35
|
+
hidden(head);
|
|
36
|
+
hidden(sub);
|
|
37
|
+
equation(eq, (540, 1706), `p = (q\sin c,\;\; (q{+}40)\cos c)`, 30);
|
|
38
|
+
caption(lab, "a polar plot: radius q, angle c, per point", (540, 1786), 20);
|
|
39
|
+
hidden(eq);
|
|
40
|
+
hidden(lab);
|
|
41
|
+
|
|
42
|
+
show(head);
|
|
43
|
+
wait(1.4);
|
|
44
|
+
show(sub);
|
|
45
|
+
wait(2.6);
|
|
46
|
+
show(eq);
|
|
47
|
+
show(lab);
|
|
48
|
+
wait(25);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// cloud-kaleidoscope — a 14-fold kaleidoscope in ONE `cloud`. The @yuruyurau
|
|
2
|
+
// original uses canvas FEEDBACK (get() + rotate + image()) — a raster/Droste
|
|
3
|
+
// trick manic doesn't have (it's vector & deterministic). But the OUTCOME is a
|
|
4
|
+
// 14-fold rotational symmetry, which `cloud` gets by layer-replication: one base
|
|
5
|
+
// field, copied at 14 angles via a layer index `L = floor(i/bn)` and rotated by
|
|
6
|
+
// `L·π/7`. So the picture is the same, but it scrubs and records (the p5 can't).
|
|
7
|
+
//
|
|
8
|
+
// Original idea by @yuruyurau (https://x.com/yuruyurau). Our hue'd, annotated take.
|
|
9
|
+
//
|
|
10
|
+
// manic examples/cloud-kaleidoscope.manic
|
|
11
|
+
title("A kaleidoscope from one formula");
|
|
12
|
+
canvas("9:16");
|
|
13
|
+
template("black");
|
|
14
|
+
|
|
15
|
+
cloud(kaleido, 56000, #ffffff, 0.6) {
|
|
16
|
+
let bn = 4000; // points per copy (14 copies = 56k, smooth)
|
|
17
|
+
let L = floor(i / bn); // copy 0..13
|
|
18
|
+
let j = mod(i, bn); // base index
|
|
19
|
+
let k = mod(j, 50) - 25;
|
|
20
|
+
let e = j/222;
|
|
21
|
+
let d = 5*cos(hypot(k, e) - t + mod(j, 2));
|
|
22
|
+
let bx = k + k*d/6*sin(d + e/3 + t);
|
|
23
|
+
let by = 90 + e*d - e/d*2*cos(d + t);
|
|
24
|
+
let ang = L * pi/7; // 14-fold rotation of the base field
|
|
25
|
+
let grow = tanh(t*0.5 + 0.12);
|
|
26
|
+
let x = 540 + (bx*cos(ang) - by*sin(ang)) * 2.2 * grow;
|
|
27
|
+
let y = 960 + (bx*sin(ang) + by*cos(ang)) * 2.2 * grow;
|
|
28
|
+
let r = 0.8;
|
|
29
|
+
let hue = mod(L*26 + by*2 + t*12, 360); // a colour per sector + radial
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ---- textbook annotations ----
|
|
33
|
+
caption(head, "A kaleidoscope from one formula", (540, 138), 34);
|
|
34
|
+
caption(sub, "one field, copied at 14 angles", (540, 206), 22);
|
|
35
|
+
hidden(head);
|
|
36
|
+
hidden(sub);
|
|
37
|
+
equation(eq, (540, 1706), `\vec p_L = R\!\left(L\tfrac{2\pi}{14}\right)\,\vec p_0`, 34);
|
|
38
|
+
caption(lab, "14-fold symmetry, no mirrors — pure rotation", (540, 1786), 20);
|
|
39
|
+
hidden(eq);
|
|
40
|
+
hidden(lab);
|
|
41
|
+
|
|
42
|
+
show(head);
|
|
43
|
+
wait(1.4);
|
|
44
|
+
show(sub);
|
|
45
|
+
wait(2.6);
|
|
46
|
+
show(eq);
|
|
47
|
+
show(lab);
|
|
48
|
+
wait(25);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// cloud-koi — another @yuruyurau art-tweet in ONE `cloud`: 10,000 points in two
|
|
2
|
+
// layers (`mod(i,2)`) swirl into koi-like forms chasing each other, rippling over
|
|
3
|
+
// time. A polar plot (radius `q`, angle `c`); `cos(i+t/4)` on the raw index gives
|
|
4
|
+
// the fine scale texture. One JS-ism: the original's `y^9` is bitwise XOR (a
|
|
5
|
+
// per-band scramble), which manic has no operator for — approximated here with
|
|
6
|
+
// `noise()`, visually equivalent. `mag` = `hypot`; parameter renamed `s`.
|
|
7
|
+
//
|
|
8
|
+
// Original idea by @yuruyurau (https://x.com/yuruyurau). Our hue'd, annotated
|
|
9
|
+
// take — pure in (i, t), so it scrubs and records; the p5 original can't.
|
|
10
|
+
//
|
|
11
|
+
// manic examples/cloud-koi.manic
|
|
12
|
+
title("Two koi from one formula");
|
|
13
|
+
canvas("9:16");
|
|
14
|
+
template("black");
|
|
15
|
+
|
|
16
|
+
cloud(koi, 10000, #ffffff, 0.6) {
|
|
17
|
+
let s = i/790;
|
|
18
|
+
let m = mod(i, 2);
|
|
19
|
+
let sw = 0.5*(1 + sign(8 - s)); // (y<8 ? … : …)
|
|
20
|
+
let scr = noise(s*2, 0); // ~ the JS y^9 XOR scramble
|
|
21
|
+
let kbase = sw*(9 + scr*6) + (1 - sw)*(4 + cos(s));
|
|
22
|
+
let k = kbase * cos(i + t/4);
|
|
23
|
+
let e = s/3 - 13;
|
|
24
|
+
let d = hypot(k, e) + cos(e + t*2 + m*4);
|
|
25
|
+
let q = s*k/5*(2 + sin(d*2 + s - t*4)) + 80;
|
|
26
|
+
let c = d/4 - t/2 + m*3;
|
|
27
|
+
let px = q*cos(c);
|
|
28
|
+
let py = q*sin(c) + d*9 - 130; // recentre the d*9+60 offset
|
|
29
|
+
let grow = tanh(t*0.5 + 0.12);
|
|
30
|
+
let x = 540 + px * 2.1 * grow;
|
|
31
|
+
let y = 960 + py * 2.1 * grow;
|
|
32
|
+
let hue = mod(m*90 + i*0.03 + t*14, 360);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ---- textbook annotations ----
|
|
36
|
+
caption(head, "Two koi from one formula", (540, 138), 36);
|
|
37
|
+
caption(sub, "10,000 points, no simulation", (540, 206), 22);
|
|
38
|
+
hidden(head);
|
|
39
|
+
hidden(sub);
|
|
40
|
+
equation(eq, (540, 1706), `p = (q\cos c,\;\; q\sin c)`, 32);
|
|
41
|
+
caption(lab, "a polar plot: radius q, angle c, per point", (540, 1786), 20);
|
|
42
|
+
hidden(eq);
|
|
43
|
+
hidden(lab);
|
|
44
|
+
|
|
45
|
+
show(head);
|
|
46
|
+
wait(1.4);
|
|
47
|
+
show(sub);
|
|
48
|
+
wait(2.6);
|
|
49
|
+
show(eq);
|
|
50
|
+
show(lab);
|
|
51
|
+
wait(25);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// cloud-lissajous — the SAME `cloud` primitive as popkorn, a completely
|
|
2
|
+
// different picture: a Lissajous curve traced by 600 points, its horizontal
|
|
3
|
+
// phase drifting with time so the figure slowly folds through itself. Pure math,
|
|
4
|
+
// no donut in sight — proof that `cloud` is a generic point field. On a 9:16
|
|
5
|
+
// Short, held 20s so you can watch it evolve.
|
|
6
|
+
//
|
|
7
|
+
// manic examples/cloud-lissajous.manic
|
|
8
|
+
title("cloud — a breathing Lissajous figure");
|
|
9
|
+
canvas("9:16");
|
|
10
|
+
template("black");
|
|
11
|
+
|
|
12
|
+
cloud(liss, 600, #46e2c8, 0.95) {
|
|
13
|
+
let u = i / 600 * tau; // parameter around the curve
|
|
14
|
+
let x = 540 + 460 * sin(3 * u + t);
|
|
15
|
+
let y = 960 + 760 * sin(2 * u);
|
|
16
|
+
let r = 3;
|
|
17
|
+
// colour reveal: starts near cyan (hue 180), fans into a rotating rainbow
|
|
18
|
+
// around the curve as `spread` grows 0 -> 1 over the first several seconds
|
|
19
|
+
let spread = tanh(t * 0.3);
|
|
20
|
+
let hue = mod(180 + u * 57 * spread + t * 35, 360);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
wait(25);
|