Skip to content

"circle2p"

mkraska edited this page Aug 16, 2022 · 12 revisions

[ "circle2p", "label1","label2", [x1,y1],[x2,y2], f ]

circle with two draggable perimeter points, meant for Mohr's circle construction. The intersections between x-axis and circle have an infobox (coordinate display) and are exposed as snap targets for the control points of "line2p". The precision of coordinate display is controlled by the "grid" object.

The object returns a list of scaled co-ordinates [ [x1,y1], [x2,y2] ] to the names input field.

  • label1, label2 labels for the two control points
  • [x1,y1], [x2,y2] initial locations of the control points (in scaled units)
  • f scale factor for grid units (obsolete since 2022 04 25, because scaling for dynamic display is made by default).

See also "line2p" for draggable line and "grid" and Dynamic display of coordinates for grid scaling.

image

[
    [ "grid", "x","y", -2,3,-2,2, 40,  [5, 5],  [2,2] ],
    [ "circle2p", "P1","P2", [-5,-5],[5,5] ,10]
]

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