http://www.walter-fendt.de/ph14e/forceresol.htm

© Walter Fendt, May 30, 2003

Last modification: July 1, 2003

I used http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=634.msg2195#msg2195

to construct this http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1018.msg3713#msg3713

at this moment the applet derived from yours :) can do this!

Fixed relations:

xp=x+Math.sqrt(dx2*dx2+dy2*dy2)*Math.cos(Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1))*Math.cos(Math.atan2(dy1,dx1));

yp=y+Math.sqrt(dx2*dx2+dy2*dy2)*Math.cos(Math.atan2(dy2,dx2)-Math.atan2(dy1,dx1))*Math.sin(Math.atan2(dy1,dx1));

i notice i changed the codes to take values of dx2,dy2,dx1 and dy1 to find xp and xp ( the coordinate of the component of the FORCE (black line) on the BLUE line.

The current programmed applet works fine, but i can't figure out a way to make the applet to be controlled by F (length) and angle (cta) like the

http://www.walter-fendt.de/ph14e/forceresol.htm

I am guessing i need to change and rewrite the codes to use F and cta bearing in mind that i still want to applet to allow the black line to be draggable which i notice is determined by the size x and size y and i noticed if i use size x = F*Math.cos(cta) and size y = F*Math.sin(cta), the applet is no longer draggable ??? I am struck here >:(

any tips how i can mimic http://www.walter-fendt.de/ph14e/forceresol.htm ability to allow F draggable and still can resolve components which your source codes allows me to built on.