https://github.com/kylecorry31/joystick-transform-plotter
https://github.com/kylecorry31/joystick-transform-plotter
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kylecorry31/joystick-transform-plotter
- Owner: kylecorry31
- Created: 2016-11-27T01:00:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-29T14:32:35.000Z (over 9 years ago)
- Last Synced: 2025-02-13T10:23:40.670Z (over 1 year ago)
- Language: Python
- Size: 452 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Joystick Transform Plotter
==========================
A joystick transform function plotter for Python.
Maps controller input through an equation and plots it as either a 2d representation of a 3d graph or a 2d graph for a single axis.
Requires matplotlib
```Python
## examples
plot3d(mag)
def thresh(x, y, t):
if abs(x) < t:
x = 0
if abs(y) < t:
y = 0
return mag(x, y)
plot3d(lambda x, y: thresh(x, y, 0.25))
def square(x):
return x**2
plot2d(square)
plot2d(lambda x: x)
def thresh2(x, t):
if abs(x) < t:
return 0
return x
plot2d(lambda x: thresh2(x, 0.25))
```
## A linear transform over a single axis

## A square transform over a single axis

## A deadzone transform over a single axis

## A axial deadzone transform over both axes

## A radial deadzone transform over both axes

## A scaled radial deadzone transform over both axes
