Skip to content

tui-apps/algebra-visual

Repository files navigation

algebra-visual

Plot y = f(x) in your terminal, redrawn live as you type.

algebra-visual plotting y = sin(x) * x

More example plots

y = sin(x) + cos(2x) y = cos(x) * exp(-abs(x) / 5)

Run

go run .

Or build a binary with go build -o algebra-visual . and run ./algebra-visual.

Usage

Type a function of x and the curve redraws on every keystroke.

sin(x) * x
x^2 - 4
2^x

The expression syntax covers + - * / % ^, parentheses, unary minus, and the variable x. Available functions include sqrt cbrt abs floor ceil round sin cos tan asin acos atan exp ln log log2. You can also use the constants pi, e, tau. The domain is fixed to [-10, 10] and the vertical range fits the visible curve.

ctrl+u clears the line. esc or ctrl+c quits.

License and contributing

Licensed under the MIT License (see LICENSE). Contributions are welcome; see CONTRIBUTING.md.

Citation

If you use this project, please cite it. A machine-readable CITATION.cff is included; expand below for a BibTeX entry.

BibTeX
@software{Vulpes_algebra-visual_2026,
  author  = {Vulpes, Aesthetic},
  title   = {algebra-visual},
  year    = {2026},
  month   = jul,
  version = {0.1.0},
  url     = {https://github.com/tui-apps/algebra-visual}
}

Related

Part of the tui-apps collection

Six small, single-purpose terminal apps.

App What it does
calc live calculator
algebra-visual function grapher (this repo)
classical-ciphers cipher encoder and decoder
crypto-charts crypto price charts
totp TOTP authenticator
life Conway's Game of Life

Packages

 
 
 

Contributors

Languages