Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 5 commits
  • 39 files changed
  • 0 comments
  • 3 contributors

Showing 39 changed files with 4,137 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  shared/question.tex
  2. +19 0 shared/replacements/short-cuts/g-2d.sty
  3. +1 0  shared/replacements/tufte-tweaks/tufte-exam.cls
  4. +177 0 vault/1-h84-ff8ai/figure.bc
  5. +23 0 vault/1-h84-ff8ai/figure.gnuplot
  6. +143 0 vault/1-h84-ff8ai/question.tex
  7. +177 0 vault/1-h84-ff8xn/figure.bc
  8. +23 0 vault/1-h84-ff8xn/figure.gnuplot
  9. +143 0 vault/1-h84-ff8xn/question.tex
  10. +177 0 vault/1-h84-ff9ij/figure.bc
  11. +23 0 vault/1-h84-ff9ij/figure.gnuplot
  12. +143 0 vault/1-h84-ff9ij/question.tex
  13. +177 0 vault/1-h84-ffa50/figure.bc
  14. +23 0 vault/1-h84-ffa50/figure.gnuplot
  15. +143 0 vault/1-h84-ffa50/question.tex
  16. +177 0 vault/1-h84-ffapr/figure.bc
  17. +23 0 vault/1-h84-ffapr/figure.gnuplot
  18. +143 0 vault/1-h84-ffapr/question.tex
  19. +177 0 vault/1-h84-ffbbk/figure.bc
  20. +23 0 vault/1-h84-ffbbk/figure.gnuplot
  21. +143 0 vault/1-h84-ffbbk/question.tex
  22. +177 0 vault/1-h84-ffjxt/figure.bc
  23. +23 0 vault/1-h84-ffjxt/figure.gnuplot
  24. +143 0 vault/1-h84-ffjxt/question.tex
  25. +177 0 vault/1-h84-ffkj1/figure.bc
  26. +23 0 vault/1-h84-ffkj1/figure.gnuplot
  27. +143 0 vault/1-h84-ffkj1/question.tex
  28. +177 0 vault/1-h84-ffl4h/figure.bc
  29. +23 0 vault/1-h84-ffl4h/figure.gnuplot
  30. +143 0 vault/1-h84-ffl4h/question.tex
  31. +177 0 vault/1-h84-fflph/figure.bc
  32. +23 0 vault/1-h84-fflph/figure.gnuplot
  33. +143 0 vault/1-h84-fflph/question.tex
  34. +177 0 vault/1-h84-ffmaq/figure.bc
  35. +23 0 vault/1-h84-ffmaq/figure.gnuplot
  36. +143 0 vault/1-h84-ffmaq/question.tex
  37. +177 0 vault/1-h84-ffmw5/figure.bc
  38. +23 0 vault/1-h84-ffmw5/figure.gnuplot
  39. +143 0 vault/1-h84-ffmw5/question.tex
1  shared/question.tex
@@ -82,6 +82,7 @@
82 82 \renewcommand{\vbeight}{}
83 83 \renewcommand{\vbnine}{}
84 84 \renewcommand{\vbten}{}
  85 + }
85 86 }
86 87 }
87 88
19 shared/replacements/short-cuts/g-2d.sty
... ... @@ -0,0 +1,19 @@
  1 +
  2 +\NeedsTeXFormat{LaTeX2e}[1994/06/01]
  3 +\ProvidesPackage{g-2d}[2011/09/01 Commands internal to gradians.com for 2D coordinate geometry]
  4 +
  5 +\newcommand{\eSlope}[2] {
  6 + \dfrac{y_{#2} - y_{#1}}{x_{#2} - x_{#1}}
  7 +}
  8 +
  9 +\newcommand{\fSlope}[2] {
  10 + m_{#1} = \eSlope{#1}{#2}
  11 +}
  12 +
  13 +\newcommand{\eAngleOfIntersection}[2] {
  14 + \dfrac{m_{#1} - m_{#2}}{1 + m_{#1}\cdot m_{#2}}
  15 +}
  16 +
  17 +\newcommand{\fAngleOfIntersection}[2] {
  18 + \tan\theta_{#1} = \eAngleOfIntersection{#1}{#2}
  19 +}
1  shared/replacements/tufte-tweaks/tufte-exam.cls
@@ -28,6 +28,7 @@
28 28 \RequirePackage{g-trig}
29 29 \RequirePackage{g-seq}
30 30 \RequirePackage{g-calculator}
  31 +\RequirePackage{g-2d}
31 32 \RequirePackage{etoolbox}
32 33
33 34 \providecommand{\ud}{\, \mathrm{d}}
177 vault/1-h84-ff8ai/figure.bc
... ... @@ -0,0 +1,177 @@
  1 +
  2 +/*
  3 + Write methods for calculating f(x) below.
  4 + Note that you can plot more than curve on the same figure.
  5 +
  6 + See methods 'draw_plots' and 'draw_curve'
  7 +*/
  8 +
  9 +define p_1(x) {
  10 + return (x^2)
  11 +}
  12 +
  13 +define p_2(x) {
  14 + return (2*x+3)
  15 +}
  16 +
  17 +/* ****************************************************************************
  18 + User editable variables that will impact what the plot looks like.
  19 + Example:
  20 + 1. To change the x-range over which the plot is generated, change
  21 + the xstart and xstop variables
  22 + 2. To change the # of plot points, change 'n'
  23 +
  24 +*******************************************************************************/
  25 +
  26 +pi = 4*a(1) /* define pi */
  27 +xstart = -1.75 /* Lower bound of the interval */
  28 +xstop = 3.5 /* Upper bound of the interval */
  29 +n = 30 /* Number of points to be computed */
  30 +deltax = (xstop-xstart)/(n-1)
  31 +xdim = 80 /* Horizontal dimension of the figure in mm */
  32 +ydim = 100 /* Vertical dimension of the figure in mm */
  33 +precision = 1 /* Number of significant digits printed (>= 0)*/
  34 +trueorig = 1 /* Equals 1 if the true origin must be used, 0 otherwise. */
  35 +label_axes = 0 /* if 0, then value labels will NOT be placed on axes */
  36 +
  37 +ymin = p_1(xstart);
  38 +ymax = ymin; /* Change this to force extension of the y-axis */
  39 +xscale = 0 ;
  40 +yscale = 0 ;
  41 +
  42 +/* ****************************************************************************
  43 + Useful utility functions. Ordinarily, there should be no need to
  44 + edit them
  45 +*******************************************************************************/
  46 +
  47 +define void set_scaling_factors() {
  48 + for (i = 0; i < n; i++){
  49 + x = xstart + i*deltax
  50 + y = p_1(x)
  51 + if (y<ymin) ymin = y
  52 + if (y>ymax) ymax = y
  53 + }
  54 + xscale = xdim/(xstop-xstart)
  55 + yscale = ydim/(ymax-ymin)
  56 +}
  57 +
  58 +define format(n,x){
  59 + auto y
  60 + scale = n
  61 + y = x/1
  62 + scale = 20
  63 + return (y)
  64 +}
  65 +
  66 +define round(n,x){
  67 + auto y, z
  68 + z = 10^(n+1)
  69 + d = 5
  70 + if (x<0) d = -d
  71 + y=z*x+d
  72 + scale=n
  73 + y=y/z
  74 + scale=20
  75 + return(y)
  76 +}
  77 +
  78 +define void write_graph_legend( legend ) {
  79 + print "\\def\\GraphLegend{$", legend, "$}\n"
  80 +}
  81 +
  82 +define void initialize() {
  83 + print "% 1. Definition of characteristic points\n"
  84 + print "\\figinit{pt}\n"
  85 +
  86 + if ( trueorig == 1 ) {
  87 + print "\\def\\Xmin{", format(5,xstart*xscale), "}\n"
  88 + print "\\def\\Ymin{", format(5,ymin*yscale), "}\n"
  89 + print "\\def\\Xmax{", format(5,xstop*xscale), "}\n"
  90 + print "\\def\\Ymax{", format(5,ymax*yscale), "}\n"
  91 + print "\\def\\Xori{", format(5,-xstart*xscale), "}\n"
  92 + print "\\def\\Yori{", format(5,-ymin*yscale), "}\n"
  93 + } else {
  94 + print "\\def\\Xmin{0}\n"
  95 + print "\\def\\Ymin{0}\n"
  96 + print "\\def\\Xmax{", xdim, "}\n"
  97 + print "\\def\\Ymax{", ydim, "}\n"
  98 + print "\\def\\Xori{0}\n"
  99 + print "\\def\\Yori{0}\n"
  100 + }
  101 + print "\\figpt0:(\\Xori,\\Yori)\n"
  102 +}
  103 +
  104 +define void draw_axes() {
  105 + print "% 2. Creation of the graphical file\n"
  106 + print "\\figdrawbegin{}\n"
  107 + print "\\def\\Xmaxx{\\Xmax} % To customize the position\n"
  108 + print "\\def\\Ymaxx{\\Ymax} % of the arrow-heads of the axes.\n"
  109 + print "\\figset arrowhead(length=4, fillmode=yes) % styling the arrowheads\n"
  110 + print "\\figdrawaxes 0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  111 +}
  112 +
  113 +define void draw_curve(values[]) {
  114 + print "\\figdrawlineC(\n"
  115 +
  116 + for (j = 0 ; j < n ; j++) {
  117 + y = values[j]
  118 + x = xstart + j*deltax
  119 +
  120 + if (j != (n - 1)) {
  121 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), ",\n"
  122 + } else {
  123 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), "\n"
  124 + print ")\n"
  125 + }
  126 + }
  127 +}
  128 +
  129 +define void draw_plots() {
  130 + g = a[n]
  131 + h = b[n]
  132 +
  133 + for ( j = 0 ; j < n ; j++ ) {
  134 + x = xstart + j*deltax
  135 + g[j] = p_2(x)
  136 + h[j] = p_1(x)
  137 + }
  138 +
  139 + draw_curve(g[])
  140 + draw_curve(h[])
  141 + print "\\figdrawend\n"
  142 +}
  143 +
  144 +define void label_drawing() {
  145 + print "% 3. Writing text on the figure\n"
  146 + print "\\figvisu{\\figBoxA}{}{%\n"
  147 + print "\\figptsaxes 1:0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  148 + print "% Points 1 and 2 are the end points of the arrows\n"
  149 + print "\\figwritee 1:(5pt) \\figwriten 2:(5pt)\n"
  150 + print "\\figptsaxes 1:0(\\Xmin, \\Xmax, \\Ymin, \\Ymax)\n"
  151 +
  152 + if (label_axes == 1) {
  153 + print "% Points 1 and 2 are the first two end points of the axes\n"
  154 + print "\\figwrites 1:$",round(precision,xstop),"$(5pt) \\figwritew 2:$",round(precision,ymax),"$(8pt)\n"
  155 + print "% Points 3 and 4 are the two other end points of the axes\n"
  156 + print "\\figpttraC 3:=0/\\Xmin,0/ \\figwrites 3:$",round(precision,xstart),"$(5pt) \n"
  157 + print "\\figpttraC 4:=0/0,\\Ymin/ \\figwritew 4:$",round(precision,ymin),"$(8pt)\n"
  158 + }
  159 +
  160 + print "}\n"
  161 + print "\\centerline{\\box\\figBoxA}\n"
  162 +}
  163 +
  164 +/* ****************************************************************************
  165 + Call the above utility functions now to generate the TeX file.
  166 + The code below should also not change ordinarily. Only the internals
  167 + of some of the functions below would need to change
  168 + *****************************************************************************/
  169 +
  170 + set_scaling_factors()
  171 + initialize()
  172 + /*write_graph_legend("y=x^2")*/
  173 + draw_axes()
  174 + draw_plots()
  175 + label_drawing()
  176 + quit
  177 +
23 vault/1-h84-ff8ai/figure.gnuplot
... ... @@ -0,0 +1,23 @@
  1 +# Empty shell file placed for you by the 'examiner' script in the
  2 +# newly created folder.
  3 +
  4 +# If you are going to generate any tables for plots using 'gnuplot',
  5 +# then write the code for those tables here only. 'Gnuplot' can
  6 +# generate multiple tables from the same .gnuplot file.
  7 +
  8 +# The next 2 points are HUGELY important.
  9 +# 1. Do NOT use the .gnuplot file of one question in another question.
  10 +# Make a separate copy instead. Otherwise, any change in the original
  11 +# .gnuplot file will result in a changed plot in the new question
  12 +# 2. Give distinctive names to tables in a .gnuplot file so that there
  13 +# is ZERO chance that a table generated from one .gnuplot (of one question)
  14 +# could have the same name as another table generated by some other
  15 +# .gnuplot. Distinctive table names are essential when stitching multiple
  16 +# questions together to form a quiz. Any confusion then could lead to
  17 +# a factually incorrect quiz.
  18 +#
  19 +# 2B. I would recommend that you name tables using the following scheme:
  20 +# <folder_name>_<some counter>. For example, if your question is in
  21 +# folder 'maths/145_9' and it needs 3 plots ( and hence 3 tables ),
  22 +# then names like 'm145_9_1', 'm145_9_2' and 'm145_9_3' should be
  23 +# quite safe to use
143 vault/1-h84-ff8ai/question.tex
... ... @@ -0,0 +1,143 @@
  1 +% This is an empty shell file placed for you by the 'examiner' script.
  2 +% You can now fill in the TeX for your question here.
  3 +
  4 +% Now, down to brasstacks. ** Writing good solutions is an Art **.
  5 +% Eventually, you will find your own style. But here are some thoughts
  6 +% to get you started:
  7 +%
  8 +% 1. Write to be understood - but be crisp. Your own solution should not take
  9 +% more space than you will give to the student. Hence, if you take more than
  10 +% a half-page to write a solution, then give the student a full-page and so on...
  11 +%
  12 +% 2. Use margin-notes to "talk" to students about the critical insights
  13 +% in the question. The tone can be - in fact, should be - informal
  14 +%
  15 +% 3. Don't shy away from creating margin-figures you think will help
  16 +% students understand. Yes, it is a little more work per question.
  17 +% But the question & solution will be written only once. Make that
  18 +% attempt at writing a solution count.
  19 +%
  20 +% 3b. Use bc_to_fig.tex. Its an easier way to generate plots & graphs
  21 +%
  22 +% 4. Ensure that there are *no spelling mistakes anywhere*. We are an
  23 +% education company. Bad spellings suggest that we ourselves
  24 +% don't have any education. Also, use American spellings by default
  25 +%
  26 +% 5. If a question has multiple parts, then first delete lines 40-41
  27 +% 6. If a question does not have parts, then first delete lines 43-69
  28 +%
  29 +% 7. Create versions of the question when possible. Use commands defined in
  30 +% tufte-tweaks.sty to do so. Its easier than you think
  31 +
  32 +% \noprintanswers
  33 +% \setcounter{rolldice}{0}
  34 +
  35 +\ifnumequal{\value{rolldice}}{0}{
  36 + % variables
  37 + \renewcommand{\vbone}{}
  38 + \renewcommand{\vbtwo}{}
  39 + \renewcommand{\vbthree}{}
  40 + \renewcommand{\vbfour}{}
  41 + \renewcommand{\vbfive}{}
  42 + \renewcommand{\vbsix}{}
  43 + \renewcommand{\vbseven}{}
  44 + \renewcommand{\vbeight}{}
  45 + \renewcommand{\vbnine}{}
  46 + \renewcommand{\vbten}{}
  47 +}{
  48 + \ifnumequal{\value{rolldice}}{1}{
  49 + % variables
  50 + \renewcommand{\vbone}{}
  51 + \renewcommand{\vbtwo}{}
  52 + \renewcommand{\vbthree}{}
  53 + \renewcommand{\vbfour}{}
  54 + \renewcommand{\vbfive}{}
  55 + \renewcommand{\vbsix}{}
  56 + \renewcommand{\vbseven}{}
  57 + \renewcommand{\vbeight}{}
  58 + \renewcommand{\vbnine}{}
  59 + \renewcommand{\vbten}{}
  60 + }{
  61 + \ifnumequal{\value{rolldice}}{2}{
  62 + % variables
  63 + \renewcommand{\vbone}{}
  64 + \renewcommand{\vbtwo}{}
  65 + \renewcommand{\vbthree}{}
  66 + \renewcommand{\vbfour}{}
  67 + \renewcommand{\vbfive}{}
  68 + \renewcommand{\vbsix}{}
  69 + \renewcommand{\vbseven}{}
  70 + \renewcommand{\vbeight}{}
  71 + \renewcommand{\vbnine}{}
  72 + \renewcommand{\vbten}{}
  73 + }{
  74 + % variables
  75 + \renewcommand{\vbone}{}
  76 + \renewcommand{\vbtwo}{}
  77 + \renewcommand{\vbthree}{}
  78 + \renewcommand{\vbfour}{}
  79 + \renewcommand{\vbfive}{}
  80 + \renewcommand{\vbsix}{}
  81 + \renewcommand{\vbseven}{}
  82 + \renewcommand{\vbeight}{}
  83 + \renewcommand{\vbnine}{}
  84 + \renewcommand{\vbten}{}
  85 + }
  86 +}
  87 +
  88 +\question
  89 +
  90 +\insertQR{}
  91 +
  92 +\watchout
  93 +
  94 +\ifprintanswers
  95 + % stuff to be shown only in the answer key - like explanatory margin figures
  96 + \begin{marginfigure}
  97 + \figinit{pt}
  98 + \figpt 100:(0,0)
  99 + \figpt 101:(0,0)
  100 + \figdrawbegin{}
  101 + \figdrawline [100,101]
  102 + \figdrawend
  103 + \figvisu{\figBoxA}{}{%
  104 + }
  105 + \centerline{\box\figBoxA}
  106 + \end{marginfigure}
  107 +\fi
  108 +
  109 +\begin{solution}
  110 +\end{solution}
  111 +
  112 +\begin{parts}
  113 + \part
  114 +
  115 + \insertQR{}
  116 + \begin{solution}
  117 + \end{solution}
  118 +
  119 + \part
  120 +
  121 + \insertQR{}
  122 + \begin{solution}
  123 + \end{solution}
  124 +
  125 + \part
  126 +
  127 + \insertQR{}
  128 + \begin{solution}
  129 + \end{solution}
  130 +
  131 + \part
  132 +
  133 + \insertQR{}
  134 + \begin{solution}
  135 + \end{solution}
  136 +
  137 + \part
  138 +
  139 + \insertQR{}
  140 + \begin{solution}
  141 + \end{solution}
  142 +
  143 +\end{parts}
177 vault/1-h84-ff8xn/figure.bc
... ... @@ -0,0 +1,177 @@
  1 +
  2 +/*
  3 + Write methods for calculating f(x) below.
  4 + Note that you can plot more than curve on the same figure.
  5 +
  6 + See methods 'draw_plots' and 'draw_curve'
  7 +*/
  8 +
  9 +define p_1(x) {
  10 + return (x^2)
  11 +}
  12 +
  13 +define p_2(x) {
  14 + return (2*x+3)
  15 +}
  16 +
  17 +/* ****************************************************************************
  18 + User editable variables that will impact what the plot looks like.
  19 + Example:
  20 + 1. To change the x-range over which the plot is generated, change
  21 + the xstart and xstop variables
  22 + 2. To change the # of plot points, change 'n'
  23 +
  24 +*******************************************************************************/
  25 +
  26 +pi = 4*a(1) /* define pi */
  27 +xstart = -1.75 /* Lower bound of the interval */
  28 +xstop = 3.5 /* Upper bound of the interval */
  29 +n = 30 /* Number of points to be computed */
  30 +deltax = (xstop-xstart)/(n-1)
  31 +xdim = 80 /* Horizontal dimension of the figure in mm */
  32 +ydim = 100 /* Vertical dimension of the figure in mm */
  33 +precision = 1 /* Number of significant digits printed (>= 0)*/
  34 +trueorig = 1 /* Equals 1 if the true origin must be used, 0 otherwise. */
  35 +label_axes = 0 /* if 0, then value labels will NOT be placed on axes */
  36 +
  37 +ymin = p_1(xstart);
  38 +ymax = ymin; /* Change this to force extension of the y-axis */
  39 +xscale = 0 ;
  40 +yscale = 0 ;
  41 +
  42 +/* ****************************************************************************
  43 + Useful utility functions. Ordinarily, there should be no need to
  44 + edit them
  45 +*******************************************************************************/
  46 +
  47 +define void set_scaling_factors() {
  48 + for (i = 0; i < n; i++){
  49 + x = xstart + i*deltax
  50 + y = p_1(x)
  51 + if (y<ymin) ymin = y
  52 + if (y>ymax) ymax = y
  53 + }
  54 + xscale = xdim/(xstop-xstart)
  55 + yscale = ydim/(ymax-ymin)
  56 +}
  57 +
  58 +define format(n,x){
  59 + auto y
  60 + scale = n
  61 + y = x/1
  62 + scale = 20
  63 + return (y)
  64 +}
  65 +
  66 +define round(n,x){
  67 + auto y, z
  68 + z = 10^(n+1)
  69 + d = 5
  70 + if (x<0) d = -d
  71 + y=z*x+d
  72 + scale=n
  73 + y=y/z
  74 + scale=20
  75 + return(y)
  76 +}
  77 +
  78 +define void write_graph_legend( legend ) {
  79 + print "\\def\\GraphLegend{$", legend, "$}\n"
  80 +}
  81 +
  82 +define void initialize() {
  83 + print "% 1. Definition of characteristic points\n"
  84 + print "\\figinit{pt}\n"
  85 +
  86 + if ( trueorig == 1 ) {
  87 + print "\\def\\Xmin{", format(5,xstart*xscale), "}\n"
  88 + print "\\def\\Ymin{", format(5,ymin*yscale), "}\n"
  89 + print "\\def\\Xmax{", format(5,xstop*xscale), "}\n"
  90 + print "\\def\\Ymax{", format(5,ymax*yscale), "}\n"
  91 + print "\\def\\Xori{", format(5,-xstart*xscale), "}\n"
  92 + print "\\def\\Yori{", format(5,-ymin*yscale), "}\n"
  93 + } else {
  94 + print "\\def\\Xmin{0}\n"
  95 + print "\\def\\Ymin{0}\n"
  96 + print "\\def\\Xmax{", xdim, "}\n"
  97 + print "\\def\\Ymax{", ydim, "}\n"
  98 + print "\\def\\Xori{0}\n"
  99 + print "\\def\\Yori{0}\n"
  100 + }
  101 + print "\\figpt0:(\\Xori,\\Yori)\n"
  102 +}
  103 +
  104 +define void draw_axes() {
  105 + print "% 2. Creation of the graphical file\n"
  106 + print "\\figdrawbegin{}\n"
  107 + print "\\def\\Xmaxx{\\Xmax} % To customize the position\n"
  108 + print "\\def\\Ymaxx{\\Ymax} % of the arrow-heads of the axes.\n"
  109 + print "\\figset arrowhead(length=4, fillmode=yes) % styling the arrowheads\n"
  110 + print "\\figdrawaxes 0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  111 +}
  112 +
  113 +define void draw_curve(values[]) {
  114 + print "\\figdrawlineC(\n"
  115 +
  116 + for (j = 0 ; j < n ; j++) {
  117 + y = values[j]
  118 + x = xstart + j*deltax
  119 +
  120 + if (j != (n - 1)) {
  121 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), ",\n"
  122 + } else {
  123 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), "\n"
  124 + print ")\n"
  125 + }
  126 + }
  127 +}
  128 +
  129 +define void draw_plots() {
  130 + g = a[n]
  131 + h = b[n]
  132 +
  133 + for ( j = 0 ; j < n ; j++ ) {
  134 + x = xstart + j*deltax
  135 + g[j] = p_2(x)
  136 + h[j] = p_1(x)
  137 + }
  138 +
  139 + draw_curve(g[])
  140 + draw_curve(h[])
  141 + print "\\figdrawend\n"
  142 +}
  143 +
  144 +define void label_drawing() {
  145 + print "% 3. Writing text on the figure\n"
  146 + print "\\figvisu{\\figBoxA}{}{%\n"
  147 + print "\\figptsaxes 1:0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  148 + print "% Points 1 and 2 are the end points of the arrows\n"
  149 + print "\\figwritee 1:(5pt) \\figwriten 2:(5pt)\n"
  150 + print "\\figptsaxes 1:0(\\Xmin, \\Xmax, \\Ymin, \\Ymax)\n"
  151 +
  152 + if (label_axes == 1) {
  153 + print "% Points 1 and 2 are the first two end points of the axes\n"
  154 + print "\\figwrites 1:$",round(precision,xstop),"$(5pt) \\figwritew 2:$",round(precision,ymax),"$(8pt)\n"
  155 + print "% Points 3 and 4 are the two other end points of the axes\n"
  156 + print "\\figpttraC 3:=0/\\Xmin,0/ \\figwrites 3:$",round(precision,xstart),"$(5pt) \n"
  157 + print "\\figpttraC 4:=0/0,\\Ymin/ \\figwritew 4:$",round(precision,ymin),"$(8pt)\n"
  158 + }
  159 +
  160 + print "}\n"
  161 + print "\\centerline{\\box\\figBoxA}\n"
  162 +}
  163 +
  164 +/* ****************************************************************************
  165 + Call the above utility functions now to generate the TeX file.
  166 + The code below should also not change ordinarily. Only the internals
  167 + of some of the functions below would need to change
  168 + *****************************************************************************/
  169 +
  170 + set_scaling_factors()
  171 + initialize()
  172 + /*write_graph_legend("y=x^2")*/
  173 + draw_axes()
  174 + draw_plots()
  175 + label_drawing()
  176 + quit
  177 +
23 vault/1-h84-ff8xn/figure.gnuplot
... ... @@ -0,0 +1,23 @@
  1 +# Empty shell file placed for you by the 'examiner' script in the
  2 +# newly created folder.
  3 +
  4 +# If you are going to generate any tables for plots using 'gnuplot',
  5 +# then write the code for those tables here only. 'Gnuplot' can
  6 +# generate multiple tables from the same .gnuplot file.
  7 +
  8 +# The next 2 points are HUGELY important.
  9 +# 1. Do NOT use the .gnuplot file of one question in another question.
  10 +# Make a separate copy instead. Otherwise, any change in the original
  11 +# .gnuplot file will result in a changed plot in the new question
  12 +# 2. Give distinctive names to tables in a .gnuplot file so that there
  13 +# is ZERO chance that a table generated from one .gnuplot (of one question)
  14 +# could have the same name as another table generated by some other
  15 +# .gnuplot. Distinctive table names are essential when stitching multiple
  16 +# questions together to form a quiz. Any confusion then could lead to
  17 +# a factually incorrect quiz.
  18 +#
  19 +# 2B. I would recommend that you name tables using the following scheme:
  20 +# <folder_name>_<some counter>. For example, if your question is in
  21 +# folder 'maths/145_9' and it needs 3 plots ( and hence 3 tables ),
  22 +# then names like 'm145_9_1', 'm145_9_2' and 'm145_9_3' should be
  23 +# quite safe to use
143 vault/1-h84-ff8xn/question.tex
... ... @@ -0,0 +1,143 @@
  1 +% This is an empty shell file placed for you by the 'examiner' script.
  2 +% You can now fill in the TeX for your question here.
  3 +
  4 +% Now, down to brasstacks. ** Writing good solutions is an Art **.
  5 +% Eventually, you will find your own style. But here are some thoughts
  6 +% to get you started:
  7 +%
  8 +% 1. Write to be understood - but be crisp. Your own solution should not take
  9 +% more space than you will give to the student. Hence, if you take more than
  10 +% a half-page to write a solution, then give the student a full-page and so on...
  11 +%
  12 +% 2. Use margin-notes to "talk" to students about the critical insights
  13 +% in the question. The tone can be - in fact, should be - informal
  14 +%
  15 +% 3. Don't shy away from creating margin-figures you think will help
  16 +% students understand. Yes, it is a little more work per question.
  17 +% But the question & solution will be written only once. Make that
  18 +% attempt at writing a solution count.
  19 +%
  20 +% 3b. Use bc_to_fig.tex. Its an easier way to generate plots & graphs
  21 +%
  22 +% 4. Ensure that there are *no spelling mistakes anywhere*. We are an
  23 +% education company. Bad spellings suggest that we ourselves
  24 +% don't have any education. Also, use American spellings by default
  25 +%
  26 +% 5. If a question has multiple parts, then first delete lines 40-41
  27 +% 6. If a question does not have parts, then first delete lines 43-69
  28 +%
  29 +% 7. Create versions of the question when possible. Use commands defined in
  30 +% tufte-tweaks.sty to do so. Its easier than you think
  31 +
  32 +% \noprintanswers
  33 +% \setcounter{rolldice}{0}
  34 +
  35 +\ifnumequal{\value{rolldice}}{0}{
  36 + % variables
  37 + \renewcommand{\vbone}{}
  38 + \renewcommand{\vbtwo}{}
  39 + \renewcommand{\vbthree}{}
  40 + \renewcommand{\vbfour}{}
  41 + \renewcommand{\vbfive}{}
  42 + \renewcommand{\vbsix}{}
  43 + \renewcommand{\vbseven}{}
  44 + \renewcommand{\vbeight}{}
  45 + \renewcommand{\vbnine}{}
  46 + \renewcommand{\vbten}{}
  47 +}{
  48 + \ifnumequal{\value{rolldice}}{1}{
  49 + % variables
  50 + \renewcommand{\vbone}{}
  51 + \renewcommand{\vbtwo}{}
  52 + \renewcommand{\vbthree}{}
  53 + \renewcommand{\vbfour}{}
  54 + \renewcommand{\vbfive}{}
  55 + \renewcommand{\vbsix}{}
  56 + \renewcommand{\vbseven}{}
  57 + \renewcommand{\vbeight}{}
  58 + \renewcommand{\vbnine}{}
  59 + \renewcommand{\vbten}{}
  60 + }{
  61 + \ifnumequal{\value{rolldice}}{2}{
  62 + % variables
  63 + \renewcommand{\vbone}{}
  64 + \renewcommand{\vbtwo}{}
  65 + \renewcommand{\vbthree}{}
  66 + \renewcommand{\vbfour}{}
  67 + \renewcommand{\vbfive}{}
  68 + \renewcommand{\vbsix}{}
  69 + \renewcommand{\vbseven}{}
  70 + \renewcommand{\vbeight}{}
  71 + \renewcommand{\vbnine}{}
  72 + \renewcommand{\vbten}{}
  73 + }{
  74 + % variables
  75 + \renewcommand{\vbone}{}
  76 + \renewcommand{\vbtwo}{}
  77 + \renewcommand{\vbthree}{}
  78 + \renewcommand{\vbfour}{}
  79 + \renewcommand{\vbfive}{}
  80 + \renewcommand{\vbsix}{}
  81 + \renewcommand{\vbseven}{}
  82 + \renewcommand{\vbeight}{}
  83 + \renewcommand{\vbnine}{}
  84 + \renewcommand{\vbten}{}
  85 + }
  86 +}
  87 +
  88 +\question
  89 +
  90 +\insertQR{}
  91 +
  92 +\watchout
  93 +
  94 +\ifprintanswers
  95 + % stuff to be shown only in the answer key - like explanatory margin figures
  96 + \begin{marginfigure}
  97 + \figinit{pt}
  98 + \figpt 100:(0,0)
  99 + \figpt 101:(0,0)
  100 + \figdrawbegin{}
  101 + \figdrawline [100,101]
  102 + \figdrawend
  103 + \figvisu{\figBoxA}{}{%
  104 + }
  105 + \centerline{\box\figBoxA}
  106 + \end{marginfigure}
  107 +\fi
  108 +
  109 +\begin{solution}
  110 +\end{solution}
  111 +
  112 +\begin{parts}
  113 + \part
  114 +
  115 + \insertQR{}
  116 + \begin{solution}
  117 + \end{solution}
  118 +
  119 + \part
  120 +
  121 + \insertQR{}
  122 + \begin{solution}
  123 + \end{solution}
  124 +
  125 + \part
  126 +
  127 + \insertQR{}
  128 + \begin{solution}
  129 + \end{solution}
  130 +
  131 + \part
  132 +
  133 + \insertQR{}
  134 + \begin{solution}
  135 + \end{solution}
  136 +
  137 + \part
  138 +
  139 + \insertQR{}
  140 + \begin{solution}
  141 + \end{solution}
  142 +
  143 +\end{parts}
177 vault/1-h84-ff9ij/figure.bc
... ... @@ -0,0 +1,177 @@
  1 +
  2 +/*
  3 + Write methods for calculating f(x) below.
  4 + Note that you can plot more than curve on the same figure.
  5 +
  6 + See methods 'draw_plots' and 'draw_curve'
  7 +*/
  8 +
  9 +define p_1(x) {
  10 + return (x^2)
  11 +}
  12 +
  13 +define p_2(x) {
  14 + return (2*x+3)
  15 +}
  16 +
  17 +/* ****************************************************************************
  18 + User editable variables that will impact what the plot looks like.
  19 + Example:
  20 + 1. To change the x-range over which the plot is generated, change
  21 + the xstart and xstop variables
  22 + 2. To change the # of plot points, change 'n'
  23 +
  24 +*******************************************************************************/
  25 +
  26 +pi = 4*a(1) /* define pi */
  27 +xstart = -1.75 /* Lower bound of the interval */
  28 +xstop = 3.5 /* Upper bound of the interval */
  29 +n = 30 /* Number of points to be computed */
  30 +deltax = (xstop-xstart)/(n-1)
  31 +xdim = 80 /* Horizontal dimension of the figure in mm */
  32 +ydim = 100 /* Vertical dimension of the figure in mm */
  33 +precision = 1 /* Number of significant digits printed (>= 0)*/
  34 +trueorig = 1 /* Equals 1 if the true origin must be used, 0 otherwise. */
  35 +label_axes = 0 /* if 0, then value labels will NOT be placed on axes */
  36 +
  37 +ymin = p_1(xstart);
  38 +ymax = ymin; /* Change this to force extension of the y-axis */
  39 +xscale = 0 ;
  40 +yscale = 0 ;
  41 +
  42 +/* ****************************************************************************
  43 + Useful utility functions. Ordinarily, there should be no need to
  44 + edit them
  45 +*******************************************************************************/
  46 +
  47 +define void set_scaling_factors() {
  48 + for (i = 0; i < n; i++){
  49 + x = xstart + i*deltax
  50 + y = p_1(x)
  51 + if (y<ymin) ymin = y
  52 + if (y>ymax) ymax = y
  53 + }
  54 + xscale = xdim/(xstop-xstart)
  55 + yscale = ydim/(ymax-ymin)
  56 +}
  57 +
  58 +define format(n,x){
  59 + auto y
  60 + scale = n
  61 + y = x/1
  62 + scale = 20
  63 + return (y)
  64 +}
  65 +
  66 +define round(n,x){
  67 + auto y, z
  68 + z = 10^(n+1)
  69 + d = 5
  70 + if (x<0) d = -d
  71 + y=z*x+d
  72 + scale=n
  73 + y=y/z
  74 + scale=20
  75 + return(y)
  76 +}
  77 +
  78 +define void write_graph_legend( legend ) {
  79 + print "\\def\\GraphLegend{$", legend, "$}\n"
  80 +}
  81 +
  82 +define void initialize() {
  83 + print "% 1. Definition of characteristic points\n"
  84 + print "\\figinit{pt}\n"
  85 +
  86 + if ( trueorig == 1 ) {
  87 + print "\\def\\Xmin{", format(5,xstart*xscale), "}\n"
  88 + print "\\def\\Ymin{", format(5,ymin*yscale), "}\n"
  89 + print "\\def\\Xmax{", format(5,xstop*xscale), "}\n"
  90 + print "\\def\\Ymax{", format(5,ymax*yscale), "}\n"
  91 + print "\\def\\Xori{", format(5,-xstart*xscale), "}\n"
  92 + print "\\def\\Yori{", format(5,-ymin*yscale), "}\n"
  93 + } else {
  94 + print "\\def\\Xmin{0}\n"
  95 + print "\\def\\Ymin{0}\n"
  96 + print "\\def\\Xmax{", xdim, "}\n"
  97 + print "\\def\\Ymax{", ydim, "}\n"
  98 + print "\\def\\Xori{0}\n"
  99 + print "\\def\\Yori{0}\n"
  100 + }
  101 + print "\\figpt0:(\\Xori,\\Yori)\n"
  102 +}
  103 +
  104 +define void draw_axes() {
  105 + print "% 2. Creation of the graphical file\n"
  106 + print "\\figdrawbegin{}\n"
  107 + print "\\def\\Xmaxx{\\Xmax} % To customize the position\n"
  108 + print "\\def\\Ymaxx{\\Ymax} % of the arrow-heads of the axes.\n"
  109 + print "\\figset arrowhead(length=4, fillmode=yes) % styling the arrowheads\n"
  110 + print "\\figdrawaxes 0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  111 +}
  112 +
  113 +define void draw_curve(values[]) {
  114 + print "\\figdrawlineC(\n"
  115 +
  116 + for (j = 0 ; j < n ; j++) {
  117 + y = values[j]
  118 + x = xstart + j*deltax
  119 +
  120 + if (j != (n - 1)) {
  121 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), ",\n"
  122 + } else {
  123 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), "\n"
  124 + print ")\n"
  125 + }
  126 + }
  127 +}
  128 +
  129 +define void draw_plots() {
  130 + g = a[n]
  131 + h = b[n]
  132 +
  133 + for ( j = 0 ; j < n ; j++ ) {
  134 + x = xstart + j*deltax
  135 + g[j] = p_2(x)
  136 + h[j] = p_1(x)
  137 + }
  138 +
  139 + draw_curve(g[])
  140 + draw_curve(h[])
  141 + print "\\figdrawend\n"
  142 +}
  143 +
  144 +define void label_drawing() {
  145 + print "% 3. Writing text on the figure\n"
  146 + print "\\figvisu{\\figBoxA}{}{%\n"
  147 + print "\\figptsaxes 1:0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  148 + print "% Points 1 and 2 are the end points of the arrows\n"
  149 + print "\\figwritee 1:(5pt) \\figwriten 2:(5pt)\n"
  150 + print "\\figptsaxes 1:0(\\Xmin, \\Xmax, \\Ymin, \\Ymax)\n"
  151 +
  152 + if (label_axes == 1) {
  153 + print "% Points 1 and 2 are the first two end points of the axes\n"
  154 + print "\\figwrites 1:$",round(precision,xstop),"$(5pt) \\figwritew 2:$",round(precision,ymax),"$(8pt)\n"
  155 + print "% Points 3 and 4 are the two other end points of the axes\n"
  156 + print "\\figpttraC 3:=0/\\Xmin,0/ \\figwrites 3:$",round(precision,xstart),"$(5pt) \n"
  157 + print "\\figpttraC 4:=0/0,\\Ymin/ \\figwritew 4:$",round(precision,ymin),"$(8pt)\n"
  158 + }
  159 +
  160 + print "}\n"
  161 + print "\\centerline{\\box\\figBoxA}\n"
  162 +}
  163 +
  164 +/* ****************************************************************************
  165 + Call the above utility functions now to generate the TeX file.
  166 + The code below should also not change ordinarily. Only the internals
  167 + of some of the functions below would need to change
  168 + *****************************************************************************/
  169 +
  170 + set_scaling_factors()
  171 + initialize()
  172 + /*write_graph_legend("y=x^2")*/
  173 + draw_axes()
  174 + draw_plots()
  175 + label_drawing()
  176 + quit
  177 +
23 vault/1-h84-ff9ij/figure.gnuplot
... ... @@ -0,0 +1,23 @@
  1 +# Empty shell file placed for you by the 'examiner' script in the
  2 +# newly created folder.
  3 +
  4 +# If you are going to generate any tables for plots using 'gnuplot',
  5 +# then write the code for those tables here only. 'Gnuplot' can
  6 +# generate multiple tables from the same .gnuplot file.
  7 +
  8 +# The next 2 points are HUGELY important.
  9 +# 1. Do NOT use the .gnuplot file of one question in another question.
  10 +# Make a separate copy instead. Otherwise, any change in the original
  11 +# .gnuplot file will result in a changed plot in the new question
  12 +# 2. Give distinctive names to tables in a .gnuplot file so that there
  13 +# is ZERO chance that a table generated from one .gnuplot (of one question)
  14 +# could have the same name as another table generated by some other
  15 +# .gnuplot. Distinctive table names are essential when stitching multiple
  16 +# questions together to form a quiz. Any confusion then could lead to
  17 +# a factually incorrect quiz.
  18 +#
  19 +# 2B. I would recommend that you name tables using the following scheme:
  20 +# <folder_name>_<some counter>. For example, if your question is in
  21 +# folder 'maths/145_9' and it needs 3 plots ( and hence 3 tables ),
  22 +# then names like 'm145_9_1', 'm145_9_2' and 'm145_9_3' should be
  23 +# quite safe to use
143 vault/1-h84-ff9ij/question.tex
... ... @@ -0,0 +1,143 @@
  1 +% This is an empty shell file placed for you by the 'examiner' script.
  2 +% You can now fill in the TeX for your question here.
  3 +
  4 +% Now, down to brasstacks. ** Writing good solutions is an Art **.
  5 +% Eventually, you will find your own style. But here are some thoughts
  6 +% to get you started:
  7 +%
  8 +% 1. Write to be understood - but be crisp. Your own solution should not take
  9 +% more space than you will give to the student. Hence, if you take more than
  10 +% a half-page to write a solution, then give the student a full-page and so on...
  11 +%
  12 +% 2. Use margin-notes to "talk" to students about the critical insights
  13 +% in the question. The tone can be - in fact, should be - informal
  14 +%
  15 +% 3. Don't shy away from creating margin-figures you think will help
  16 +% students understand. Yes, it is a little more work per question.
  17 +% But the question & solution will be written only once. Make that
  18 +% attempt at writing a solution count.
  19 +%
  20 +% 3b. Use bc_to_fig.tex. Its an easier way to generate plots & graphs
  21 +%
  22 +% 4. Ensure that there are *no spelling mistakes anywhere*. We are an
  23 +% education company. Bad spellings suggest that we ourselves
  24 +% don't have any education. Also, use American spellings by default
  25 +%
  26 +% 5. If a question has multiple parts, then first delete lines 40-41
  27 +% 6. If a question does not have parts, then first delete lines 43-69
  28 +%
  29 +% 7. Create versions of the question when possible. Use commands defined in
  30 +% tufte-tweaks.sty to do so. Its easier than you think
  31 +
  32 +% \noprintanswers
  33 +% \setcounter{rolldice}{0}
  34 +
  35 +\ifnumequal{\value{rolldice}}{0}{
  36 + % variables
  37 + \renewcommand{\vbone}{}
  38 + \renewcommand{\vbtwo}{}
  39 + \renewcommand{\vbthree}{}
  40 + \renewcommand{\vbfour}{}
  41 + \renewcommand{\vbfive}{}
  42 + \renewcommand{\vbsix}{}
  43 + \renewcommand{\vbseven}{}
  44 + \renewcommand{\vbeight}{}
  45 + \renewcommand{\vbnine}{}
  46 + \renewcommand{\vbten}{}
  47 +}{
  48 + \ifnumequal{\value{rolldice}}{1}{
  49 + % variables
  50 + \renewcommand{\vbone}{}
  51 + \renewcommand{\vbtwo}{}
  52 + \renewcommand{\vbthree}{}
  53 + \renewcommand{\vbfour}{}
  54 + \renewcommand{\vbfive}{}
  55 + \renewcommand{\vbsix}{}
  56 + \renewcommand{\vbseven}{}
  57 + \renewcommand{\vbeight}{}
  58 + \renewcommand{\vbnine}{}
  59 + \renewcommand{\vbten}{}
  60 + }{
  61 + \ifnumequal{\value{rolldice}}{2}{
  62 + % variables
  63 + \renewcommand{\vbone}{}
  64 + \renewcommand{\vbtwo}{}
  65 + \renewcommand{\vbthree}{}
  66 + \renewcommand{\vbfour}{}
  67 + \renewcommand{\vbfive}{}
  68 + \renewcommand{\vbsix}{}
  69 + \renewcommand{\vbseven}{}
  70 + \renewcommand{\vbeight}{}
  71 + \renewcommand{\vbnine}{}
  72 + \renewcommand{\vbten}{}
  73 + }{
  74 + % variables
  75 + \renewcommand{\vbone}{}
  76 + \renewcommand{\vbtwo}{}
  77 + \renewcommand{\vbthree}{}
  78 + \renewcommand{\vbfour}{}
  79 + \renewcommand{\vbfive}{}
  80 + \renewcommand{\vbsix}{}
  81 + \renewcommand{\vbseven}{}
  82 + \renewcommand{\vbeight}{}
  83 + \renewcommand{\vbnine}{}
  84 + \renewcommand{\vbten}{}
  85 + }
  86 +}
  87 +
  88 +\question
  89 +
  90 +\insertQR{}
  91 +
  92 +\watchout
  93 +
  94 +\ifprintanswers
  95 + % stuff to be shown only in the answer key - like explanatory margin figures
  96 + \begin{marginfigure}
  97 + \figinit{pt}
  98 + \figpt 100:(0,0)
  99 + \figpt 101:(0,0)
  100 + \figdrawbegin{}
  101 + \figdrawline [100,101]
  102 + \figdrawend
  103 + \figvisu{\figBoxA}{}{%
  104 + }
  105 + \centerline{\box\figBoxA}
  106 + \end{marginfigure}
  107 +\fi
  108 +
  109 +\begin{solution}
  110 +\end{solution}
  111 +
  112 +\begin{parts}
  113 + \part
  114 +
  115 + \insertQR{}
  116 + \begin{solution}
  117 + \end{solution}
  118 +
  119 + \part
  120 +
  121 + \insertQR{}
  122 + \begin{solution}
  123 + \end{solution}
  124 +
  125 + \part
  126 +
  127 + \insertQR{}
  128 + \begin{solution}
  129 + \end{solution}
  130 +
  131 + \part
  132 +
  133 + \insertQR{}
  134 + \begin{solution}
  135 + \end{solution}
  136 +
  137 + \part
  138 +
  139 + \insertQR{}
  140 + \begin{solution}
  141 + \end{solution}
  142 +
  143 +\end{parts}
177 vault/1-h84-ffa50/figure.bc
... ... @@ -0,0 +1,177 @@
  1 +
  2 +/*
  3 + Write methods for calculating f(x) below.
  4 + Note that you can plot more than curve on the same figure.
  5 +
  6 + See methods 'draw_plots' and 'draw_curve'
  7 +*/
  8 +
  9 +define p_1(x) {
  10 + return (x^2)
  11 +}
  12 +
  13 +define p_2(x) {
  14 + return (2*x+3)
  15 +}
  16 +
  17 +/* ****************************************************************************
  18 + User editable variables that will impact what the plot looks like.
  19 + Example:
  20 + 1. To change the x-range over which the plot is generated, change
  21 + the xstart and xstop variables
  22 + 2. To change the # of plot points, change 'n'
  23 +
  24 +*******************************************************************************/
  25 +
  26 +pi = 4*a(1) /* define pi */
  27 +xstart = -1.75 /* Lower bound of the interval */
  28 +xstop = 3.5 /* Upper bound of the interval */
  29 +n = 30 /* Number of points to be computed */
  30 +deltax = (xstop-xstart)/(n-1)
  31 +xdim = 80 /* Horizontal dimension of the figure in mm */
  32 +ydim = 100 /* Vertical dimension of the figure in mm */
  33 +precision = 1 /* Number of significant digits printed (>= 0)*/
  34 +trueorig = 1 /* Equals 1 if the true origin must be used, 0 otherwise. */
  35 +label_axes = 0 /* if 0, then value labels will NOT be placed on axes */
  36 +
  37 +ymin = p_1(xstart);
  38 +ymax = ymin; /* Change this to force extension of the y-axis */
  39 +xscale = 0 ;
  40 +yscale = 0 ;
  41 +
  42 +/* ****************************************************************************
  43 + Useful utility functions. Ordinarily, there should be no need to
  44 + edit them
  45 +*******************************************************************************/
  46 +
  47 +define void set_scaling_factors() {
  48 + for (i = 0; i < n; i++){
  49 + x = xstart + i*deltax
  50 + y = p_1(x)
  51 + if (y<ymin) ymin = y
  52 + if (y>ymax) ymax = y
  53 + }
  54 + xscale = xdim/(xstop-xstart)
  55 + yscale = ydim/(ymax-ymin)
  56 +}
  57 +
  58 +define format(n,x){
  59 + auto y
  60 + scale = n
  61 + y = x/1
  62 + scale = 20
  63 + return (y)
  64 +}
  65 +
  66 +define round(n,x){
  67 + auto y, z
  68 + z = 10^(n+1)
  69 + d = 5
  70 + if (x<0) d = -d
  71 + y=z*x+d
  72 + scale=n
  73 + y=y/z
  74 + scale=20
  75 + return(y)
  76 +}
  77 +
  78 +define void write_graph_legend( legend ) {
  79 + print "\\def\\GraphLegend{$", legend, "$}\n"
  80 +}
  81 +
  82 +define void initialize() {
  83 + print "% 1. Definition of characteristic points\n"
  84 + print "\\figinit{pt}\n"
  85 +
  86 + if ( trueorig == 1 ) {
  87 + print "\\def\\Xmin{", format(5,xstart*xscale), "}\n"
  88 + print "\\def\\Ymin{", format(5,ymin*yscale), "}\n"
  89 + print "\\def\\Xmax{", format(5,xstop*xscale), "}\n"
  90 + print "\\def\\Ymax{", format(5,ymax*yscale), "}\n"
  91 + print "\\def\\Xori{", format(5,-xstart*xscale), "}\n"
  92 + print "\\def\\Yori{", format(5,-ymin*yscale), "}\n"
  93 + } else {
  94 + print "\\def\\Xmin{0}\n"
  95 + print "\\def\\Ymin{0}\n"
  96 + print "\\def\\Xmax{", xdim, "}\n"
  97 + print "\\def\\Ymax{", ydim, "}\n"
  98 + print "\\def\\Xori{0}\n"
  99 + print "\\def\\Yori{0}\n"
  100 + }
  101 + print "\\figpt0:(\\Xori,\\Yori)\n"
  102 +}
  103 +
  104 +define void draw_axes() {
  105 + print "% 2. Creation of the graphical file\n"
  106 + print "\\figdrawbegin{}\n"
  107 + print "\\def\\Xmaxx{\\Xmax} % To customize the position\n"
  108 + print "\\def\\Ymaxx{\\Ymax} % of the arrow-heads of the axes.\n"
  109 + print "\\figset arrowhead(length=4, fillmode=yes) % styling the arrowheads\n"
  110 + print "\\figdrawaxes 0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  111 +}
  112 +
  113 +define void draw_curve(values[]) {
  114 + print "\\figdrawlineC(\n"
  115 +
  116 + for (j = 0 ; j < n ; j++) {
  117 + y = values[j]
  118 + x = xstart + j*deltax
  119 +
  120 + if (j != (n - 1)) {
  121 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), ",\n"
  122 + } else {
  123 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), "\n"
  124 + print ")\n"
  125 + }
  126 + }
  127 +}
  128 +
  129 +define void draw_plots() {
  130 + g = a[n]
  131 + h = b[n]
  132 +
  133 + for ( j = 0 ; j < n ; j++ ) {
  134 + x = xstart + j*deltax
  135 + g[j] = p_2(x)
  136 + h[j] = p_1(x)
  137 + }
  138 +
  139 + draw_curve(g[])
  140 + draw_curve(h[])
  141 + print "\\figdrawend\n"
  142 +}
  143 +
  144 +define void label_drawing() {
  145 + print "% 3. Writing text on the figure\n"
  146 + print "\\figvisu{\\figBoxA}{}{%\n"
  147 + print "\\figptsaxes 1:0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  148 + print "% Points 1 and 2 are the end points of the arrows\n"
  149 + print "\\figwritee 1:(5pt) \\figwriten 2:(5pt)\n"
  150 + print "\\figptsaxes 1:0(\\Xmin, \\Xmax, \\Ymin, \\Ymax)\n"
  151 +
  152 + if (label_axes == 1) {
  153 + print "% Points 1 and 2 are the first two end points of the axes\n"
  154 + print "\\figwrites 1:$",round(precision,xstop),"$(5pt) \\figwritew 2:$",round(precision,ymax),"$(8pt)\n"
  155 + print "% Points 3 and 4 are the two other end points of the axes\n"
  156 + print "\\figpttraC 3:=0/\\Xmin,0/ \\figwrites 3:$",round(precision,xstart),"$(5pt) \n"
  157 + print "\\figpttraC 4:=0/0,\\Ymin/ \\figwritew 4:$",round(precision,ymin),"$(8pt)\n"
  158 + }
  159 +
  160 + print "}\n"
  161 + print "\\centerline{\\box\\figBoxA}\n"
  162 +}
  163 +
  164 +/* ****************************************************************************
  165 + Call the above utility functions now to generate the TeX file.
  166 + The code below should also not change ordinarily. Only the internals
  167 + of some of the functions below would need to change
  168 + *****************************************************************************/
  169 +
  170 + set_scaling_factors()
  171 + initialize()
  172 + /*write_graph_legend("y=x^2")*/
  173 + draw_axes()
  174 + draw_plots()
  175 + label_drawing()
  176 + quit
  177 +
23 vault/1-h84-ffa50/figure.gnuplot
... ... @@ -0,0 +1,23 @@
  1 +# Empty shell file placed for you by the 'examiner' script in the
  2 +# newly created folder.
  3 +
  4 +# If you are going to generate any tables for plots using 'gnuplot',
  5 +# then write the code for those tables here only. 'Gnuplot' can
  6 +# generate multiple tables from the same .gnuplot file.
  7 +
  8 +# The next 2 points are HUGELY important.
  9 +# 1. Do NOT use the .gnuplot file of one question in another question.
  10 +# Make a separate copy instead. Otherwise, any change in the original
  11 +# .gnuplot file will result in a changed plot in the new question
  12 +# 2. Give distinctive names to tables in a .gnuplot file so that there
  13 +# is ZERO chance that a table generated from one .gnuplot (of one question)
  14 +# could have the same name as another table generated by some other
  15 +# .gnuplot. Distinctive table names are essential when stitching multiple
  16 +# questions together to form a quiz. Any confusion then could lead to
  17 +# a factually incorrect quiz.
  18 +#
  19 +# 2B. I would recommend that you name tables using the following scheme:
  20 +# <folder_name>_<some counter>. For example, if your question is in
  21 +# folder 'maths/145_9' and it needs 3 plots ( and hence 3 tables ),
  22 +# then names like 'm145_9_1', 'm145_9_2' and 'm145_9_3' should be
  23 +# quite safe to use
143 vault/1-h84-ffa50/question.tex
... ... @@ -0,0 +1,143 @@
  1 +% This is an empty shell file placed for you by the 'examiner' script.
  2 +% You can now fill in the TeX for your question here.
  3 +
  4 +% Now, down to brasstacks. ** Writing good solutions is an Art **.
  5 +% Eventually, you will find your own style. But here are some thoughts
  6 +% to get you started:
  7 +%
  8 +% 1. Write to be understood - but be crisp. Your own solution should not take
  9 +% more space than you will give to the student. Hence, if you take more than
  10 +% a half-page to write a solution, then give the student a full-page and so on...
  11 +%
  12 +% 2. Use margin-notes to "talk" to students about the critical insights
  13 +% in the question. The tone can be - in fact, should be - informal
  14 +%
  15 +% 3. Don't shy away from creating margin-figures you think will help
  16 +% students understand. Yes, it is a little more work per question.
  17 +% But the question & solution will be written only once. Make that
  18 +% attempt at writing a solution count.
  19 +%
  20 +% 3b. Use bc_to_fig.tex. Its an easier way to generate plots & graphs
  21 +%
  22 +% 4. Ensure that there are *no spelling mistakes anywhere*. We are an
  23 +% education company. Bad spellings suggest that we ourselves
  24 +% don't have any education. Also, use American spellings by default
  25 +%
  26 +% 5. If a question has multiple parts, then first delete lines 40-41
  27 +% 6. If a question does not have parts, then first delete lines 43-69
  28 +%
  29 +% 7. Create versions of the question when possible. Use commands defined in
  30 +% tufte-tweaks.sty to do so. Its easier than you think
  31 +
  32 +% \noprintanswers
  33 +% \setcounter{rolldice}{0}
  34 +
  35 +\ifnumequal{\value{rolldice}}{0}{
  36 + % variables
  37 + \renewcommand{\vbone}{}
  38 + \renewcommand{\vbtwo}{}
  39 + \renewcommand{\vbthree}{}
  40 + \renewcommand{\vbfour}{}
  41 + \renewcommand{\vbfive}{}
  42 + \renewcommand{\vbsix}{}
  43 + \renewcommand{\vbseven}{}
  44 + \renewcommand{\vbeight}{}
  45 + \renewcommand{\vbnine}{}
  46 + \renewcommand{\vbten}{}
  47 +}{
  48 + \ifnumequal{\value{rolldice}}{1}{
  49 + % variables
  50 + \renewcommand{\vbone}{}
  51 + \renewcommand{\vbtwo}{}
  52 + \renewcommand{\vbthree}{}
  53 + \renewcommand{\vbfour}{}
  54 + \renewcommand{\vbfive}{}
  55 + \renewcommand{\vbsix}{}
  56 + \renewcommand{\vbseven}{}
  57 + \renewcommand{\vbeight}{}
  58 + \renewcommand{\vbnine}{}
  59 + \renewcommand{\vbten}{}
  60 + }{
  61 + \ifnumequal{\value{rolldice}}{2}{
  62 + % variables
  63 + \renewcommand{\vbone}{}
  64 + \renewcommand{\vbtwo}{}
  65 + \renewcommand{\vbthree}{}
  66 + \renewcommand{\vbfour}{}
  67 + \renewcommand{\vbfive}{}
  68 + \renewcommand{\vbsix}{}
  69 + \renewcommand{\vbseven}{}
  70 + \renewcommand{\vbeight}{}
  71 + \renewcommand{\vbnine}{}
  72 + \renewcommand{\vbten}{}
  73 + }{
  74 + % variables
  75 + \renewcommand{\vbone}{}
  76 + \renewcommand{\vbtwo}{}
  77 + \renewcommand{\vbthree}{}
  78 + \renewcommand{\vbfour}{}
  79 + \renewcommand{\vbfive}{}
  80 + \renewcommand{\vbsix}{}
  81 + \renewcommand{\vbseven}{}
  82 + \renewcommand{\vbeight}{}
  83 + \renewcommand{\vbnine}{}
  84 + \renewcommand{\vbten}{}
  85 + }
  86 +}
  87 +
  88 +\question
  89 +
  90 +\insertQR{}
  91 +
  92 +\watchout
  93 +
  94 +\ifprintanswers
  95 + % stuff to be shown only in the answer key - like explanatory margin figures
  96 + \begin{marginfigure}
  97 + \figinit{pt}
  98 + \figpt 100:(0,0)
  99 + \figpt 101:(0,0)
  100 + \figdrawbegin{}
  101 + \figdrawline [100,101]
  102 + \figdrawend
  103 + \figvisu{\figBoxA}{}{%
  104 + }
  105 + \centerline{\box\figBoxA}
  106 + \end{marginfigure}
  107 +\fi
  108 +
  109 +\begin{solution}
  110 +\end{solution}
  111 +
  112 +\begin{parts}
  113 + \part
  114 +
  115 + \insertQR{}
  116 + \begin{solution}
  117 + \end{solution}
  118 +
  119 + \part
  120 +
  121 + \insertQR{}
  122 + \begin{solution}
  123 + \end{solution}
  124 +
  125 + \part
  126 +
  127 + \insertQR{}
  128 + \begin{solution}
  129 + \end{solution}
  130 +
  131 + \part
  132 +
  133 + \insertQR{}
  134 + \begin{solution}
  135 + \end{solution}
  136 +
  137 + \part
  138 +
  139 + \insertQR{}
  140 + \begin{solution}
  141 + \end{solution}
  142 +
  143 +\end{parts}
177 vault/1-h84-ffapr/figure.bc
... ... @@ -0,0 +1,177 @@
  1 +
  2 +/*
  3 + Write methods for calculating f(x) below.
  4 + Note that you can plot more than curve on the same figure.
  5 +
  6 + See methods 'draw_plots' and 'draw_curve'
  7 +*/
  8 +
  9 +define p_1(x) {
  10 + return (x^2)
  11 +}
  12 +
  13 +define p_2(x) {
  14 + return (2*x+3)
  15 +}
  16 +
  17 +/* ****************************************************************************
  18 + User editable variables that will impact what the plot looks like.
  19 + Example:
  20 + 1. To change the x-range over which the plot is generated, change
  21 + the xstart and xstop variables
  22 + 2. To change the # of plot points, change 'n'
  23 +
  24 +*******************************************************************************/
  25 +
  26 +pi = 4*a(1) /* define pi */
  27 +xstart = -1.75 /* Lower bound of the interval */
  28 +xstop = 3.5 /* Upper bound of the interval */
  29 +n = 30 /* Number of points to be computed */
  30 +deltax = (xstop-xstart)/(n-1)
  31 +xdim = 80 /* Horizontal dimension of the figure in mm */
  32 +ydim = 100 /* Vertical dimension of the figure in mm */
  33 +precision = 1 /* Number of significant digits printed (>= 0)*/
  34 +trueorig = 1 /* Equals 1 if the true origin must be used, 0 otherwise. */
  35 +label_axes = 0 /* if 0, then value labels will NOT be placed on axes */
  36 +
  37 +ymin = p_1(xstart);
  38 +ymax = ymin; /* Change this to force extension of the y-axis */
  39 +xscale = 0 ;
  40 +yscale = 0 ;
  41 +
  42 +/* ****************************************************************************
  43 + Useful utility functions. Ordinarily, there should be no need to
  44 + edit them
  45 +*******************************************************************************/
  46 +
  47 +define void set_scaling_factors() {
  48 + for (i = 0; i < n; i++){
  49 + x = xstart + i*deltax
  50 + y = p_1(x)
  51 + if (y<ymin) ymin = y
  52 + if (y>ymax) ymax = y
  53 + }
  54 + xscale = xdim/(xstop-xstart)
  55 + yscale = ydim/(ymax-ymin)
  56 +}
  57 +
  58 +define format(n,x){
  59 + auto y
  60 + scale = n
  61 + y = x/1
  62 + scale = 20
  63 + return (y)
  64 +}
  65 +
  66 +define round(n,x){
  67 + auto y, z
  68 + z = 10^(n+1)
  69 + d = 5
  70 + if (x<0) d = -d
  71 + y=z*x+d
  72 + scale=n
  73 + y=y/z
  74 + scale=20
  75 + return(y)
  76 +}
  77 +
  78 +define void write_graph_legend( legend ) {
  79 + print "\\def\\GraphLegend{$", legend, "$}\n"
  80 +}
  81 +
  82 +define void initialize() {
  83 + print "% 1. Definition of characteristic points\n"
  84 + print "\\figinit{pt}\n"
  85 +
  86 + if ( trueorig == 1 ) {
  87 + print "\\def\\Xmin{", format(5,xstart*xscale), "}\n"
  88 + print "\\def\\Ymin{", format(5,ymin*yscale), "}\n"
  89 + print "\\def\\Xmax{", format(5,xstop*xscale), "}\n"
  90 + print "\\def\\Ymax{", format(5,ymax*yscale), "}\n"
  91 + print "\\def\\Xori{", format(5,-xstart*xscale), "}\n"
  92 + print "\\def\\Yori{", format(5,-ymin*yscale), "}\n"
  93 + } else {
  94 + print "\\def\\Xmin{0}\n"
  95 + print "\\def\\Ymin{0}\n"
  96 + print "\\def\\Xmax{", xdim, "}\n"
  97 + print "\\def\\Ymax{", ydim, "}\n"
  98 + print "\\def\\Xori{0}\n"
  99 + print "\\def\\Yori{0}\n"
  100 + }
  101 + print "\\figpt0:(\\Xori,\\Yori)\n"
  102 +}
  103 +
  104 +define void draw_axes() {
  105 + print "% 2. Creation of the graphical file\n"
  106 + print "\\figdrawbegin{}\n"
  107 + print "\\def\\Xmaxx{\\Xmax} % To customize the position\n"
  108 + print "\\def\\Ymaxx{\\Ymax} % of the arrow-heads of the axes.\n"
  109 + print "\\figset arrowhead(length=4, fillmode=yes) % styling the arrowheads\n"
  110 + print "\\figdrawaxes 0(\\Xmin, \\Xmaxx, \\Ymin, \\Ymaxx)\n"
  111 +}
  112 +
  113 +define void draw_curve(values[]) {
  114 + print "\\figdrawlineC(\n"
  115 +
  116 + for (j = 0 ; j < n ; j++) {
  117 + y = values[j]
  118 + x = xstart + j*deltax
  119 +
  120 + if (j != (n - 1)) {
  121 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), ",\n"
  122 + } else {
  123 + print format(5,(x-xstart)*xscale), " ", format(5,(y-ymin)*yscale), "\n"
  124 + print ")\n"
  125 + }
  126 + }
  127 +}
  128 +
  129 +define void draw_plots() {
  130 + g = a[n]
  131 + h = b[n]
  132 +
  133 + for ( j = 0 ; j < n ; j++ ) {
  134 + x = xstart + j*deltax
  135 + g[j] = p_2(x)
  136 + h[j] = p_1(x)
  137 + }
  138 +
  139 + draw_curve(g[])
  140 + draw_curve(h[])
  141 + print "\\figdrawend\n"
  142 +}
  143 +
  144 +define void label_drawing() {
  145 + print "% 3. Writing text on the figure\n"