Commit Graph

190 Commits

Author SHA1 Message Date
Laury
63d1e0ee4e [themes] Color with pointers 2022-02-11 18:43:50 +01:00
Joachim LF
9b17d1b882 [Update] Epsilon 15.3.1 2021-01-21 19:56:06 +01:00
Hugo Saint-Vignes
83722342f7 [apps/statistics] Reload CurveView before drawing histogram labels 2021-01-05 16:43:01 +01:00
Hugo Saint-Vignes
a42208f773 [apps/shared] Handle null labelStep in numberOfLabels 2021-01-05 16:33:48 +01:00
Hugo Saint-Vignes
990c45b661 [apps/shared] Prevent label method from being called on uninitialized chars 2021-01-05 11:38:21 +01:00
Hugo Saint-Vignes
1939293cd2 [apps/shared] Add margin to avoid visible approximation errors 2020-12-21 16:12:27 +01:00
Léa Saviot
7f6a3f0fc1 [apps/curve_view] Fix KDCoordinate overflow
Scenario: (with the current auto zoom algorithm)
Graph f(x) = x! -> Auto axes are x=[-13,17647;13,17647],
y=[3628793;2628807]
Press "0" "EXE" to go to x = 0 -> Axes are x=[-13,17647;13,17647],
y=[-0.8612717;13.13873]
Press auto
Press "0" "EXE" to go to x = 0 -> the assertion about KDCoordinates
breaks.
2020-11-04 15:58:43 +01:00
Hugo Saint-Vignes
2f97dab6d1 [apps/shared] Add toggle buttons in Graph view
Change-Id: I7548d11fb114b2605ce34d3bda0776277b79ff9d
2020-11-04 15:58:25 +01:00
Hugo Saint-Vignes
4acbf3346b [apps/shared] Add comments and minimize threshold
Change-Id: Ieb56513ea0a7fab35acf15531277aec5cd6071ca
2020-11-04 15:58:03 +01:00
Hugo Saint-Vignes
ebe207d67d [apps/shared] Fix cache overlap when plotting polar curves
Change-Id: I4b1d6dccdedc5b3cea455e2ad2038336b4b48064
2020-11-04 15:55:40 +01:00
Émilie Feral
64ff5b4c70 [app/shared] CurveView: simplify implementation of
pixelLengthToFloatLength (avoid avoidable overflows)
2020-11-04 15:33:03 +01:00
Émilie Feral
5b4fc6ff84 [apps/shared] CurveView: implement CurveView::pixelLength(Axis) 2020-11-04 15:33:03 +01:00
Émilie Feral
d6751e6e03 [apps/shared] CurveView: improve floatLengthToPixelLength to avoid
useless computations (and potential overflowing)

This fixes the drawing of arrow(100,100,0.1,3) in matplotlib module of
python
2020-11-04 15:33:02 +01:00
Hugo Saint-Vignes
c130f8e881 [apps/shared] Prevent KDPoint overlfowed translation on cursorFrame
Change-Id: Ifc32eefaf4241d59d7567cadb9b2962ba5efb4d9
2020-11-04 15:32:59 +01:00
Hugo Saint-Vignes
e199143412 [apps/shared/curve_view] Small binary code size optimization
Change-Id: I4b61506edb434cb901a6fb92ef5c145f43c51035
2020-11-04 15:32:57 +01:00
Hugo Saint-Vignes
59d5adace3 [apps/shared] Optimize polar curve range display
Change-Id: Ic1b044212711d1f73e147cb0857084ff9d61fbd9
2020-11-04 15:30:53 +01:00
Hugo Saint-Vignes
0e11760f08 [apps/shared/curve_view] Improving performances for non cartesian curves
Change-Id: Ie1a9a6450e8f92ceaf93c5fe78711640be175e9e
2020-11-04 15:16:55 +01:00
Hugo Saint-Vignes
0322a1a6a7 [apps/shared] Fix draw curve issues when tStep << tStart
Change-Id: Iaf054cff1f78f3c800564a0e6c133192bdfab260
2020-11-04 15:11:43 +01:00
Hugo Saint-Vignes
e27c668c40 [apps,escher,kandinsky,poincare,python] Replace every "grey" with "gray"
Change-Id: I60a232849dce90f70e6977b6024d6e9b1ce1b731
2020-11-04 15:07:20 +01:00
Gabriel Ozouf
1bee23cf4f [apps/graph] Reworked function caching
Instead of being memoized all at once before display, functions values
are now stored at evaluation time. Fixed some quirks with caching
preparation.

Change-Id: I5d212c271c8c41a6dc9074a15c720f0bccf8ac40
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
42fcf557b8 [apps/graph] Limited number of cached functions
The caches used for function values memoization are now stored in
ContinuousFunctionStore : there are now only a fixed number, instead of
one per function. This effectively enables caching only for the first
few functions on screen, while reducing the memory usage.

