From 6961382cd8e57b19f2a84fc893d17376b87b620e Mon Sep 17 00:00:00 2001 From: Rob Beezer Date: Fri, 19 Apr 2024 13:31:06 -0700 Subject: [PATCH] Sample article: move a JSXGraph example to the proper subsection --- examples/sample-article/sample-article.xml | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/sample-article/sample-article.xml b/examples/sample-article/sample-article.xml index aea76835b..995ddd29b 100644 --- a/examples/sample-article/sample-article.xml +++ b/examples/sample-article/sample-article.xml @@ -7553,28 +7553,6 @@ along with MathBook XML. If not, see .

Note that the HTML that is output can vary slightly from your source in small, harmless ways, such as empty (self-closing) elements being output with both an opening and a closing tag. Please report any significant discrepancies. Soon this requirement will be enforced in the code.

-

The following example was contributed by Rick Roesler. The figure is comprised of four stack elements within a sidebyside. By varying the time in the top box, the reader can observe the displacement, velocity, and acceleration of a ball thrown upward with an initial velocity of 30 m/s.

- -
- 1-Dimensional Kinematics - - - - - - - - - - -

Use the time slider in the top panel to vary the time from 0 sec to 6 sec. Observe how the displacement, velocity, and acceleration vary with time.

-
- - - -
-
-

It is also possible to add script elements within an interactive that contain properly escaped JS code. These elements will be placed at the end of the document created to hold the interactive content and can interactive with the other elements within the interactive but can not directly interact with the surrounding page.

Authors are strongly discouraged from trying to incorporate complex code in the form of a script, but it can be a useful tool to call more complex code that is linked via source on the interactive.

@@ -7756,6 +7734,28 @@ along with MathBook XML. If not, see .

Place Javascript inside a file that is specified with the source attribute of the interactive element. Then just be certain that xml:id of the interactive element is passed as the HTML id in an (early) call to JSXGraph's initBoard() method.

+

The following example was contributed by Rick Roesler. The figure is comprised of four stack elements within a sidebyside. By varying the time in the top box, the reader can observe the displacement, velocity, and acceleration of a ball thrown upward with an initial velocity of 30 m/s.

+ +
+ 1-Dimensional Kinematics + + + + + + + + + + +

Use the time slider in the top panel to vary the time from 0 sec to 6 sec. Observe how the displacement, velocity, and acceleration vary with time.

+
+ + + +
+
+

The plot below is the curve r=a+b\theta in polar coordinates, for 0\leq\theta\leq 8\pi. It may be manipulated with the sliders to control the shape of the curve. Point A is contrained to the curve, but may be dragged to a new location. At A the tangent line and normal line are plotted as dashed red lines. Use the controls in the lower left to adjust the viewing window. This Archimedean Spiral is taken from the JSXGraph example wiki. The code could be written in 7 lines. Width is 80% and aspect ratio is 4:3.