Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement TranslateScale * Affine (both directions) #287

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ features = ["alloc", "derive"]

# This is used for research but not really needed; maybe refactor.
[dev-dependencies]
float-cmp = "0.9.0"
rand = "0.8.0"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
Expand Down
11 changes: 11 additions & 0 deletions docs/math/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This directory includes the LaTeX source and MathML output of math displayed in the kurbo inline docs.

To build:

1. Find the snipped that you want to copy
2. Go to https://temml.org/ and set output to `MathML`
3. Copy and paste your snippet into the input
4. Copy the output into a file in this folder
5. Do `#[doc = include_str!("relative/path/to/the/mathml")]` in kurbo source to inline the math.

It's a manual process at the moment, but given that the math isn't going to be updated often it works for me.
192 changes: 192 additions & 0 deletions docs/math/impl_mulaffine_for_translatescale.mathml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<math display="block" style="display:block math;">
<mrow>
<mrow>
<mo fence="true" form="prefix">(</mo>
<mtable columnalign="center center center" class="tml-array">
<mtr>
<mtd>
<mi>s</mi>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<msub>
<mi>t</mi>
<mi>x</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>s</mi>
</mtd>
<mtd>
<msub>
<mi>t</mi>
<mi>y</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo fence="true" form="postfix">)</mo>
</mrow>
<mrow>
<mo fence="true" form="prefix">(</mo>
<mtable columnalign="center center center" class="tml-array">
<mtr>
<mtd>
<msub>
<mi>m</mi>
<mn>11</mn>
</msub>
</mtd>
<mtd>
<msub>
<mi>m</mi>
<mn>12</mn>
</msub>
</mtd>
<mtd>
<msub>
<mi>m</mi>
<mn>13</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>m</mi>
<mn>21</mn>
</msub>
</mtd>
<mtd>
<msub>
<mi>m</mi>
<mn>22</mn>
</msub>
</mtd>
<mtd>
<msub>
<mi>m</mi>
<mn>23</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo fence="true" form="postfix">)</mo>
</mrow>
<mo>=</mo>
<mrow>
<mo fence="true" form="prefix">(</mo>
<mtable columnalign="center center center" class="tml-array">
<mtr>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>11</mn>
</msub>
<mi>s</mi>
</mrow>
</mtd>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>12</mn>
</msub>
<mi>s</mi>
</mrow>
</mtd>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>13</mn>
</msub>
<mi>s</mi>
<mo>+</mo>
<msub>
<mi>t</mi>
<mi>x</mi>
</msub>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>21</mn>
</msub>
<mi>s</mi>
</mrow>
</mtd>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>22</mn>
</msub>
<mi>s</mi>
</mrow>
</mtd>
<mtd>
<mrow>
<msub>
<mi>m</mi>
<mn>23</mn>
</msub>
<mi>s</mi>
<mo>+</mo>
<msub>
<mi>t</mi>
<mi>y</mi>
</msub>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo fence="true" form="postfix">)</mo>
</mrow>
</mrow>
</math>
Loading