Beta

garcalc

Graphing Calculator with CAS

A graphical calculator with a built-in computer algebra system, 2D and 3D function plotting, parametric and implicit curve support, and a standalone CAS command-line interface. Evaluates expressions symbolically or numerically with support for calculus, linear algebra, and complex numbers.

Features

  • Symbolic CAS with differentiation, integration, and limits
  • 2D graphing: explicit, parametric, and implicit curves
  • 3D surface plotting with camera rotation and zoom
  • Exact fractions, complex numbers, and matrix operations
  • Standalone CAS REPL (garcas) for scripting
  • Daemon mode with IPC control via garcalcctl
  • Popup mode for quick calculations from keybindings
  • Lua and TOML configuration with gar integration
  • Trace mode for reading values off curves
  • Viridis, Plasma, Coolwarm, and Grayscale 3D colormaps
  • Equation solving, simplification, and factoring
  • Catppuccin-based function color palette

Quick Start Guide

Get up and running with garcalc. This covers installation, the three binaries, and basic usage in each mode.

1. Installation

terminal
$ curl -fsSL https://gar.musicsian.com/install.sh | bash -s -- --component=garcalc # Install via script
$ cd ~/.local/src/gardesk/garcalc && cargo build --release # Or build from source

This builds three binaries: garcalc (GUI), garcalcctl (control client), and garcas (standalone CAS CLI).

2. System Dependencies

garcalc requires Cairo, Pango, and X11 development libraries (via gartk):

Install dependencies
$ sudo pacman -S cairo pango libx11 lua # Arch
$ sudo apt install libcairo2-dev libpango1.0-dev libx11-dev liblua5.4-dev # Debian/Ubuntu
$ sudo dnf install cairo-devel pango-devel libX11-devel lua-devel # Fedora

3. Launch

terminal
$ garcalc # Open calculator (900x600 window)
$ garcalc --popup # Popup mode (centered, closes on focus loss)
$ garcalc --mode graph # Start in 2D graph mode
$ garcalc --mode graph3d # Start in 3D graph mode
$ garcalc --eval "sin(pi/2)" # Evaluate and exit

4. Calculator Mode

Type expressions and press Enter to evaluate. Results appear in the history panel above the input area.

> 2 + 3 * 4
14
> sin(pi/2)
1
> sqrt(2)
1.4142135623730951
> 5!
120
> diff(x^3, x)
3*x^2

5. Graph Mode

Press F2 to switch to 2D graphing. Type a function and press Enter to plot it.

> sin(x)              -- plots y = sin(x)
> x^2 - 3*x + 2       -- plots a parabola
> x^2 + y^2 = 1        -- plots a circle (implicit)
> sin(t), cos(t)       -- plots a circle (parametric)

6. Keyboard Shortcuts

Key Action
F1Switch to Calculator mode
F2Switch to 2D Graph mode
F3Switch to 3D Graph mode
ReturnEvaluate expression
Up / DownNavigate history
Ctrl+Left / RightJump to previous/next word
Home / EndJump to start/end of input
EscapeClear input (standalone) or quit (popup)
Ctrl+RReset viewport/camera (graph modes)
Ctrl+CClear all functions/surfaces (graph modes)
Ctrl+TToggle trace mode (2D graph)

Releases

v0.1.0 Initial Release
  • • CAS engine with symbolic differentiation, integration, limits, and summation
  • • 2D graphing: explicit, parametric, and implicit curves
  • • 3D surface plotting with camera rotation and zoom
  • • Exact fractions, complex numbers, and matrix operations
  • • Standalone CAS REPL (garcas) for scripting
  • • Daemon mode with IPC control via garcalcctl
  • • Popup mode for quick calculations from keybindings