I would like to use mathematica to create individualised tests that can be printed out for students to complete(handwritten). I would also like to be able to generate individualised printed answers.
(As a bonus I would like to be able to scan in student responses and have them graded. I understand this would involve handwriting recognition which is problematic, but I could make it easier by restricting the answers (eg numbers) and getting student handwriting examples.)
The particular case I have in mind is giving students the coordinates of 3 randomised, integer points in the plane and having them proceed to work out various triangle centers using coordinate geometry. The answers would be points in the plane as pairs of mixed frations or decimals rounded appropriately. I would also have them graph them on paper and with geogebra or desmos.
I have used Mathematica to generate data and export it to Excel and then Mail Merge to Word.
f[{a_, b_, c_}] = a^2 + b^2 - c^2; (*To test Obtuse vs acute*)
SetDirectory["C:XXX\\Triangle Centres\\MailMerge"]
outfile = "out.csv";
l = {};
k = 0;
Do[{
{P, Q, R} =
RandomVariate[MultinormalDistribution[{8, 8}, {{24, 0}, {0, 24}}],
3] // Round,
{p, q, r} =
Sort[Apply[
SquaredEuclideanDistance, {{Q, R}, {P, R}, {P, Q}}, {1}]],
If[f[{p, q, r}] > 0 && r != q, (*Exclude Obtuse or Isosocles*)
{
filenamei = ToString[k] <> "i.png",
in = Insphere[{P, Q, R}] // N // First,
g = RegionCentroid[Triangle[{P, Q, R}]] // N;
ci = Circumsphere[{P, Q, R}] // First // N,
l = Append[l, Flatten[{k, filename, P, Q, R, in, g, ci}]],
Export[filenamei,
Graphics[{PointSize[Large], Point[{P, Q, R}], Line[{P, Q, R, P}],
Insphere[{P, Q, R}] // First // Point, Point[g],
Circumsphere[{P, Q, R}] // First // Point}, Axes -> True,
GridLines -> Automatic, AspectRatio -> 1]],
k++
}]
}, 1000]
k
Export[outfile, l]
Here is the cut and pasted word document (with the points (8,9) and names, etc. included via Mail Merge). I then print this. I haven't implemented answer generation or automatic marking.
Name: Joe Bloggs
Three Points in the Plane
Point A: ( 8 , 9 )
Point B: ( 0 , 2 )
Point C: ( 10 , 2 )
Gradient: m=(y_2-y_1)/(x_2-x_1 )
Point Gradient Equation: y-y_1=m(x-x_1 )
Line AB
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
Line BA
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
Line CA
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
On graph paper:
Plot the points A, B and C
Label the points A, B and C
Draw in the lines AB, BC and AC.
Label the sides by their equations
Altitudes
(An Altitude of a triangle is a line perpendicular to a side through the opposite vertex)
Perpendicular lines have: m×m_⊥=-1
Altitude through C
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
Altitude through A
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
Altitude through B
Gradient: __________________________________________________________________________
Equation:__________________________________________________________________________
__________________________________________________________________________________
Point of Intersection (Orthocenter): H= ( ___________ , _______ )
Find the intersection of two altitudes:
Check this point is on the third altitude:
Centroid: G=( ___________ , _______ )
The centroid is the centre of mass given by G=((x_1+x_2+x_3)/3,(y_1+y_2+y_3)/3)
On a new graph draw the triangle ∆ABC together with the altitudes, orthocentre H and centroid G
Can some one achieve this solely in Mathematica?
The pedagogical aspects of this as discussed at MathEducators stackexchange
Alternative approaches: Latex and Mathematica