Skip to content
mkraska edited this page Nov 16, 2024 · 11 revisions

[ "rope", "name", [x1, y1], r1, [x2,y2], r2, state ]

Tangent line to two circles with center and radius given. Negative r values select the tangent point on the left side from the line C1-C2. Represents ropes running between disks.

  • "name" label text, typeset as normal text. Add \\( and \\) to enforce math mode.
  • [x1, y1] center of first disk
  • r1 radius of first disk (can be zero, then line starts at the center)
  • [x2, y2] center of second disk
  • r2 radius of second disk (can be zero, then line ends at the center)
  • state (optional, default: "SHOW") "hide", "show" or "HIDE, "SHOW"

Example

image

image

[
  [ "grid", "x","y", -5,5,-4,5, 50, [10,10], [0,0] ],
  [ "circle", "", [2, 2], 0.5 , 0],
  [ "circle", "", [3, 4], 0.5 , 0],
  [ "rope", "", [2, 2], -0.5, [3,4], 0.5 ],
  [ "point", "1", [2,2] ],
  [ "point", "2", [3,4] ],
  [ "dir", "r1", [2,2], -45, 9, 0.5],
  [ "dir", "r2", [3,4], 0, 9, 0.5],
  [ "label", "name", [2.7, 3] ]
]

Objects

  • l (segment) line
    • l.point1 (point) start point
    • l.point2 (point) end point
    • l.L() (number) length
  • p1 center of first circle
  • p2 center of second circle

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 hidden id="init">) with the content of the clipboard
Clone this wiki locally