Test 1 TM3 10 03i
Kontrollpunkt rechts am Balkenende. Wenn man zieht und loslässt, soll das System einige Schwingungen ausführen und dann in der Ausgangslage stehen bleiben.
by aaronamran
HTML
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css">
<div id="jxgbox" class="jxgbox" style="width:500px; height:500px">
</div>
<p id="init">[
[ "grid", "","", -1, 6, -2, 3, 40 ],
[ "fix12", "A", [0,0], -90],
[ "fix12", "", [0, 2], -90],
[ "beam", "", [0,0], [5,0], 0.13],
[ "label", "\\(m\\)", [4.5, 0.4] ],
[ "springt", "c", [0, 2], [3, 0] ],
[ "node", "B", [3, 0] ],
[ "rot", "\\varphi", [0,0], [0.4, 0.4], [0.2,-0.8] ],
[ "moment", "M", [0,0], [1.2, 0.6], [1.2,-0.6] ]
]
</p>
<p id="data"></p>
<p id="fbd_names"></p>
<!--
pA:[0,-4]; pB:[1,-2]; pC: [1,-2]+[0.5, -4];
[ "dashpot", "d", [10,9], [14,9], 0.5, 1, "show"],
[ "fix1", "A", [1, 7], 60, "show" ],
[ "fix12", "B", [3, 7], 60, "show"],
[ "fix123", "C", [5, 7], 60, "show" ],
[ "fix13", "D", [7,7], 60, "show" ],
[ "line", "", [6, 7, 8, 9], [1, 3, 1, 3], "--" ,0.8],
[ "polygon", "",[10,8],[10,5], [11,5], [11,6], [12,6], [12,5], [13,5], [13, 8], "show"],
[ "circle", "c1", [2,9], 0.5, 45, "show" ],
[ "circle", "c2", [5,9], 0.5, 45, "show" ],
[ "rope", " ", [2,9], 0.5, [5,9], 0.5, "show" ],
[ "springc", "c", [2, 5], [6,5], 0.5, 10, "show" ],
[ "springt", "t", [2, 2], [6,2], 0.5, 30, 9, "show" ]
-->
JavaScript
/*
l1: 3;
l2: 2;
l3: 2;
dl: l1*l3/sqrt(l1^2+l3^2)*phi*a;
cE: c*l1^2*l3^2/(l3^2+l1^2)*a^2;
J: m/3*(l1+l2)^2*a^2;
T: float(2*pi*sqrt(J/cE*c/m));
pA: [0,0]; pB: [3, 0]; pC: [l1+l2,0]; pD: [0, l3];
initdata: [
[ "grid", "","", -1, 6, -1.5, 3, 40 ],
[ "fix12", "A", [0,0], -90],
[ "fix12", "", [0, 2], -90],
[ "beam", "", [0,0], [5,0], 0.13],
[ "label", "\\(m\\)", [4.5, 0.4] ],
[ "springt", "c", [0, 2], [3, 0] ],
[ "node", "B", [3, 0] ],
[ "rot", "\\varphi", [0,0], [0.4, 0.4], [0.2,-0.8] ],
[ "moment", "M", [0,0], [1.2, 0.6], [1.2,-0.6] ]
*/
// Start of jsfiddle header.
var mode = "jsfiddle";
var divid = "jxgbox";
var fbd_names = "fbd_names";
var stateRef = "data";
var initstring = document.getElementById("init").innerHTML;
const centeredLabelStyle = {
size: 0,
showInfobox: false,
label: {
offset: [0, 0],
anchorX: 'middle',
anchorY: 'middle'
}
};
/*
Fixed GitHub Issues that are implemented in this JS code:
#11 : Option to lock objects in hidden state (bar, beam, circle, dashpot, fix1, fix12, fix123, fix13, polygon, q, rope, springc, springt, wall)
#12 : Make the beam object clickable
#13 : Suppress infobox at "rot" points
#28 : Move "force" by dragging the vector
#30 : "force": Prevent forces to have zero length
#35 : Make toStack() more robust (cleanupName())
#37 : Grid lines to the background
https://github.com/mkraska/meclib/wiki/Moving-objects-by-scripts
*/
// https://github.com/mkraska/meclib/wiki
// version info
const versionText= "JXG "+JXG.version+" Meclib 2023 08 16";
const highlightColor = "orange";
const movableLineColor = "blue";
const loadColor = "blue";
const defaultMecLayer = 6;
let pxunit = 1/40; // is reset by "grid"
let a = 16*pxunit; // is reset by "grid"
const deg2rad = Math.PI/180, rad2deg = 180/Math.PI;
const tolPointLine = 0.001;
let xscale = 1, yscale = 1; // default scale for infobox, can be modified by "grid"
let dpx = 1, dpy = 1; // default decimal precision for infobox, can be modified by...