Locus need some optimization

Bug #1836768 reported by hilaire on 2019-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dr. Geo II
Medium
Unassigned

Bug Description

It looks like DrGLocusMorph samples a lot of off screen samples. Later discarded, though. But it consumes a lot of computer power.

Test with this script, with a value larger than 6

| figure f a b c|
figure := DrGeoFigure nouveau afficherAxes afficherGrille echelle: 50.
a := figure decimal: 1 a: 5 @ -1 min: -8 max: 8 nom: 'a' afficherValeur: true.
b := figure decimal: 1 a: 5 @ -2 min: -8 max: 8 nom: 'b' afficherValeur: true.
c := figure decimal: 1 a: 5 @ -3 min: -8 max: 8 nom: 'c' afficherValeur: true.
f := [:x | a valeur * x squared + (b valeur * x) + c valeur].
figure courbeDe: f de: -10 a: 10

hilaire (hilaire-fernandes) wrote :

Once can use

sample1 pointScreen - sample2 pointScreen) abs max > 5

in place of the squaredDistance

hilaire (hilaire-fernandes) wrote :

5 to be replace by an alternal maxScreenDistance

hilaire (hilaire-fernandes) wrote :

Relaxing a bit the Locus parameters helps a bit:

LocusMorph>>initialize
   super initialize.
   minAbscissaDelta := 1e-4.
   maxScreenDelta := 64.
   maxAbscissaDelta := 1e-1

hilaire (hilaire-fernandes) wrote :

Analysis show replacing message #squaredDistance has minimal impact.
So no need to replace it.

Changed in drgeo:
status: New → In Progress
hilaire (hilaire-fernandes) wrote :

One idea is to make the minAbscissaDeltra related to the zoom factor on the sketch.
When zooming in, more accuracy is needed for the mobile abscissa

Changed in drgeo:
milestone: 19.06 → 19.09
Changed in drgeo:
status: In Progress → Fix Committed
Changed in drgeo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers