Point (MathObject Class)
Jump to navigation
Jump to search
The Point Class
The Point class implements points in [math]{\bf R}^n[/math] for arbitrary [math]n[/math]. Typically, Points are delimited by parentheses, but that can be controlled by settings in the Context. Points (of the same dimension) can be added and subtracted, or multiplied and divided by scalars. The answer checker for Points can give students hints about the coordinates that are wrong, and about whether the number of coordinates is correct.
Context("Point"); $p = Point(3,0,-2); $p = Point([3,0,-2]); $p = Point("(3,0,-2)"); $p = Compute("(3,0,-2)"); $q = $p + Point(1,3,7); # same as Point(4,3,5); $q = $p + [1,3,7]; # same as above $q = 3*$p; # same as Point(9,0,-6); $p = $p/2; # same as Point(3/2,0,-1);
It is possible to create Points in [math]{\bf C}^n[/math], though there is no pre-defined Context that makes this easy to do.