Skip to content
Merged
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
16 changes: 16 additions & 0 deletions source/linear-algebra/source/01-LE/01.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,22 @@ Following are some examples of addition and scalar multiplication in <m>\mathbb
</me>
</p>
</example>
<figure xml:id="figure-le1-add-vectors">
<caption>Visualization of adding vectors</caption>
<interactive label="LE1-interactive-add-vectors" platform="doenetml" width="100%">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these need <descriptions> or are they otherwise navigable by screen readers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am waiting on https://groups.google.com/g/pretext-a11y/c/PtHHq-CCBJo / https://discordapp.com/channels/1119039531564417084/1377810920079888456/1461070765406294048 to be answered so I can do this. Perhaps we can merge this as-is, but open an issue to add descriptions generally?

<slate surface="doenetml">
<xi:include parse="text" href="doenet/LE1-add-vectors.xml"/>
</slate>
</interactive>
</figure>
<figure xml:id="figure-le1-scalar-mult">
<caption>Visualization of adding vectors</caption>
<interactive label="LE1-interactive-scalar-mult" platform="doenetml" width="100%">
<slate surface="doenetml">
<xi:include parse="text" href="doenet/LE1-scalar-mult.xml"/>
</slate>
</interactive>
</figure>
<definition>
<statement>
<p>
Expand Down
29 changes: 29 additions & 0 deletions source/linear-algebra/source/01-LE/doenet/LE1-add-vectors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<p>
Move the vectors to visualize their sum.
</p>
<setup><math name="vw" simplify>$v+$w</math></setup>
<graph xmin="-1" ymin="-1" xmax="8" ymax="8">
<point name="v" styleNumber="1" >
(3,2)
<label><m>\vec v=\left[\begin{array}{c} $v.x \\ $v.y\end{array}\right]</m></label>
<constraints>
<constrainToGrid dx="0.5" dy="0.5"/>
</constraints>
</point>
<point name="w" styleNumber="2" >
(1,4)
<label><m>\vec w=\left[\begin{array}{c} $w.x \\ $w.y\end{array}\right]</m></label>
<constraints>
<constrainToGrid dx="0.5" dy="0.5"/>
</constraints>
</point>
<point draggable="false" styleNumber="3" >
$v+$w
<label><m>\vec v+\vec w=\left[\begin{array}{c} $v.x+$w.x \\ $v.y+$w.y\end{array}\right]
=\left[\begin{array}{c} $vw.x \\ $vw.y \end{array}\right]</m></label>
</point>
<lineSegment draggable="false" styleNumber="1" endpoints="(0,0) $v"/>
<lineSegment draggable="false" styleNumber="2" endpoints="(0,0) $w"/>
<lineSegment draggable="false" styleNumber="3" endpoints="(0,0) $v+$w"/>
<polygon draggable="false" styleNumber="6" vertices="(0,0) $w $v+$w $v"/>
</graph>
21 changes: 21 additions & 0 deletions source/linear-algebra/source/01-LE/doenet/LE1-scalar-mult.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<p>
Move the vector and slider to visualize a scalar multiple of a vector.
</p>
<slider name="c" step="0.5" displayDigits="true" from="-5" to="5" initialValue="2"/>
<setup><math name="cv" simplify="true">$c*$v</math></setup>
<graph xmin="-10" ymin="-10" xmax="10" ymax="10">
<point name="v" styleNumber="1" >
(1,2)
<label><m>\vec v=\left[\begin{array}{c} $v.x \\ $v.y\end{array}\right]</m></label>
<constraints>
<constrainToGrid dx="0.5" dy="0.5"/>
</constraints>
</point>
<point draggable="false" styleNumber="2" >
$cv
<label><m>c\vec v=\left[\begin{array}{c} $c($v.x) \\ $c($v.y)\end{array}\right]
=\left[\begin{array}{c} $cv.x \\ $cv.y \end{array}\right]</m></label>
</point>
<lineSegment draggable="false" styleNumber="1" endpoints="(0,0) $v"/>
<lineSegment draggable="false" styleNumber="2" endpoints="(0,0) $cv"/>
</graph>