[LON-CAPA-cvs] cvs: loncom /homework/templates functionplotvector.problem functionplotvector.problem.meta doc/loncapafiles loncapafiles.lpml

www www at source.lon-capa.org
Fri Nov 25 21:12:46 EST 2011


www		Sat Nov 26 02:12:46 2011 EDT

  Added files:                 
    /loncom/homework/templates	functionplotvector.problem 
                              	functionplotvector.problem.meta 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  Function Plot with Vectors Template
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.770 doc/loncapafiles/loncapafiles.lpml:1.771
--- doc/loncapafiles/loncapafiles.lpml:1.770	Fri Nov 25 15:49:19 2011
+++ doc/loncapafiles/loncapafiles.lpml	Sat Nov 26 02:12:42 2011
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.770 2011/11/25 15:49:19 www Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.771 2011/11/26 02:12:42 www Exp $ -->
 
 <!--
 
@@ -1388,6 +1388,8 @@
 functionplottwo.problem.meta;
 functionplotback.problem;
 functionplotback.problem.meta;
+functionplotvector.problem;
+functionplotvector.problem.meta;
 HintFormula.problem;
 HintFormula.problem.meta;
 HintMathResponse.problem;

Index: loncom/homework/templates/functionplotvector.problem
+++ loncom/homework/templates/functionplotvector.problem
<problem>
<script type="loncapa/perl">$slope=&random(0.5,0.8,0.1);
$function="2+$slope*x";
$massx=&random(3.5,6.5,0.1);
$massy=2.1+$slope*$massx;
$angle=180.*atan($slope)/$pi;
$perp=$angle+90.;</script>
<startouttext />
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 /> <endouttext />
<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">
<functionplotelements>

<backgroundplot function="$function" fixed="yes" />
<plotobject label="Mass" x="$massx" y="$massy" />
<plotvector label="Gravity" tailx="6" taily="1" tipx="9" tipy="1" />
<plotvector label="KineticFriction" tailx="6" taily="2" tipx="9" tipy="2" />
<plotvector label="StaticFriction" tailx="6" taily="3" tipx="9" tipy="3" />
<plotvector label="NormalForce" tailx="6" taily="4" tipx="9" tipy="4" />

</functionplotelements>
<functionplotruleset>
<functionplotvectorrule index="Grav" vector="Gravity" attachpoint="Mass" angle="270" angleerror="2" />
<functionplotvectorrule index="Norm" vector="NormalForce" attachpoint="Mass" angle="$perp" angleerror="3" />
<functionplotvectorrule index="KFriction" vector="KineticFriction" attachpoint="Mass" angle="$angle" angleerror="2" />
<functionplotvectorrule index="SFriction" vector="StaticFriction" notattachpoint="Mass" />
<functionplotvectorsumrule vectors="Gravity,NormalForce,KineticFriction" length="0" lengtherror="1" index="Total" />
</functionplotruleset>
<hintgroup showoncorrect="no">
    
<hintpart on="Grav">
    <startouttext />Gravity acts on the mass and points straight down.<endouttext />
</hintpart>
<hintpart on="SFriction">
    <startouttext />The mass is sliding.<endouttext />
</hintpart>
<hintpart on="Total">
    <startouttext />What should be the net force on the mass?<endouttext />
</hintpart>
</hintgroup>
</functionplotresponse>
</problem>

Index: loncom/homework/templates/functionplotvector.problem.meta
+++ loncom/homework/templates/functionplotvector.problem.meta
<title>Functionplotresponse with Vectors and Hints</title>
<category>Free Form Problems</category>




More information about the LON-CAPA-cvs mailing list