[system] Repository:
ViewVC logotype

Revision 5573


Jump to revision: Previous Next
Author: gage
Date: Mon Oct 29 02:33:27 2007 UTC (12 years ago)
Log Message:
Modifications PGgraphicsmacros.pl suggested by Davide Cervone.


1. Don't load  MathObjects (since this causes conflicts if the webwork
question also uses Matrices as well as GraphObjects).
(This incompatibility is itself a bug, but not one we can solve immediately.)

2. Make sure that the variable is defined by defining the new rule in a local
context and insuring that the variable is defined.

(Unfortunately we don't have the original Formula, just the normalString created by the Formula
so we won't be able to guarantee the same context that created the original Formula.  However
we can get the current context and add the independent variable if it is missing.)

3. Evaluate using Parser::Evaluate so that the errors are trapped if the input is
not in the domain of definition of the function.

-------

A reasonable  next step would be to define plot_formula with syntax something like
plot_formula($formula, domain=>[0,10],color=>'red',weight=>2)
which could take further advantage of the MathObjects paradigm, but we'll probably
have to find a more robust solution to the Matrix confusion at the same time.

--Mike

Changed paths:

Path Details
Directorytrunk/pg/macros/PGgraphmacros.pl modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9