Annotation of loncom/homework/templates/functionplotvector.problem, revision 1.3

1.1       www         1: <problem>
                      2: <script type="loncapa/perl">$slope=&random(0.5,0.8,0.1);
                      3: $function="2+$slope*x";
                      4: $massx=&random(3.5,6.5,0.1);
                      5: $massy=2.1+$slope*$massx;
                      6: $angle=180.*atan($slope)/$pi;
                      7: $perp=$angle+90.;</script>
                      8: <startouttext />
1.2       www         9: A mass is sliding down the indicated incline with a constant velocity. Construct the free body diagram, making sure the forces are approximately proportionally correct. Leave unused vectors unattached.<br />
                     10: <i>You can use the red-colored vector sum tool to help you construct your diagram; check the boxes for the vectors you want included in the sum. The tool is just there to help you, its settings are not graded.</i>
                     11: <br />
                     12: <endouttext />
1.1       www        13: <functionplotresponse xaxisvisible="no" xlabel="x" gridvisible="yes" ylabel="y" id="11" xmax="10" yaxisvisible="no" xmin="0" ymin="0" ymax="10" width="450" height="450">
                     14: <functionplotelements>
                     15: 
                     16: <backgroundplot function="$function" fixed="yes" />
                     17: <plotobject label="Mass" x="$massx" y="$massy" />
1.2       www        18: <plotvector label="Gravity" tailx="7" taily="1" tipx="8" tipy="1" />
                     19: <plotvector label="KineticFriction" tailx="7" taily="2" tipx="8" tipy="2" />
                     20: <plotvector label="StaticFriction" tailx="7" taily="3" tipx="8" tipy="3" />
                     21: <plotvector label="NormalForce" tailx="7" taily="4" tipx="8" tipy="4" />
1.3     ! www        22: <drawvectorsum label="Sum" tailx="$massx" taily="$massy" showvalue="no" vectorlist="Gravity,KineticFriction,StaticFriction,NormalForce" />
1.1       www        23: </functionplotelements>
                     24: <functionplotruleset>
                     25: <functionplotvectorrule index="Grav" vector="Gravity" attachpoint="Mass" angle="270" angleerror="2" />
1.2       www        26: <functionplotvectorrule index="Norm" vector="NormalForce" attachpoint="Mass" angle="$perp" angleerror="4" />
                     27: <functionplotvectorrule index="KFriction" vector="KineticFriction" attachpoint="Mass" angle="$angle" angleerror="3" />
1.1       www        28: <functionplotvectorrule index="SFriction" vector="StaticFriction" notattachpoint="Mass" />
1.2       www        29: <functionplotvectorsumrule vectors="Gravity,NormalForce,KineticFriction" length="0" lengtherror="2" index="Total" />
1.1       www        30: </functionplotruleset>
                     31: <hintgroup showoncorrect="no">
                     32:     
                     33: <hintpart on="Grav">
                     34:     <startouttext />Gravity acts on the mass and points straight down.<endouttext />
                     35: </hintpart>
                     36: <hintpart on="SFriction">
                     37:     <startouttext />The mass is sliding.<endouttext />
                     38: </hintpart>
                     39: <hintpart on="Total">
                     40:     <startouttext />What should be the net force on the mass?<endouttext />
                     41: </hintpart>
1.2       www        42: <hintpart on="Norm">
                     43:     <startouttext />What should be the direction of the normal force?<endouttext />
                     44: </hintpart>
                     45: 
1.1       www        46: </hintgroup>
                     47: </functionplotresponse>
                     48: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>