@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,65 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// bullet-impact.manic — best of both: the movie AND the physics
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// The cinematic gun-shot (gun · muzzle flash · a flying camera · BOOM) wrapped
|
|
5
|
+
// around the REAL `bulletblock` physics sim. The collision is genuinely true —
|
|
6
|
+
// a perfectly inelastic impact, momentum conserved, the live speed readout
|
|
7
|
+
// actually collapsing 40 → ~1 — and the BOOM is SYNCED to the physical impact.
|
|
8
|
+
// A sim's parts are ordinary entities, so the story and the physics compose.
|
|
9
|
+
// ============================================================================
|
|
10
|
+
|
|
11
|
+
title("Impact — the movie meets the physics");
|
|
12
|
+
canvas("16:9");
|
|
13
|
+
|
|
14
|
+
// ---- the REAL physics: bullet + block, inelastic collision + live speed readout ----
|
|
15
|
+
// a lighter block, so the hit visibly KNOCKS it and it slides on afterward
|
|
16
|
+
bulletblock(bb, (cx, 430), 0.05, 40, 0.9);
|
|
17
|
+
hidden(bb);
|
|
18
|
+
sticky(bb.vel); // pin the live speed readout through the camera moves
|
|
19
|
+
|
|
20
|
+
// ---- cinematic dressing (base manic) ----
|
|
21
|
+
rect(barrel, (200, 380), 82, 20); color(barrel, dim); filled(barrel);
|
|
22
|
+
rect(body, (166, 386), 42, 34); color(body, dim); filled(body);
|
|
23
|
+
polygon(grip, (150, 404), (176, 404), (170, 442), (146, 438), dim);
|
|
24
|
+
circle(mflash, (242, 380), 28); color(mflash, gold); glow(mflash, 3.5); hidden(mflash);
|
|
25
|
+
|
|
26
|
+
text(boom, (730, 250), "BOOM!"); size(boom, 84); color(boom, magenta); bold(boom); glow(boom, 2.5); display(boom); hidden(boom);
|
|
27
|
+
for i in 0..14 {
|
|
28
|
+
let ang = i * tau / 14.0;
|
|
29
|
+
line(spark{i}, (730, 380), (730 + 150*cos(ang), 380 + 150*sin(ang)));
|
|
30
|
+
color(spark{i}, gold); stroke(spark{i}, 5); glow(spark{i}, 2); untraced(spark{i}); tag(spark{i}, sparks);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
text(cap, (cx, h - 46), ""); color(cap, fg); size(cap, 22); bold(cap); display(cap); sticky(cap);
|
|
34
|
+
|
|
35
|
+
// ================= THE SCENE =================
|
|
36
|
+
cam((430, 400), 0.4, smooth);
|
|
37
|
+
say(cap, "a scene — and it's really physics underneath", 0.4);
|
|
38
|
+
wait(0.5);
|
|
39
|
+
|
|
40
|
+
say(cap, "FIRE!", 0.2);
|
|
41
|
+
par { show(mflash, 0.06); pulse(mflash); show(bb, 0.1); }
|
|
42
|
+
fade(mflash, 0.3);
|
|
43
|
+
|
|
44
|
+
// the bullet flies (REAL physics, slow-mo) · the camera pushes toward the block ·
|
|
45
|
+
// the BOOM fires exactly when the sim's bullet embeds (55% of the run) · then it
|
|
46
|
+
// KEEPS GOING — the block is knocked, slides on, and the camera follows it
|
|
47
|
+
par {
|
|
48
|
+
run(bb, 7);
|
|
49
|
+
cam((720, 380), 3.6, smooth); // push toward the impact during the flight
|
|
50
|
+
zoom(1.2, 3.6, smooth);
|
|
51
|
+
seq {
|
|
52
|
+
wait(3.85); // the physical impact (55% of the run)
|
|
53
|
+
// CONTACT → zoom-punch + BOOM
|
|
54
|
+
say(cap, "CONTACT!", 0.12);
|
|
55
|
+
par { flash(bb.block, gold); shake(bb.block, 0.6); zoom(1.6, 0.15); show(boom, 0.12); pulse(boom); draw(sparks, 0.3); }
|
|
56
|
+
// …and it CONTINUES — sparks clear, the block slides on, camera follows
|
|
57
|
+
say(cap, "…knocked back — it slides on", 0.3);
|
|
58
|
+
par { fade(sparks, 0.5); fade(boom, 0.7); cam((1010, 380), 2.4, smooth); zoom(1.15, 2.4, smooth); }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// it comes to rest — and the physics was true the whole way through
|
|
63
|
+
par { zoom(1.0, 0.9, smooth); cam((cx, 360), 0.9, smooth); }
|
|
64
|
+
say(cap, "…and rest. A movie on top, real physics underneath: 40 m/s → the block's crawl", 0.4);
|
|
65
|
+
wait(1.0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// bungee.manic — free-fall, then a one-sided elastic cord catches the jumper.
|
|
2
|
+
title("Bungee jump — free-fall, then bounce");
|
|
3
|
+
canvas("16:9");
|
|
4
|
+
text(hdr,(cx,44),"Bungee — the cord only PULLS: free-fall, then an elastic bounce"); size(hdr,22); color(hdr,cyan); bold(hdr); display(hdr);
|
|
5
|
+
bungee(bg, (640,110));
|
|
6
|
+
phase(bg, (1000,200), 95); // asymmetric well shows in the phase loop
|
|
7
|
+
well(bg, (1000,470), 95); // linear (fall) → parabola (cord): a lopsided well
|
|
8
|
+
text(cap,(cx,h-32),"note the lopsided energy well — flat during free-fall, steep once the cord bites"); size(cap,15); color(cap,dim); display(cap);
|
|
9
|
+
run(bg, 11);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
title("Internet Banking — C4 Components");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic");
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · COMPONENT");
|
|
8
|
+
text(headline, (cx, h*0.12), "Inside the API Application");
|
|
9
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker);
|
|
10
|
+
size(headline, 24*u); bold(headline); wrap(headline, w*0.86);
|
|
11
|
+
|
|
12
|
+
// Level 3 — zoom into a container: its components. `component` is a C4 node kind;
|
|
13
|
+
// the dependencies it talks to sit below as externals.
|
|
14
|
+
// Declaration order = left-to-right in the tier, so keep each related pair
|
|
15
|
+
// adjacent (sign-in beside security, accounts beside the facade) — their "Uses"
|
|
16
|
+
// edge then sits in the gap instead of crossing an intervening box.
|
|
17
|
+
c4(api, component);
|
|
18
|
+
node(signin, api, "component", "Sign-In Controller", "Lets users sign in", "Spring MVC");
|
|
19
|
+
node(security, api, "component", "Security Component", "Authentication and access control", "Spring Bean");
|
|
20
|
+
node(accounts, api, "component", "Accounts Controller", "Provides account summaries", "Spring MVC");
|
|
21
|
+
node(facade, api, "component", "Mainframe Facade", "A facade over the mainframe", "Spring Bean");
|
|
22
|
+
node(db, api, "external", "Database", "Stores users, accounts and payments");
|
|
23
|
+
node(mf, api, "external", "Mainframe Banking System", "Stores core banking information");
|
|
24
|
+
|
|
25
|
+
connect(c1, signin, security); annotate(c1, "Uses");
|
|
26
|
+
connect(c2, accounts, facade); annotate(c2, "Uses");
|
|
27
|
+
connect(c3, security, db); annotate(c3, "Reads/writes [JDBC]");
|
|
28
|
+
connect(c4x, facade, mf); annotate(c4x, "Uses [XML/HTTPS]");
|
|
29
|
+
|
|
30
|
+
color(c1, cyan); color(c1.hot, cyan);
|
|
31
|
+
color(c2, cyan); color(c2.hot, cyan);
|
|
32
|
+
color(c3, cyan); color(c3.hot, cyan);
|
|
33
|
+
color(c4x, gold); color(c4x.hot, gold);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
title("Internet Banking — C4 Containers");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic");
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · CONTAINER");
|
|
8
|
+
text(headline, (cx, h*0.12), "Inside the Internet Banking System");
|
|
9
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker);
|
|
10
|
+
size(headline, 24*u); bold(headline); wrap(headline, w*0.86);
|
|
11
|
+
|
|
12
|
+
// Level 2 — zoom into the system: its containers, each with a technology. The
|
|
13
|
+
// technology is the optional 6th `node` argument, shown in the `[Container: …]` tag.
|
|
14
|
+
c4(bank, container);
|
|
15
|
+
node(cust, bank, "person", "Customer", "A retail banking customer");
|
|
16
|
+
node(spa, bank, "container", "Single-Page App", "Account summary and payments in the browser", "JavaScript / Angular");
|
|
17
|
+
node(api, bank, "container", "API Application", "Banking functionality via a JSON/HTTPS API", "Java / Spring Boot");
|
|
18
|
+
node(db, bank, "container", "Database", "Stores users, accounts and payments", "Oracle");
|
|
19
|
+
node(core, bank, "external", "Mainframe Banking System", "Stores core banking information");
|
|
20
|
+
|
|
21
|
+
connect(r1, cust, spa); annotate(r1, "Uses [HTTPS]");
|
|
22
|
+
connect(r2, spa, api); annotate(r2, "Calls [JSON/HTTPS]");
|
|
23
|
+
connect(r3, api, db); annotate(r3, "Reads/writes [JDBC]");
|
|
24
|
+
connect(r4, api, core); annotate(r4, "Uses [XML/HTTPS]");
|
|
25
|
+
|
|
26
|
+
color(r1, cyan); color(r1.hot, cyan);
|
|
27
|
+
color(r2, cyan); color(r2.hot, cyan);
|
|
28
|
+
color(r3, cyan); color(r3.hot, cyan);
|
|
29
|
+
color(r4, gold); color(r4.hot, gold);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
title("Internet Banking — C4 System Context");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic");
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · SYSTEM CONTEXT");
|
|
8
|
+
text(headline, (cx, h*0.12), "Internet Banking — the big picture");
|
|
9
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker);
|
|
10
|
+
size(headline, 24*u); bold(headline); wrap(headline, w*0.86);
|
|
11
|
+
|
|
12
|
+
// `c4(id, level)` — inside it, node kinds are C4 elements. The extra args are the
|
|
13
|
+
// box's description and (for containers) technology. No coordinates.
|
|
14
|
+
c4(bank, context);
|
|
15
|
+
node(cust, bank, "person", "Personal Banking Customer", "A customer of the bank with personal accounts");
|
|
16
|
+
node(ibs, bank, "system", "Internet Banking System", "Lets customers view accounts and make payments");
|
|
17
|
+
node(mail, bank, "external", "E-mail System", "Sends notifications to customers");
|
|
18
|
+
node(core, bank, "external", "Mainframe Banking System", "Stores core banking information");
|
|
19
|
+
|
|
20
|
+
connect(r1, cust, ibs); annotate(r1, "Views accounts, makes payments");
|
|
21
|
+
connect(r2, ibs, core); annotate(r2, "Reads/writes [XML/HTTPS]");
|
|
22
|
+
connect(r3, ibs, mail); annotate(r3, "Sends e-mail [SMTP]");
|
|
23
|
+
|
|
24
|
+
color(r1, cyan); color(r1.hot, cyan);
|
|
25
|
+
color(r2, cyan); color(r2.hot, cyan);
|
|
26
|
+
color(r3, gold); color(r3.hot, gold);
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
title("C4 — One System, at Every Altitude");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic"); sticky(mark);
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · CONTEXT → CONTAINER → COMPONENT");
|
|
8
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker); sticky(kicker);
|
|
9
|
+
text(cap, (cx, h*0.93), "Every system lives in a world of people and neighbours.");
|
|
10
|
+
size(cap, 16*u); color(cap, dim); wrap(cap, w*0.86); sticky(cap);
|
|
11
|
+
|
|
12
|
+
// ---- Level 1: System Context ----
|
|
13
|
+
c4(ctx, context);
|
|
14
|
+
node(cust, ctx, "person", "Customer", "A retail banking customer");
|
|
15
|
+
node(sys, ctx, "system", "Internet Banking System", "View accounts, make payments");
|
|
16
|
+
node(mail, ctx, "external", "E-mail System", "Sends notifications");
|
|
17
|
+
node(core, ctx, "external", "Mainframe", "Core banking information");
|
|
18
|
+
connect(cx1, cust, sys); annotate(cx1, "Uses");
|
|
19
|
+
connect(cx2, sys, core); annotate(cx2, "Reads/writes [XML/HTTPS]");
|
|
20
|
+
connect(cx3, sys, mail); annotate(cx3, "Sends e-mail [SMTP]");
|
|
21
|
+
color(cx1, cyan); color(cx1.hot, cyan);
|
|
22
|
+
color(cx2, cyan); color(cx2.hot, cyan);
|
|
23
|
+
color(cx3, gold); color(cx3.hot, gold);
|
|
24
|
+
|
|
25
|
+
// ---- Level 2: Containers ----
|
|
26
|
+
c4(cnt, container);
|
|
27
|
+
node(ccust, cnt, "person", "Customer", "A retail banking customer");
|
|
28
|
+
node(spa, cnt, "container", "Single-Page App", "Account UI in the browser", "JavaScript / Angular");
|
|
29
|
+
node(api, cnt, "container", "API Application", "Banking functionality (JSON/HTTPS)", "Java / Spring Boot");
|
|
30
|
+
node(cdb, cnt, "container", "Database", "Users, accounts, payments", "Oracle");
|
|
31
|
+
node(cmf, cnt, "external", "Mainframe", "Core banking information");
|
|
32
|
+
connect(cn1, ccust, spa); annotate(cn1, "Uses [HTTPS]");
|
|
33
|
+
connect(cn2, spa, api); annotate(cn2, "Calls [JSON/HTTPS]");
|
|
34
|
+
connect(cn3, api, cdb); annotate(cn3, "Reads/writes [JDBC]");
|
|
35
|
+
connect(cn4, api, cmf); annotate(cn4, "Uses [XML/HTTPS]");
|
|
36
|
+
color(cn1, cyan); color(cn1.hot, cyan);
|
|
37
|
+
color(cn2, cyan); color(cn2.hot, cyan);
|
|
38
|
+
color(cn3, cyan); color(cn3.hot, cyan);
|
|
39
|
+
color(cn4, gold); color(cn4.hot, gold);
|
|
40
|
+
|
|
41
|
+
// ---- Level 3: Components (inside the API) ----
|
|
42
|
+
// Declaration order fills the 2x2 grid row-major, so ordering the pairs as
|
|
43
|
+
// (signin, accounts) then (security, facade) makes two clean vertical columns:
|
|
44
|
+
// sign-in → security → database | accounts → facade → mainframe
|
|
45
|
+
c4(cmp, component);
|
|
46
|
+
node(signin, cmp, "component", "Sign-In Controller", "Lets users sign in", "Spring MVC");
|
|
47
|
+
node(acct, cmp, "component", "Accounts Controller", "Account summaries", "Spring MVC");
|
|
48
|
+
node(sec, cmp, "component", "Security Component", "Authentication & access", "Spring Bean");
|
|
49
|
+
node(fac, cmp, "component", "Mainframe Facade", "Facade over the mainframe", "Spring Bean");
|
|
50
|
+
node(mdb, cmp, "external", "Database", "Users, accounts, payments");
|
|
51
|
+
node(mmf, cmp, "external", "Mainframe", "Core banking information");
|
|
52
|
+
connect(cp1, signin, sec); annotate(cp1, "Uses");
|
|
53
|
+
connect(cp2, acct, fac); annotate(cp2, "Uses");
|
|
54
|
+
connect(cp3, sec, mdb); annotate(cp3, "Reads/writes [JDBC]");
|
|
55
|
+
connect(cp4, fac, mmf); annotate(cp4, "Uses [XML/HTTPS]");
|
|
56
|
+
color(cp1, cyan); color(cp1.hot, cyan);
|
|
57
|
+
color(cp2, cyan); color(cp2.hot, cyan);
|
|
58
|
+
color(cp3, cyan); color(cp3.hot, cyan);
|
|
59
|
+
color(cp4, gold); color(cp4.hot, gold);
|
|
60
|
+
|
|
61
|
+
// tokens: one request per level
|
|
62
|
+
request(req, ccust, "GET /accounts");
|
|
63
|
+
request(req2, signin, "authorise");
|
|
64
|
+
|
|
65
|
+
// Start at Context; everything else is hidden and overlaps the same centre.
|
|
66
|
+
hidden(cnt); hidden(cnt.nodes); hidden(cnt.connections); hidden(cnt.hotpaths);
|
|
67
|
+
hidden(cmp); hidden(cmp.nodes); hidden(cmp.connections); hidden(cmp.hotpaths);
|
|
68
|
+
hidden(ctx.nodes);
|
|
69
|
+
hidden(req.parts); hidden(req2.parts);
|
|
70
|
+
|
|
71
|
+
// 1 — the system in its world (pieces arrive one by one)
|
|
72
|
+
step("context") {
|
|
73
|
+
seq {
|
|
74
|
+
stagger(0.12) { show(cust, 0.4); show(sys, 0.4); show(mail, 0.4); show(core, 0.4); }
|
|
75
|
+
draw(ctx.connections, 0.7);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
wait(0.5);
|
|
79
|
+
|
|
80
|
+
// 2 — push into the system
|
|
81
|
+
step("into-system") {
|
|
82
|
+
par {
|
|
83
|
+
say(cap, "Zoom into the system…", 0.4);
|
|
84
|
+
zoom(2.5, 1.1, smooth);
|
|
85
|
+
fade(cust, 0.6); fade(mail, 0.6); fade(core, 0.6); fade(ctx.connections, 0.6);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
wait(0.2);
|
|
89
|
+
|
|
90
|
+
// 3 — inside, the containers ASSEMBLE as the request travels through them.
|
|
91
|
+
// The dot leads: each box + its edge materialise just as the call arrives.
|
|
92
|
+
step("containers") {
|
|
93
|
+
seq {
|
|
94
|
+
par {
|
|
95
|
+
say(cap, "Inside — a request builds the containers as it travels.", 0.4);
|
|
96
|
+
fade(sys, 0.4);
|
|
97
|
+
zoom(1.0, 1.0, smooth);
|
|
98
|
+
}
|
|
99
|
+
par { show(ccust, 0.4); show(req.parts, 0.25); }
|
|
100
|
+
par { show(cn1, 0.6); show(cn1.text.bg, 0.6); show(cn1.text, 0.6); show(spa, 0.5); route(req, cn1, 0.6, smooth); }
|
|
101
|
+
par { show(cn2, 0.6); show(cn2.text.bg, 0.6); show(cn2.text, 0.6); show(api, 0.5); route(req, cn2, 0.6, smooth); }
|
|
102
|
+
par { show(cn3, 0.7); show(cn3.text.bg, 0.7); show(cn3.text, 0.7); show(cdb, 0.5); route(req, cn3, 0.7, smooth); }
|
|
103
|
+
par { show(cmf, 0.5); show(cn4, 0.6); show(cn4.text.bg, 0.6); show(cn4.text, 0.6); }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
wait(0.5);
|
|
107
|
+
|
|
108
|
+
// 4 — push into the API container
|
|
109
|
+
step("into-api") {
|
|
110
|
+
par {
|
|
111
|
+
say(cap, "Zoom into the API…", 0.4);
|
|
112
|
+
zoom(2.4, 1.1, smooth);
|
|
113
|
+
fade(ccust, 0.6); fade(spa, 0.6); fade(cdb, 0.6); fade(cmf, 0.6);
|
|
114
|
+
fade(cnt.connections, 0.6); fade(req.parts, 0.4);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
wait(0.2);
|
|
118
|
+
|
|
119
|
+
// 5 — inside the API, the components ASSEMBLE as the sign-in call travels.
|
|
120
|
+
step("components") {
|
|
121
|
+
seq {
|
|
122
|
+
par {
|
|
123
|
+
say(cap, "…inside, a sign-in call builds the components it touches.", 0.4);
|
|
124
|
+
fade(api, 0.4);
|
|
125
|
+
zoom(1.0, 1.0, smooth);
|
|
126
|
+
}
|
|
127
|
+
par { show(signin, 0.4); show(req2.parts, 0.25); }
|
|
128
|
+
par { show(cp1, 0.6); show(cp1.text.bg, 0.6); show(cp1.text, 0.6); show(sec, 0.5); route(req2, cp1, 0.6, smooth); }
|
|
129
|
+
par { show(cp3, 0.7); show(cp3.text.bg, 0.7); show(cp3.text, 0.7); show(mdb, 0.5); route(req2, cp3, 0.7, smooth); }
|
|
130
|
+
par {
|
|
131
|
+
show(acct, 0.5); show(fac, 0.5); show(mmf, 0.5);
|
|
132
|
+
show(cp2, 0.6); show(cp2.text.bg, 0.6); show(cp2.text, 0.6);
|
|
133
|
+
show(cp4, 0.6); show(cp4.text.bg, 0.6); show(cp4.text, 0.6);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
wait(0.5);
|
|
138
|
+
|
|
139
|
+
// 8 — climb back to the containers (fade components out, pull back, reveal)
|
|
140
|
+
step("back-to-containers") {
|
|
141
|
+
seq {
|
|
142
|
+
par {
|
|
143
|
+
say(cap, "Zoom back out to the containers…", 0.4);
|
|
144
|
+
fade(cmp.nodes, 0.4); fade(cmp.connections, 0.4); fade(req2.parts, 0.3);
|
|
145
|
+
zoom(0.8, 0.5, smooth);
|
|
146
|
+
}
|
|
147
|
+
par {
|
|
148
|
+
zoom(1.0, 0.6, smooth);
|
|
149
|
+
show(ccust, 0.5); show(spa, 0.5); show(api, 0.5); show(cdb, 0.5); show(cmf, 0.5);
|
|
150
|
+
show(cnt.connections, 0.5);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
wait(0.4);
|
|
155
|
+
|
|
156
|
+
// 9 — and out to the whole system in its world
|
|
157
|
+
step("back-to-context") {
|
|
158
|
+
seq {
|
|
159
|
+
par {
|
|
160
|
+
say(cap, "…and out to the whole system, at every altitude. That is manic.", 0.5);
|
|
161
|
+
fade(ccust, 0.4); fade(spa, 0.4); fade(api, 0.4); fade(cdb, 0.4); fade(cmf, 0.4);
|
|
162
|
+
fade(cnt.connections, 0.4);
|
|
163
|
+
zoom(0.8, 0.5, smooth);
|
|
164
|
+
}
|
|
165
|
+
par {
|
|
166
|
+
zoom(1.0, 0.6, smooth);
|
|
167
|
+
show(cust, 0.6); show(sys, 0.6); show(mail, 0.6); show(core, 0.6); show(ctx.connections, 0.6);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
wait(1.6);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
title("Container diagram — Internet Banking System");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic");
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · CONTAINER");
|
|
8
|
+
text(headline, (cx, h*0.12), "Container diagram for Internet Banking System");
|
|
9
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker);
|
|
10
|
+
size(headline, 22*u); bold(headline); wrap(headline, w*0.86);
|
|
11
|
+
|
|
12
|
+
// One c4 container diagram. Tiers do the grouping — person on top, the internal
|
|
13
|
+
// containers in the middle (they auto-split into balanced sub-rows), external
|
|
14
|
+
// systems on the bottom. Declaration order = left→right / row-major, so keep
|
|
15
|
+
// related boxes adjacent (web beside spa, spa's path down to api beside db).
|
|
16
|
+
c4(ib, container);
|
|
17
|
+
|
|
18
|
+
// person — top tier
|
|
19
|
+
node(cust, ib, "person", "Personal Banking Customer", "A customer of the bank, with personal bank accounts");
|
|
20
|
+
|
|
21
|
+
// internal containers — middle tier
|
|
22
|
+
node(web, ib, "container", "Web Application", "Delivers static content and the Internet banking SPA", "Java / Spring MVC");
|
|
23
|
+
node(spa, ib, "container", "Single-Page Application", "Internet banking in the web browser", "JavaScript / Angular");
|
|
24
|
+
node(mob, ib, "container", "Mobile App", "A subset of the banking functionality", "Xamarin");
|
|
25
|
+
node(api, ib, "container", "API Application", "Banking functionality via a JSON/HTTPS API", "Java / Spring MVC");
|
|
26
|
+
node(db, ib, "container", "Database", "Stores users, credentials and access logs", "Oracle");
|
|
27
|
+
|
|
28
|
+
// external systems — bottom tier
|
|
29
|
+
node(email, ib, "external", "E-mail System", "The internal Microsoft Exchange system");
|
|
30
|
+
node(mf, ib, "external", "Mainframe Banking System", "Core banking: customers, accounts, transactions");
|
|
31
|
+
|
|
32
|
+
connect(e1, cust, web); annotate(e1, "Visits bigbank.com/ib [HTTPS]");
|
|
33
|
+
connect(e2, cust, spa); annotate(e2, "Views balances, makes payments");
|
|
34
|
+
connect(e3, cust, mob); annotate(e3, "Views balances, makes payments");
|
|
35
|
+
connect(e4, web, spa); annotate(e4, "Delivers to the browser");
|
|
36
|
+
connect(e5, spa, api); annotate(e5, "API calls [JSON/HTTPS]");
|
|
37
|
+
connect(e6, mob, api); annotate(e6, "API calls [JSON/HTTPS]");
|
|
38
|
+
connect(e7, api, db); annotate(e7, "Reads/writes [JDBC]");
|
|
39
|
+
connect(e8, api, email); annotate(e8, "Sends e-mail [SMTP]");
|
|
40
|
+
connect(e9, api, mf); annotate(e9, "API calls [XML/HTTPS]");
|
|
41
|
+
connect(e10, email, cust); annotate(e10, "Sends e-mails to");
|
|
42
|
+
|
|
43
|
+
color(e1, cyan); color(e1.hot, cyan);
|
|
44
|
+
color(e2, cyan); color(e2.hot, cyan);
|
|
45
|
+
color(e3, cyan); color(e3.hot, cyan);
|
|
46
|
+
color(e4, cyan); color(e4.hot, cyan);
|
|
47
|
+
color(e5, cyan); color(e5.hot, cyan);
|
|
48
|
+
color(e6, cyan); color(e6.hot, cyan);
|
|
49
|
+
color(e7, cyan); color(e7.hot, cyan);
|
|
50
|
+
color(e8, gold); color(e8.hot, gold);
|
|
51
|
+
color(e9, gold); color(e9.hot, gold);
|
|
52
|
+
color(e10, gold); color(e10.hot, gold);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
title("C4 — Zoom From Context Into Containers");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
template("mono");
|
|
4
|
+
|
|
5
|
+
let u = (w+h-abs(w-h))/1440;
|
|
6
|
+
watermark(mark, (w*0.15, h*0.04), "Made With Manic"); sticky(mark);
|
|
7
|
+
text(kicker, (cx, h*0.055), "DIAGRAMS · C4 · CONTEXT → CONTAINER");
|
|
8
|
+
size(kicker, 15*u); color(kicker, dim); bold(kicker); sticky(kicker);
|
|
9
|
+
text(cap, (cx, h*0.93), "One system in its world.");
|
|
10
|
+
size(cap, 16*u); color(cap, dim); wrap(cap, w*0.86); sticky(cap);
|
|
11
|
+
|
|
12
|
+
// ---- Level 1: System Context (visible first) ----
|
|
13
|
+
c4(ctx, context);
|
|
14
|
+
node(cust, ctx, "person", "Customer", "A retail banking customer");
|
|
15
|
+
node(ibs, ctx, "system", "Internet Banking System", "View accounts, make payments");
|
|
16
|
+
node(mail, ctx, "external", "E-mail System", "Sends notifications");
|
|
17
|
+
node(core, ctx, "external", "Mainframe", "Core banking information");
|
|
18
|
+
connect(x1, cust, ibs); annotate(x1, "Uses");
|
|
19
|
+
connect(x2, ibs, mail); annotate(x2, "Sends e-mail [SMTP]");
|
|
20
|
+
connect(x3, ibs, core); annotate(x3, "Reads/writes [XML/HTTPS]");
|
|
21
|
+
color(x1, cyan); color(x1.hot, cyan);
|
|
22
|
+
color(x2, gold); color(x2.hot, gold);
|
|
23
|
+
color(x3, cyan); color(x3.hot, cyan);
|
|
24
|
+
|
|
25
|
+
// ---- Level 2: Containers (hidden until we zoom in) ----
|
|
26
|
+
c4(cnt, container);
|
|
27
|
+
node(pcust, cnt, "person", "Customer", "A retail banking customer");
|
|
28
|
+
node(spa, cnt, "container", "Single-Page App", "Account UI in the browser", "JavaScript / Angular");
|
|
29
|
+
node(api, cnt, "container", "API Application", "Banking functionality (JSON/HTTPS)", "Java / Spring Boot");
|
|
30
|
+
node(db, cnt, "container", "Database", "Users, accounts and payments", "Oracle");
|
|
31
|
+
node(mf, cnt, "external", "Mainframe", "Core banking information");
|
|
32
|
+
connect(y1, pcust, spa); annotate(y1, "Uses [HTTPS]");
|
|
33
|
+
connect(y2, spa, api); annotate(y2, "Calls [JSON/HTTPS]");
|
|
34
|
+
connect(y3, api, db); annotate(y3, "Reads/writes [JDBC]");
|
|
35
|
+
connect(y4, api, mf); annotate(y4, "Uses [XML/HTTPS]");
|
|
36
|
+
color(y1, cyan); color(y1.hot, cyan);
|
|
37
|
+
color(y2, cyan); color(y2.hot, cyan);
|
|
38
|
+
color(y3, cyan); color(y3.hot, cyan);
|
|
39
|
+
color(y4, gold); color(y4.hot, gold);
|
|
40
|
+
|
|
41
|
+
// The container diagram overlaps the context one (both centred) — hide it, and its
|
|
42
|
+
// duplicate frame, until the zoom reveals it.
|
|
43
|
+
hidden(cnt);
|
|
44
|
+
hidden(cnt.nodes); hidden(cnt.connections); hidden(cnt.hotpaths);
|
|
45
|
+
|
|
46
|
+
wait(0.8);
|
|
47
|
+
|
|
48
|
+
// Push the camera into the centred system, dropping everything around it.
|
|
49
|
+
step("zoom-in") {
|
|
50
|
+
par {
|
|
51
|
+
say(cap, "Zoom into the Internet Banking System…", 0.4);
|
|
52
|
+
zoom(2.6, 1.1, smooth);
|
|
53
|
+
fade(cust, 0.6); fade(mail, 0.6); fade(core, 0.6);
|
|
54
|
+
fade(ctx.connections, 0.6);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
wait(0.2);
|
|
58
|
+
|
|
59
|
+
// The system dissolves and its containers rise in as the camera pulls back.
|
|
60
|
+
step("open") {
|
|
61
|
+
par {
|
|
62
|
+
say(cap, "…and its containers are inside: SPA → API → Database.", 0.4);
|
|
63
|
+
fade(ibs, 0.4);
|
|
64
|
+
zoom(1.0, 1.0, smooth);
|
|
65
|
+
show(cnt.nodes, 0.7);
|
|
66
|
+
show(cnt.connections, 0.8);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
wait(1.4);
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
title("Calculus, visualized — the derivative and the integral");
|
|
2
|
+
canvas("16:9");
|
|
3
|
+
|
|
4
|
+
// screen anchor for the plot: math (0,0) maps here. Placing it at cx-450 with
|
|
5
|
+
// sx=150 centres the domain 0..6 under the canvas centre.
|
|
6
|
+
let ox = cx - 450;
|
|
7
|
+
let oy = cy + 120;
|
|
8
|
+
let sx = 150; // screen px per unit of x
|
|
9
|
+
let sy = 170; // screen px per unit of y
|
|
10
|
+
|
|
11
|
+
// ---------------- header ----------------
|
|
12
|
+
text(hdr, (cx, 54), "Two big ideas, one curve");
|
|
13
|
+
size(hdr, 32); color(hdr, cyan); bold(hdr); display(hdr); hidden(hdr);
|
|
14
|
+
|
|
15
|
+
text(flabel, (cx, 94), "f(x) = a smooth bell-shaped curve");
|
|
16
|
+
size(flabel, 18); color(flabel, dim); display(flabel); hidden(flabel);
|
|
17
|
+
|
|
18
|
+
// ---------------- the curve ----------------
|
|
19
|
+
axes(ax, (ox, oy), 930, 205, 1);
|
|
20
|
+
color(ax, dim); untraced(ax);
|
|
21
|
+
|
|
22
|
+
// axis labels, at the arrow tips
|
|
23
|
+
text(xlab, (ox + 958, oy + 6), "x");
|
|
24
|
+
size(xlab, 24); color(xlab, dim); display(xlab); hidden(xlab);
|
|
25
|
+
|
|
26
|
+
text(ylab, (ox, oy - 232), "f(x)");
|
|
27
|
+
size(ylab, 24); color(ylab, dim); display(ylab); hidden(ylab);
|
|
28
|
+
|
|
29
|
+
// numbered scale — each label sits at the plot's real coordinate:
|
|
30
|
+
// x = k -> (ox + k*sx, oy) y = v -> (ox, oy - v*sy)
|
|
31
|
+
line(tx1, (ox + 1*sx, oy - 7), (ox + 1*sx, oy + 7)); color(tx1, dim); tag(tx1, scale); hidden(tx1);
|
|
32
|
+
line(tx2, (ox + 2*sx, oy - 7), (ox + 2*sx, oy + 7)); color(tx2, dim); tag(tx2, scale); hidden(tx2);
|
|
33
|
+
line(tx3, (ox + 3*sx, oy - 7), (ox + 3*sx, oy + 7)); color(tx3, dim); tag(tx3, scale); hidden(tx3);
|
|
34
|
+
line(tx4, (ox + 4*sx, oy - 7), (ox + 4*sx, oy + 7)); color(tx4, dim); tag(tx4, scale); hidden(tx4);
|
|
35
|
+
line(tx5, (ox + 5*sx, oy - 7), (ox + 5*sx, oy + 7)); color(tx5, dim); tag(tx5, scale); hidden(tx5);
|
|
36
|
+
line(tx6, (ox + 6*sx, oy - 7), (ox + 6*sx, oy + 7)); color(tx6, dim); tag(tx6, scale); hidden(tx6);
|
|
37
|
+
|
|
38
|
+
text(nx1, (ox + 1*sx, oy + 28), "1"); size(nx1, 16); color(nx1, dim); tag(nx1, scale); hidden(nx1);
|
|
39
|
+
text(nx2, (ox + 2*sx, oy + 28), "2"); size(nx2, 16); color(nx2, dim); tag(nx2, scale); hidden(nx2);
|
|
40
|
+
text(nx3, (ox + 3*sx, oy + 28), "3"); size(nx3, 16); color(nx3, dim); tag(nx3, scale); hidden(nx3);
|
|
41
|
+
text(nx4, (ox + 4*sx, oy + 28), "4"); size(nx4, 16); color(nx4, dim); tag(nx4, scale); hidden(nx4);
|
|
42
|
+
text(nx5, (ox + 5*sx, oy + 28), "5"); size(nx5, 16); color(nx5, dim); tag(nx5, scale); hidden(nx5);
|
|
43
|
+
text(nx6, (ox + 6*sx, oy + 28), "6"); size(nx6, 16); color(nx6, dim); tag(nx6, scale); hidden(nx6);
|
|
44
|
+
|
|
45
|
+
line(tyh, (ox - 7, oy - 0.5*sy), (ox + 7, oy - 0.5*sy)); color(tyh, dim); tag(tyh, scale); hidden(tyh);
|
|
46
|
+
line(ty1, (ox - 7, oy - 1*sy), (ox + 7, oy - 1*sy)); color(ty1, dim); tag(ty1, scale); hidden(ty1);
|
|
47
|
+
text(nyh, (ox - 36, oy - 0.5*sy), "0.5"); size(nyh, 16); color(nyh, dim); tag(nyh, scale); hidden(nyh);
|
|
48
|
+
text(ny1, (ox - 24, oy - 1*sy), "1"); size(ny1, 16); color(ny1, dim); tag(ny1, scale); hidden(ny1);
|
|
49
|
+
|
|
50
|
+
plot(f, (ox, oy), sx, sy, "exp(-0.5*(x-3)*(x-3))", (0, 6));
|
|
51
|
+
color(f, cyan); stroke(f, 4); untraced(f);
|
|
52
|
+
|
|
53
|
+
// ---------------- captions (swap per act) ----------------
|
|
54
|
+
text(capd, (cx, h - 46), "THE DERIVATIVE — the slope at every point");
|
|
55
|
+
size(capd, 22); color(capd, gold); bold(capd); display(capd); hidden(capd);
|
|
56
|
+
|
|
57
|
+
text(capi, (cx, h - 46), "THE INTEGRAL — the area underneath");
|
|
58
|
+
size(capi, 22); color(capi, lime); bold(capi); display(capi); hidden(capi);
|
|
59
|
+
|
|
60
|
+
text(endcap, (cx, h - 46), "two views of one curve");
|
|
61
|
+
size(endcap, 22); color(endcap, cyan); bold(endcap); display(endcap); hidden(endcap);
|
|
62
|
+
|
|
63
|
+
// ---------------- derivative pieces ----------------
|
|
64
|
+
tangent(tan, f, 0.4, 220);
|
|
65
|
+
color(tan, gold); hidden(tan);
|
|
66
|
+
|
|
67
|
+
slope(sl, f, 0.4);
|
|
68
|
+
color(sl, gold); hidden(sl);
|
|
69
|
+
|
|
70
|
+
// ---------------- integral pieces ----------------
|
|
71
|
+
area(reg, f, 0, 0);
|
|
72
|
+
color(reg, lime);
|
|
73
|
+
|
|
74
|
+
text(ivlabel, (cx + 330, cy - 150), "area so far");
|
|
75
|
+
size(ivlabel, 16); color(ivlabel, dim); display(ivlabel); hidden(ivlabel);
|
|
76
|
+
|
|
77
|
+
integral(iv, f, 0, 0, (cx + 330, cy - 110));
|
|
78
|
+
size(iv, 30); color(iv, lime); hidden(iv);
|
|
79
|
+
|
|
80
|
+
// ================= timeline =================
|
|
81
|
+
show(hdr, 0.6);
|
|
82
|
+
show(flabel, 0.4);
|
|
83
|
+
draw(ax, 0.8);
|
|
84
|
+
par {
|
|
85
|
+
show(xlab, 0.4);
|
|
86
|
+
show(ylab, 0.4);
|
|
87
|
+
show(scale, 0.4);
|
|
88
|
+
}
|
|
89
|
+
draw(f, 1.6);
|
|
90
|
+
wait(0.4);
|
|
91
|
+
|
|
92
|
+
// --- Act 1: the derivative ---
|
|
93
|
+
show(capd, 0.5);
|
|
94
|
+
show(tan, 0.5);
|
|
95
|
+
show(sl, 0.4);
|
|
96
|
+
wait(0.3);
|
|
97
|
+
par { // climb to the peak — slope goes to zero
|
|
98
|
+
to(tan, x, 3, 2.2);
|
|
99
|
+
to(sl, x, 3, 2.2);
|
|
100
|
+
}
|
|
101
|
+
pulse(sl, 0.5);
|
|
102
|
+
wait(0.3);
|
|
103
|
+
par { // over the top — slope turns negative
|
|
104
|
+
to(tan, x, 5.6, 2.6);
|
|
105
|
+
to(sl, x, 5.6, 2.6);
|
|
106
|
+
}
|
|
107
|
+
wait(0.4);
|
|
108
|
+
|
|
109
|
+
// --- Act 2: the integral ---
|
|
110
|
+
par {
|
|
111
|
+
fade(capd, 0.4);
|
|
112
|
+
fade(tan, 0.4);
|
|
113
|
+
fade(sl, 0.4);
|
|
114
|
+
}
|
|
115
|
+
show(capi, 0.5);
|
|
116
|
+
show(ivlabel, 0.3);
|
|
117
|
+
show(iv, 0.3);
|
|
118
|
+
par { // sweep the area open, number climbs
|
|
119
|
+
to(reg, x, 6, 4);
|
|
120
|
+
to(iv, x, 6, 4);
|
|
121
|
+
}
|
|
122
|
+
wait(0.4);
|
|
123
|
+
flash(iv, lime);
|
|
124
|
+
pulse(iv, 0.5);
|
|
125
|
+
wait(0.4);
|
|
126
|
+
|
|
127
|
+
// --- close ---
|
|
128
|
+
fade(capi, 0.4);
|
|
129
|
+
show(endcap, 0.6);
|