3. SCOTT RUSSELL LINKAGE – JSP
The JSP Code

The JSP applet code given below was used to produce the diagram at right.

The easiest way to place these applets on other web sites is to paste the code exactly as it is into the page source (in the right place!), and then set up the link for the applet icon in page layout view (or whatever terminology your web program uses).

       
<APPLET CODE="GSP.class"
WIDTH=250 HEIGHT=300 ALIGN=left>
<PARAM NAME=Frame VALUE=1>
<PARAM NAME=BackRed VALUE=200>
<PARAM NAME=BackGreen VALUE=255>
<PARAM NAME=BackBlue VALUE=200>
<PARAM NAME=Construction VALUE="

{Define some segments to give fixed and variable lengths}
{1} FixedPoint (50, 20) [hidden];
{2} FixedPoint (130, 20) [hidden];
{3} Segment (1, 2) [hidden]; {determines length 80}

{Fixed points D and A}
{4} FixedPoint (50, 250) [blue, label ('D')];
{5} FixedPoint (180, 170) [blue, label ('A')];

{Point C}
{6} Circle by radius (4, 3) [hidden];
{7} Point on object (6, -1.57) [label ('C')];
{8} Segment (4, 7) [thick, blue];

{Point B}
{9} Circle by radius (7, 3) [hidden];
{10} Circle by radius (5, 3) [hidden];
{11} Intersect1 (9, 10) [blue, label ('B')];
{12} Segment (5, 11) [blue, thick];

{Point P}
{13} Ray (7, 11) [hidden];
{14} Point on object (13, -1) [black, label ('P')];
{15} Segment (7, 14) [red, thick];

{Vertical path}
{16} Point (180, 30) [hidden];
{17} Point (180, 120) [hidden];
{18} Segment (16, 17) [black];

{Horizontal path}
{19} Point (20, 170) [hidden];
{20} Point (80, 170) [hidden];
{21} Segment (19, 20) [black];


">
</APPLET>



This applet will have a light green background.





We will be using lengths of 80 and 160.



We choose fixed points D and A so that A is on the same horizontal line as C when C is in the top position.


The value -1.57 corresponds to +90°.










The parameter –1 gives P on the ray CB with CB = BP.



These two paths are just drawn on the figure, with coordinates chosen for best fit. They have no constraining powers on the linkage.

Exercises

1. Try different values for the parameter in {14}, giving different positions of P.

2. Given the accuracy of the mathematical analysis, why does the point P move off the indicated vertical path?

3. Use ‘Point on object’ and an adjustable slider to enable the position of P to be varied from the viewed applet.

4. For the Puffing Billy it would be useful to have the motion of P (from the vertical piston) translate into the horizontal motion of C (driving the wheels). Write a program to do this.