|
From: Jaime V. <vi...@fe...> - 2017-07-30 21:12:20
|
On 30-07-2017 20:02, Robert Dodier wrote:
> Hmm, I don't understand what's going on here. number_of_arrows is only
> used in Plotdf.tcl at:
>
> set stepsize [expr { 420.0/sqrt($number_of_arrows) }]
>
> which used to be (pre-commit dca80e3) a constant value of 30. Obviously
> number_of_arrows = 14^2 gives 30 again so that's great. But 15^2 gives
> 28 and that gives an error -- what's wrong with that?
The error appears in:
[expr {$fac * $dfx}]
apparently $fac is inversely proportional to the magnitude of the phase
velocity and at x=0, y=0, the phase velocity has magnitude zero. Tcl
computes 1/0 without problem, giving the value Inf to the variable $fac,
but it then gives an error when computing $fac*$dfx
The problem seems to be when plotdf tries to show an arrow at a fixed
point. Somehow Bill Shelter arrange some number of steps that, combined
with the size use for the domain, avoids giving integer values for z or
y. That might explain why I never ran across that error after plotting
thousands of direction fields. I will investigate it further and use use
a test for when $fac is Infinite in which case I believe the step of
drawing the arrow should be skipped.
Cheers,
Jaime
P.S. Those trying to test different versions of Xmaxima, please keep in
mind that every time you install a different version of Maxima, the old
xmaxima is deleted and replaced by the last one. Unlike maxima that can
have several instances with different version numbers and lisp flavors.
|