https://github.com/eqs/pyof-prototype
A prototype of Python binding of openFrameworks
https://github.com/eqs/pyof-prototype
creative-coding openframeworks python
Last synced: about 1 month ago
JSON representation
A prototype of Python binding of openFrameworks
- Host: GitHub
- URL: https://github.com/eqs/pyof-prototype
- Owner: eqs
- Created: 2020-04-13T15:48:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T14:42:26.000Z (about 6 years ago)
- Last Synced: 2025-03-29T17:34:15.136Z (about 1 year ago)
- Topics: creative-coding, openframeworks, python
- Language: C++
- Size: 12.8 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prototype of openFrameworks for Python
* **This repository is not an official openFrameworks repository.**
* Only part of functions of openFrameworks are implemented.
## Link
* (in Japanese) openFrameworksのアプリケーションをPythonのライブラリとして呼び出す実験|eqs|note
* https://note.com/eqs/n/n0edb73ac1383
* guoguofish/pyOF: Python binding for openFrameworks
* https://github.com/guoguofish/pyOF
## Examples
### `example1.py`: Simple Animation

```python
import sys
import numpy as np
sys.path.append('../bin')
import pyof as of
class ofApp(of.ofPyBaseApp):
def setup(self):
of.ofSetWindowTitle('Hello, openFrameworks!')
self.x = 0.0
self.y = 0.0
def update(self):
t = of.ofGetFrameNum()
self.x = 200 + 100 * np.cos(t * 0.1)
self.y = 200 + 100 * np.sin(t * 0.1)
def draw(self):
of.ofDrawCircle(self.x, self.y, 40)
if __name__ == '__main__':
app = ofApp()
app.run(400, 400, of.OF_WINDOW)
```
### `example2.py`: Numpy SIMD operations and Scipy Functions

### `example3.py`: Machine Learning Package (GPy)

GPy: https://sheffieldml.github.io/GPy/
## Usage
### Requirements
* Visual Studio 2017
* oF v0.11.0
* Python 3.7
* pybind11 2.4.3
### Build `pyof`
1. Set a path to your python to env `PYTHONPATH`
2. Put this project into `/apps/myApps`
3. Open `pyof.sln` and run build