<!DOCTYPE html> <html> <head> <title>Physics - Prototyping</title> <link rel="stylesheet" href="./main.css"> <script src="./draw.js"></script> </head> <body> <script> const d = new Drawing(); d.setStroke('black', 4); d.polyline([0, 100], [0, 0], [100, 0]); d.definePoint('p1', () => d.oscillatingPoint([25, 100], [100, 100], 5000)); d.setStroke('red', 2); d.line([0, 0], 'p1'); d.setFill('blue'); d.definePoint('p2', () => { const [x, y] = d.getPoint('p1'); return [x, y - d.oscillatingValue(10, 40, 5000 / 3, Math.PI / 2)]; }); d.square('p2'); d.setFill('cyan'); d.circle('p1'); d.start(); </script> </body> </html>