Repository navigation
Feedback for "dir"
-
o,ncontents of the parsedobjectsfield and of thenamesfield -
i_dirindex of thedirobject (or any other object suited fordirection()) -
tolcoefficient tolerance (same footing as the tolerance passed tofb_coeffs)
This function lists the names of every force that will actually contribute a
non-negligible term when the forces in o are summed along direction(o[i_dir]) via sum_dir. Typically, an interactive version of "dir" is used to let the student specify that direction.
The main purpose is formative feedback to support a smart choice for the direction of summation (as few as possible unknowns per equation).
Note: The perpendicularity check does not use perpendicularp(), which compares raw (non-normalized) direction vectors and
is not comparable across forces of different arrow length — contributor() instead recomputes
the same normalized projection sum_dir itself uses.
Wraps contributor() into the usual [text, flag] shape. flag is always true — this is
formative only, with no grading effect. desc is a phrase like "in 1-Richtung", appended at
the end of the sentence, kept language/direction-agnostic.
obj: stackjson_parse(objects);
[text, ok]: fb_dir(obj, names, i_dir1, 0.05, "in 1-Richtung");```
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p id="init">) with the content of the clipboard
The remaining jsfiddle pages don't seem to work any more (as of 04/26)