Commit Graph

18 Commits

Author SHA1 Message Date
Gabriel Ozouf
ffebd2e987 [shared] Rename methods 2020-12-07 15:58:56 +01:00
Gabriel Ozouf
a9aeae94df [shared] Create helper functions for ranges
These functions are used to test the full algorithm used to compute
ranges.

Change-Id: I48069e245aa6e879f66aecc29709fc6f992f5220
2020-12-07 15:58:56 +01:00
Gabriel Ozouf
a8858023ba [shared] Remove const qualifiers from interestingRanges
Change-Id: I794aa144af9dc9eab3090eea7fd54a7cdac2fd68
2020-12-07 15:58:56 +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
Gabriel Ozouf
07c52139b9 [apps/shared] InteractiveCurveViewRangeDelegate
Clean up the class by removing some unused methods and structures.

Change-Id: Ife38a9a0ed4bfb84986227d1f57fe3f5d2c4ff2a
2020-11-04 15:58:13 +01:00
Gabriel Ozouf
13d1b7077c [apps/shared] Removed method computeYRange
This method of InteractiveCurveViewRangeDelegate was only used to
compute the Y range when Yauto was on.

Change-Id: I9b688a87e16fc58c7d2b00eb071076b98f945df6
2020-11-04 15:58:09 +01:00
Gabriel Ozouf
a6db9688cd [apps/function] Factorize zoom in Function class
The new zoom implemented for ContinuousFunction is now factorized inside
Function to benefit the Sequence class. The same things is done to code
added to Graph::GraphController, which is moved into
FunctionGraphController.
This removes the reimplementation of several methods, most notably
computeYRange, as the implementation for function is general enough to
work on sequences.

Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
2020-11-04 15:30:53 +01:00
Gabriel Ozouf
17f39e5e39 [apps/graph] Take cursor into account for Y range
Additional checks have been added to ensure that the first move of the
cursor from the center of the graph would not cause the window to pan up
or down.

Change-Id: I44d7e86223941076cbf03db7a221e9c0427a64e4
2020-11-04 15:30:53 +01:00
Gabriel Ozouf
8104caea50 [apps/shared] New automatic zoom on curves
Initial zoom for displaying curves is computed according to the
following rules :
  - For polar and parametric curves, the algorithm has not changed.
    Vertical and horizontal ranges are chosen in order to display the
    full curve with orthonormal graduations.
  - For cartesian curves, the horizontal range is chosen in order to
    display all points of interest (roots, extrema, asymptotes...).
    The vertical range is fitted to be able to display those points, but
    also cuts out points outside of the function's order of magnitude.

Change-Id: Idf8233fc2e6586b85d34c4da152c83e75513d85c
2020-11-04 15:30:53 +01:00
Léa Saviot
a4099c4c3e [apps/graph] xAuto and YAuto for polar/param 2019-09-03 14:21:14 +02:00
Léa Saviot
18a458bae5 [apps/graph] init Range to -5..5 if polar/param 2019-09-02 17:56:56 +02:00
Léa Saviot
869e534b4b [apps] MAke some InteractiveCurveViewRangeDelegate methods const 2019-01-10 11:42:05 +01:00
Léa Saviot
5d1ef0f3f0 [apps/sequence] Use first ranks when computing graph range
Put two sequences u(n+1)=u(n) and v(n+1) = v(n), u(100) = 50, v(50) = 8.
Basic settings computed the x range as [0,10] before, now it is
[50,110].
2019-01-10 11:42:05 +01:00
Léa Saviot
6720ad7b38 [apps] Rename interestingXRange as interestingXHalfRange 2019-01-10 11:42:05 +01:00
Émilie Feral
05055c387f [apps] Graph: when setting default range of a function, take
into account the potential periodicity
2018-03-22 10:48:06 +01:00
Émilie Feral
98a877082c [apps/shared] Factorize regression and function did change range method
Change-Id: Ie4ddefe883a4a0c40f50b5b2afe3d6eb7aa78e0e
2017-06-16 09:56:55 +02:00
Émilie Feral
23026b6718 [apps/shared] Namespace shared
Change-Id: I6dec7ce900bb4e801a25c567fe5e242cb744cf29
2017-02-13 17:15:06 +01:00
Émilie Feral
b06c54856f [apps\shared] Create a folder shared/
Change-Id: I94e4474ff5ab3bf9db7afd5b3be57b985755ecdf
2017-02-13 17:15:06 +01:00