Skip to content

"frame"

mkraska edited this page Jun 28, 2023 · 2 revisions

[ "frame", "name", [[x1,y1], [x2, y2], ...], tension ]

Object to mark the boundary of a system.

  • "name" not used
  • [...] list of coordinate pairs, support points for the line
  • tension (optional, default: 3): Tension of the spline. High values give sharp corners, low values give round corners.

Example

image
[ 
  [ "grid", "", "", -1, 9, -1, 3, 40],
  [ "frame", "", [[0,0], [2,0], [2,1], [0, 1]], 20],
  [ "point", "", [0,0]],
  [ "point", "", [2,0]],
  [ "point", "", [2,1]],
  [ "point", "", [0,1]],
  [ "frame", "", [[3,0], [5,0], [5,1], [3, 1]],3 ],
  [ "point", "", [3,0]],
  [ "point", "", [5,0]],
  [ "point", "", [5,1]],
  [ "point", "", [3,1]],
  [ "frame", "", [[6,0], [8,0], [8,1], [6, 1]],1 ],
  [ "point", "", [6,0]],
  [ "point", "", [8,0]],
  [ "point", "", [8,1]],
  [ "point", "", [6,1]],
  [ "label", "tension = 20", [0.1,0.5]],
  [ "label", "tension = 3", [3.1,0.5]],
  [ "label", "tension = 1", [6.1,0.5]]
]
image
[ 
  [ "grid", "", "", -2, 8, -3.5, 4, 30],
  [ "beam", "", [-1, 1.2], [7, 1.2], 0.2],
  [ "fix12", "A", [1,-2], 0, "show" ],
  [ "fix12", "B", [6,-2], 0, "show" ],
  [ "bar", "1", [1,-2], [0,1], "show" ],
  [ "bar", "2", [1,-2], [2,1], "show" ],
  [ "bar", "3", [6,-2], [6,1], "show" ],
  [ "force", "F", [3,1], [3,-0.5] ],
  [ "forceGen", "F_1", [1,3]],
  [ "momentGen", "M_1", [3.5,3.0]],
  [ "frame", "", [[-1.5,1.5], [7.5,1.5], [7.5,-1], [-1.5, -1]], 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