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)  

enter image description here


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -