Test
Aus Wiki1
(Unterschied zwischen Versionen)
| Zeile 50: | Zeile 50: | ||
<jsxgraph box="box" width="500" height="500"> | <jsxgraph box="box" width="500" height="500"> | ||
| - | var | + | var brd = JXG.JSXGraph.initBoard('box', {boundingbox: [-3,3,3,-3], axis:true}); |
// Parameter | // Parameter | ||
| Zeile 112: | Zeile 112: | ||
// Punkte für das Pendel | // Punkte für das Pendel | ||
| - | let origin = | + | let origin = brd.create('point', [0,0], {fixed:true, size:2, name:''}); |
| - | let p1 = | + | let p1 = brd.create('point', [ |
() => l1*Math.sin(theta1), | () => l1*Math.sin(theta1), | ||
() => -l1*Math.cos(theta1) | () => -l1*Math.cos(theta1) | ||
], {size:4, name:'', color:'red'}); | ], {size:4, name:'', color:'red'}); | ||
| - | let p2 = | + | let p2 = brd.create('point', [ |
() => l1*Math.sin(theta1) + l2*Math.sin(theta2), | () => l1*Math.sin(theta1) + l2*Math.sin(theta2), | ||
() => -l1*Math.cos(theta1) - l2*Math.cos(theta2) | () => -l1*Math.cos(theta1) - l2*Math.cos(theta2) | ||
| Zeile 123: | Zeile 123: | ||
// Verbindungen | // Verbindungen | ||
| - | + | brd.create('line', [origin, p1], {straightFirst:false, straightLast:false}); | |
| - | + | brd.create('line', [p1, p2], {straightFirst:false, straightLast:false}); | |
// Animation | // Animation | ||
Version vom 10:40, 5. Sep. 2025