Change-Id: I2ade091717f73a14a756fe527c773db8e8627be7
2020-11-04 15:04:24 +01:00
Gabriel Ozouf
95fef86ec0 [apps/graph] Activated caching for graph drawing
Added a default argument to CurveView::drawCurve : a function to initiate the
memoization of continuous functions. The function is implemented in
ContinuousFunctionCache and provided by GraphView. This should be invisible
to other types of curves that rely on CurveView::drawCurve.

Change-Id: I59aa55d67154b6d4bf9614b7ed87c48408773d86
2020-11-04 15:00:43 +01:00
Quentin Guidée
5d50c80604 Merge remote-tracking branch 'upstream/master' into omega-dev 2020-11-03 19:35:37 +01:00
Gabriel Ozouf
c71b2dee99 [curve_view] Factor bounding box code for joinDots
Change-Id: Iae974aa2bee12e6c56bad84fd3b45093fb2a856f
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
26fdfcd25c [curve_view] Fixed variable names
Change-Id: I8aad13c6bce719ba8f3a30cd86f06f7c89ec041e
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
fe8e490ac0 [curve_view] Filter unwanted vertical asymptotes
Change-Id: Ia603a2fb1553b6dfc038d2a28472ce48e41936db
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
106916e7bf [curve_view] Add double evaluation
Add the possibility to use a double-typed evaluator when tracing a
curve, useful when errors caused by float approximation mess with the
drawing.

Change-Id: I3ab410deec4823149239b0a26b1885fd2a493226
2020-10-23 08:56:56 +02:00
Émilie Feral
c91c2a6e3f [app/shared] CurveView: Avoid dashSize overflow in
drawHorizontalOrVerticalSegment
2020-10-12 09:48:55 +02:00
Émilie Feral
8e025b0823 [apps/shared] CurveView: avoid overflowing KDCoordinate
This fixes the following bug: add the sequence, u(n)=2^n. On the graph,
go to "sum of terms" and try to sum terms from 0 to 18 by moving the
cursor. It hangs.
2020-10-12 09:48:55 +02:00
Joachim LF
d7ac7e19bb [Update] Epsilon 14 2020-07-13 10:36:47 +02:00
Quentin
27a0935311 [Fix] Patched colors 2020-06-20 19:46:47 +02:00
Léa Saviot
72e342e1b1 [apps/curve_view] Fix drawArrow
Compute everything in pixels + fix glitch when zooming on the tip of
arrow(0,0,2,3)
2020-06-04 14:58:20 +02:00
Émilie Feral
420dd04766 [apps/shared][python/port] CurveView::drawArrow uses pixel computation
instead of float computation to avoid precision errors, by default the
arrow size is decided in pixels.
2020-06-04 14:50:10 +02:00
Émilie Feral
c826c53659 [apps/shared] CurveView: change drawArrow API to take arrow shape
arguments in float instead of coordinates
2020-06-04 14:50:09 +02:00
Émilie Feral
e92b56b78e [apps/shared] CurveView: change drawArrow arguments (new definition of
arrow shape)
2020-06-04 14:50:09 +02:00
Quentin
f37040dc8a [Fix] Conflicts 2020-04-16 14:04:56 +02:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Quentin
aea963dac0 [Fix] Fix conflicts ._. 2020-04-07 14:53:19 +02:00
Émilie Feral
633776b92f [apps/shared] Fix CurveView::drawArrow on arrow without orientation 2020-04-01 11:46:25 +02:00
Quentin
0d56576f9c [Git] Fix conflicts 2020-04-01 11:36:16 +02:00
Émilie Feral
9e822e85e5 [apps/shared] CurveView: implement drawArrow 2020-04-01 10:18:08 +02:00
Émilie Feral
aaf71328ba [apps/shared] CurveView: resolve name conflict -
drawHorizontalOrVerticalSegment & drawSegment -
2020-04-01 10:18:08 +02:00
Romain Goyet
a3b1b51f75 [pyton/matplotlib] Support plot 2020-04-01 10:18:08 +02:00
Quentin
735294b91b [Git] Fix conflicts 2020-04-01 00:17:17 +02:00
Léa Saviot
bd0b9f8a4a [apps/curve_view] Fix typo
The labels would not float on the right of the display
2020-03-31 15:16:39 +02:00
Quentin Guidée
bd6f30fda5 Merge remote-tracking branch 'upstream/master' into omega-hotfix 2020-03-06 16:06:39 +01:00
Neven Sajko
aae5e49c01 Remove useless uses of const for return types
An integer or float value can not be assigned to, so there is no point
in qualifying it as const.
2020-03-02 09:48:23 +01:00
Quentin Guidée
ab8f731515 Fixed some conflicts 2020-02-12 17:42:58 +01:00
Émilie Feral
d61336936e [apps/shared] Create a class Dots to share dots masks between CurveView
and RoundCursorView. Use the same dot for illustrations of additional
results in Calculation app and Function app
2020-02-12 15:13:21 +01:00