[system] / trunk / pg / macros / contextLimitedVector.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/contextLimitedVector.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5550 Revision 5551
1=head1 NAME
2
3contextLimitedVector.pl - Allow vector entry but now vector operations.
4
5=head1 DESCRIPTION
6
7Implements a context in which vectors can be entered,
8but no vector operations are permitted. So students will
9be able to perform operations within the coordinates
10of the vectors, but not between vectors.
11
12Vectors can still be entered either in < , , > or ijk format.
13Most of the complication here is to handle ijk format
14properly. Each coordinate vector is allowed to appear
15only once, so we have to keep track of that, and allow
16SOME vector operations, but only when one term is
17one of the coordinate constants, or one of the formulas
18we've already OKed.
19
20You control which format to use by setting the context
21to one of the following:
22
23 Context("LimitedVector-coordinate");
24 Context("LimitedVector-ijk");
25 Context("LimitedVector"); # either one
26
27=cut
28
1loadMacros("MathObjects.pl"); 29loadMacros("MathObjects.pl");
2 30
3sub _contextLimitedVector_init {LimitedVector::Init()}; # don't load it again 31sub _contextLimitedVector_init {LimitedVector::Init()}; # don't load it again
4
5=head3 Context("LimitedVector")
6
7 ##########################################################
8 #
9 # Implements a context in which vectors can be entered,
10 # but no vector operations are permitted. So students will
11 # be able to perform operations within the coordinates
12 # of the vectors, but not between vectors.
13 #
14 # Vectors can still be entered either in < , , > or ijk format.
15 # Most of the complication here is to handle ijk format
16 # properly. Each coordinate vector is allowed to appear
17 # only once, so we have to keep track of that, and allow
18 # SOME vector operations, but only when one term is
19 # one of the coordinate constants, or one of the formulas
20 # we've already OKed.
21 #
22 # You control which format to use by setting the context
23 # to one of the following:
24 #
25 # Context("LimitedVector-coordinate");
26 # Context("LimitedVector-ijk");
27 # Context("LimitedVector"); # either one
28 #
29
30=cut
31 32
32################################################## 33##################################################
33# 34#
34# Handle common checking for BOPs 35# Handle common checking for BOPs
35# 36#

Legend:
Removed from v.5550  
changed lines
  Added in v.5551

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9