topic started 3/24/2003; 8:15:03 PM last post 3/24/2003; 8:15:03 PM |
3/24/2003; 8:15:03 PM (reads: 698, responses: 0) |
|
More complicated drawing using the Fun.pm commands. These are
in the file setGeometry4SubsetsOfR2/ur_geo_4_1.pg
(1 pt) rochesterLibrary/setGeometry4SubsetsOfR2/ur_geo_4_1.pg
WARNINGS µ¦å{h <hr /> <pre>##DESCRIPTION<br />##KEYWORDS('')<br />##<br />##ENDDESCRIPTION<br /><br />DOCUMENT(); # This should be the first executable line in the problem.<br /><br />loadMacros(<br />"PG.pl",<br />"PGbasicmacros.pl",<br />"PGchoicemacros.pl",<br />"PGanswermacros.pl",<br />"PGgraphmacros.pl"<br />);<br /><br />TEXT(beginproblem());<br />$showPartialCorrectAnswers = 1;<br /><br />$a = random(2,5,1);<br />$b = random(2,5,1);<br />while ($a == $b) {$b = random(2,5,1);} $graph1 = init_graph(-3,-3,6,6, 'axes'=>[0,0],'grid'=>[9,9]); $f3 = FEQ("x/($a) for x in <0,6> using color:black and weight:2"); $f4 = FEQ("$b * x for x in <0,6> using color:black and weight:2"); ($f3Ref,$f4Ref) = plot_functions($graph1,$f3,$f4); $mc1 = new_multiple_choice(); $graph1->fillRegion([1,1,'yellow']); $mc1->qa(image(insertGraph($graph1),height=>200,width=>200), "\( \left\{ \begin{array}{rcl} y & \le & $b x \cr x & \le & $a y \end{array}\right. \)"); $mc1->extra("\( \left\{ \begin{array}{rcl} y & \ge & $b x \cr x & \le & $a y \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \ge & $b x \cr x & \ge & $a y \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \le & $b x \cr x & \ge & 0 \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \ge & $a x \cr x & \ge & $b y \end{array}\right. \)"); $mc1->makeLast('None of the above'); $c = non_zero_random(-2,2,1); $graph2 = init_graph(-3,-3,6,6, 'axes'=>[0,0],'grid'=>[9,9]); $k3 = FEQ("$c for x in <0,6> using color:black and weight:2"); $k4 = FEQ("x+$c for x in <0,6> using color:black and weight:2"); ($k3Ref,$k4Ref) = plot_functions($graph2,$k3,$k4); $fill_point_y = $c + 0.5; $graph2->fillRegion([1,$fill_point_y,'yellow']); $mc2 = new_multiple_choice(); $mc2->qa(image(insertGraph($graph2),height=>200,width=>200), "\( \left\{ \begin{array}{rcl} y & \le & x + $c \cr y & \ge & $c \end{array}\right. \)"); $mc2->extra("\( \left\{ \begin{array}{rcl} x & \le & y - $c \cr y & \ge & $c \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \le & x \cr y & \le & $c \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \le & x + $c \cr x & \ge & $c \end{array}\right. \)", "\( \left\{ \begin{array}{rcl} y & \le & - x - $c \cr y & \le & $c \end{array}\right. \)"); $mc2->makeLast('None of the above'); BEGIN_TEXT For each graph, determine its system of linear inequalities. $BR 1. \{ $mc2->print_q() \} \{ $mc2->print_a() \} END_TEXT ANS(radio_cmp($mc2->correct_ans)); BEGIN_TEXT 2. \{ $mc1->print_q() \} \{ $mc1->print_a() \} END_TEXT ANS(radio_cmp($mc1->correct_ans)); ENDDOCUMENT(); # This should be the last executable line in the problem. |