Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

tfpgh/polar_ascii

Open more actions menu

Repository files navigation

polar_ascii

polar_ascii graphs arbitrary polar functions in ASCII. It automatically scales the function over the given domain to fit within the terminal window.

Examples

heart.py
Heart Example
spiral_medium.py
Spiral Medium Example
flower.py
Flower Example

Usage

To graph a polar function, pass a python file defining the variable domain and function r into polar_ascii.py

Example function file (examples/spiral_medium.py):

import math

domain: tuple[float, float] = (0.0, 5 * math.pi)


def r(theta: float) -> float:
    return theta

Call it with:

python3 polar_ascii.py examples/spiral_medium.py

(or the path to your function file)

About

Graphing polar equations in ASCII.

Topics

Resources

License

Stars

Watchers

Forks

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.