Installation
Linux
sudo apt-get install python3-pyqt5.qtopengl freeglut3-dev
pip3 install ecofaber
Windows
pip3 install ecofaber
Example
Example1.py
import numpy as np
import ecofaber
import ecofaber.basemodel as bm
@bm.register
class Model(bm.ModelElement):
def __init__(self, data=None):
super().__init__(data)
self.angle = 0
def update(self):
self.angle += 0.1
def getView(self):
view = []
view.append({
"name": "b_cube_1",
"pos": [10*np.cos(self.angle),10*np.sin(self.angle),0],
"color": [200,100,0],
})
view.append({
"name": "b_ring_3",
"pos": [0,0,0],
"color": [200,100,0],
})
return view
def getObj(self, pos):
return None
ecofaber.launch(Model)
Execute the following code
git clone git@github.com:flokapi/ecofaber.git
cd ecofaber/example
python3 example1.py
This will open the application with the model. You can now start the simulation, control the speed, the view, ...
Use the left click to move, the right click to rotate and scroll to zoom in/out.
Metadata
Release files for ecofaber 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecofaber-0.0.3.tar.gz | 24.2 kB | Without provenance | Details for ecofaber-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecofaber-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for ecofaber-0.0.3-py3-none-any.whl |
Total release size: 48.4 kB
Release files / ecofaber-0.0.3.tar.gz
| Download URL | ecofaber-0.0.3.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ed3d92da7b43b9ec293075e9a2d218db8b37d8a5d5a98c3e9924aae676842f1
|
|
BLAKE2b-256 checksum How to use checksums |
45120a5925b971c4be09644933b999909d255ff4d0e9af07ab452d9fb6a6148c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / ecofaber-0.0.3-py3-none-any.whl
| Download URL | ecofaber-0.0.3-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ac90fd8dd65d545712709d7d15b7b6f25be0a8e89927a27762d7eeee4f3729b
|
|
BLAKE2b-256 checksum How to use checksums |
6903ae49d3022bc48075e7b28ef19a957f7eabdc2120fe199b66c133d8e9c35d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for ecofaber 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.