vb.net - How to work out the X and Y coordinates of a moved pendulum -
i trying make pendulum simulation in vb.net, move string of pendulum using:
e.graphics.drawline(pens.black, 270, 0, 270, lengthofstring)
and changing end coordinates rotate line around point (270, 0). end making isosceles triangle. know 2 equal lengths (lengthofstring). how work out lower (not (270, 0) x , y coordinate of rotated line.
i have tried work out with: pythagoras (to work out lower line's length) trig, after splitting triangle in half
if starting angle let φ
, known then:
sinφ = x / lengthofstring cosφ = y / lengthofstring
the end points:
(270 - x, 0 + y), (270 + x, 0 + y)
Comments
Post a Comment