https://github.com/lukasdrsman/vis3dvf
Derivative of vis3dpy, vector field visualizer
https://github.com/lukasdrsman/vis3dvf
math plot plotting plotting-in-python python python-library python3 vector vector-field vector-fields vectors visualization visualizer
Last synced: 4 days ago
JSON representation
Derivative of vis3dpy, vector field visualizer
- Host: GitHub
- URL: https://github.com/lukasdrsman/vis3dvf
- Owner: LukasDrsman
- License: unlicense
- Created: 2021-12-31T11:59:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T17:56:55.000Z (over 1 year ago)
- Last Synced: 2025-03-02T17:17:28.023Z (8 months ago)
- Topics: math, plot, plotting, plotting-in-python, python, python-library, python3, vector, vector-field, vector-fields, vectors, visualization, visualizer
- Language: Python
- Homepage: https://pypi.org/project/vis3dvf
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vis3dvf
![]()
## Dependencies
- `pygame`
- `PyOpenGL`
- `PyOpenGL_accelerate`## Quickstart
A simple example of a time-dependent vector field can be found in the `example.py` file. To quickstart this example, run:
```sh
pip install vis3dvf # installs vis3dvf (and dependencies)
git clone https://github.com/LukasDrsman/vis3dvf.git # fetches repo with example.py
cd vis3dvf
python3 example.py # runs example.py
```## Usage
### `vis3dvf.plot.Figure(window width, window height)`
- Figure constructor, necessary for rendering.
- "Public" methods:
- `add(plot)` - adds *plot* object to the render que (*plot* object must have an implemented `render()` method)
- `show()` - creates a window and starts rendering### `vis3dvf.vectorfield.VectorField(u, v, w, density)`
- Static vector field plot object constructor
- Parameters:
- `u = u(x,y,z)` - the x component of the vector field at (x,y,z) (function)
- `v = v(x,y,z)` - the y component of the vector field at (x,y,z) (function)
- `w = w(x,y,z)` - the z component of the vector field at (x,y,z) (function)### `vis3dvf.vectorfield.VectorFieldT(u, v, w, density, initial time, final time, time delta)`
- Time-dependent vector field plot object constructor
- Parameters:
- `u = u(x,y,z,t)` - the x component of the vector field at (x,y,z) and time t (function)
- `v = v(x,y,z,t)` - the y component of the vector field at (x,y,z) and time t (function)
- `w = w(x,y,z,t)` - the z component of the vector field at (x,y,z) and time t (function)