## Forum archive 2000-2006

### Michael Gage - more complicated drawing example ### Michael Gage - more complicated drawing example

by Arnold Pizer -
Number of replies: 0 more complicated drawing example topic started 3/24/2003; 8:15:03 PMlast post 3/24/2003; 8:15:03 PM Michael Gage - more complicated drawing example 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
 For each graph, determine its system of linear inequalities. 1. A. B. C. D. E. F. None of the above 2. A. B. C. D. E. F. None of the above

WARNINGS
µ¦å{h­
##DESCRIPTION##KEYWORDS('')####ENDDESCRIPTIONDOCUMENT();        # This should be the first executable line in the problem.loadMacros("PG.pl","PGbasicmacros.pl","PGchoicemacros.pl","PGanswermacros.pl","PGgraphmacros.pl");TEXT(beginproblem());$showPartialCorrectAnswers = 1;$a = random(2,5,1);$b = random(2,5,1);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 \crx & \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 \crx & \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 \cry & \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 \cry & \le & c \end{array}\right.$$");$mc2->makeLast('None of the above');BEGIN_TEXTFor each graph, determine its system of linear inequalities. $BR1.\{$mc2->print_q() \}\{ $mc2->print_a() \}END_TEXTANS(radio_cmp($mc2->correct_ans));BEGIN_TEXT2.\{ $mc1->print_q() \}\{$mc1->print_a() \}END_TEXTANS(radio_cmp(\$mc1->correct_ans));ENDDOCUMENT();       # This should be the last executable line in the problem.

<| Post or View Comments |>