Bug 358451 - Constants are not graphed correctly
Summary: Constants are not graphed correctly
Status: CONFIRMED
Alias: None
Product: kalgebra
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 20:42 UTC by resplin
Modified: 2025-03-01 17:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description resplin 2016-01-23 20:42:26 UTC
Constants are helpful for creating lines in the viewport, for comparing against more complex functions, and for explaining what graphs are to beginning learners. Kalgebra handles constants in un-intuitive ways.

Case: Y=5 attempt 1
Steps to reproduce:
* 2D Graph
* Add Function
* 5
Expected behavior:
* A straight line at y=5 (for any value of x, y equals 5)
Observed behavior:
" "Function type not recognized"

Case: Y=5 attempt 2
Steps to reproduce:
* 2D Graph
* Add Function
* y=5
Expected behavior:
* A horizontal line at y=5 (for any value of x, y equals 5)
Observed behavior:
" Graph is y = x+5 (line with slope of 1, x intersect at -5 and y intersect at 5)

Case: X = 5
Steps to reproduce:
* 2D Graph
* Add Function
* X=5
Expected behavior:
* A vertical line at x=5 (for any value of y, y equals 5)
Observed behavior:
" Graph is y = x-5 (line with slope of 1, x intersect at 5 and y intersect at -5)

Reproducible: Always




In the 3D case, it is similarly difficult to create lines or planes that exist only in one axis. The engine seems to handle these cases incorrectly.
Comment 1 resplin 2016-01-23 20:44:17 UTC
I am running on Fedora 23, version 15.04.2.
KAlgebra reports:
KDE Frameworks 5.18.0
Qt 5.5.1 (built against 5.5.1)
The xcb windowing system
Comment 2 Aleix Pol 2016-01-26 23:25:32 UTC
the way to do this is by passing x->5.

I won't close the bug just yet, but that's how the language was designed.
Comment 3 resplin 2016-01-27 02:52:06 UTC
That makes sense and is very useful.

A few suggestions:
* It should be documented on the "Syntax" page of the manual.
* x=5 and y=5 should return a syntax error instead of an incorrect result.
* Syntax errors should point people at the Syntax page of the manual.

Thanks.
Comment 4 Justin Zobel 2021-03-09 06:30:06 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 5 Asten Valentinus 2025-03-01 17:16:45 UTC
(In reply to Justin Zobel from comment #4)
> As this report hasn't seen any changes in 5 years or more, we ask if you can
> please confirm that the issue still persists.

Just tested, the issue still persists.