Skip to content

"contact"

mkraska edited this page Sep 26, 2026 · 1 revision

[ "contact", "name", [x, y], [dx, dy], targetRef, lineLength, visible ]

Point-type support representing a frictionless contact between the sketched body and an environment object that gets cut away. Appears as a gray cross (normal + tangent line) once the referenced object is deactivated.

  • "name" label, typeset in MathJax math mode (may be empty)
  • [x, y] contact point
  • [dx, dy] normal direction vector (need not be normalized); the tangent is perpendicular to it
  • targetRef name (string) or 1-based index (integer) of the object that this contact replaces once cut away
  • lineLength (optional, default 1) length of the gray cross indicating normal/tangent snap directions
  • visible (optional, default true) whether the gray cross is ever drawn; it is only shown while the referenced object is deactivated

Status (for names/free body diagram matching) is derived automatically from the referenced object: "hide" (eligible for a reaction) once that object is deactivated, "show" otherwise.

See Feedback for "contact" for feedback functions in free body diagrams.

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. 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)

Clone this wiki locally