ecofaber


Nameecofaber JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryPerform micro/macro 3D economic simulations
upload_time2023-09-07 23:41:51
maintainer
docs_urlNone
authorflokapi
requires_python>=3.9
licenseGPL-3.0-only
keywords simulation economics 3d stl opengl qt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Installation

## Linux

```shell
sudo apt-get install python3-pyqt5.qtopengl freeglut3-dev
pip3 install ecofaber
```

## Windows

```shell
pip3 install ecofaber
```





# Example

Example1.py

```python
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 

```shell
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, ...

![example_screenshot](img/example_screenshot.png)



Use the left click to move, the right click to rotate and scroll to zoom in/out.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ecofaber",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "simulation,economics,3D,stl,opengl,qt",
    "author": "flokapi",
    "author_email": "flokapi@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/45/12/0a5925b971c4be09644933b999909d255ff4d0e9af07ab452d9fb6a6148c/ecofaber-0.0.3.tar.gz",
    "platform": null,
    "description": "# Installation\n\n## Linux\n\n```shell\nsudo apt-get install python3-pyqt5.qtopengl freeglut3-dev\npip3 install ecofaber\n```\n\n## Windows\n\n```shell\npip3 install ecofaber\n```\n\n\n\n\n\n# Example\n\nExample1.py\n\n```python\nimport numpy as np\n\nimport ecofaber\nimport ecofaber.basemodel as bm\n\n\n@bm.register\nclass Model(bm.ModelElement):\n    def __init__(self, data=None):\n        super().__init__(data)\n\n        self.angle = 0\n\n    def update(self):\n        self.angle += 0.1\n\n    def getView(self):\n        view = []\n\n        view.append({\n            \"name\": \"b_cube_1\",\n            \"pos\": [10*np.cos(self.angle),10*np.sin(self.angle),0], \n            \"color\": [200,100,0],\n        })\n\n        view.append({\n            \"name\": \"b_ring_3\",\n            \"pos\": [0,0,0], \n            \"color\": [200,100,0],\n        })\n\n        return view\n\n    def getObj(self, pos):\n        return None\n\n\necofaber.launch(Model)\n```\n\n\n\nExecute the following code \n\n```shell\ngit clone git@github.com:flokapi/ecofaber.git\ncd ecofaber/example\npython3 example1.py\n```\n\n\n\nThis will open the application with the model. You can now start the simulation, control the speed, the view, ...\n\n![example_screenshot](img/example_screenshot.png)\n\n\n\nUse the left click to move, the right click to rotate and scroll to zoom in/out.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Perform micro/macro 3D economic simulations",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/flokapi/ecofaber/issues",
        "Documentation": "https://github.com/flokapi/ecofaber",
        "Homepage": "https://github.com/flokapi/ecofaber",
        "Source Code": "https://github.com/flokapi/ecofaber"
    },
    "split_keywords": [
        "simulation",
        "economics",
        "3d",
        "stl",
        "opengl",
        "qt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6903ae49d3022bc48075e7b28ef19a957f7eabdc2120fe199b66c133d8e9c35d",
                "md5": "8bd56c226a3c4f6c02cada04b9f62cdf",
                "sha256": "1ac90fd8dd65d545712709d7d15b7b6f25be0a8e89927a27762d7eeee4f3729b"
            },
            "downloads": -1,
            "filename": "ecofaber-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8bd56c226a3c4f6c02cada04b9f62cdf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 24182,
            "upload_time": "2023-09-07T23:41:49",
            "upload_time_iso_8601": "2023-09-07T23:41:49.882836Z",
            "url": "https://files.pythonhosted.org/packages/69/03/ae49d3022bc48075e7b28ef19a957f7eabdc2120fe199b66c133d8e9c35d/ecofaber-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45120a5925b971c4be09644933b999909d255ff4d0e9af07ab452d9fb6a6148c",
                "md5": "540a2d03dc2ef8101bece9e23cbd0e7b",
                "sha256": "9ed3d92da7b43b9ec293075e9a2d218db8b37d8a5d5a98c3e9924aae676842f1"
            },
            "downloads": -1,
            "filename": "ecofaber-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "540a2d03dc2ef8101bece9e23cbd0e7b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24208,
            "upload_time": "2023-09-07T23:41:51",
            "upload_time_iso_8601": "2023-09-07T23:41:51.936825Z",
            "url": "https://files.pythonhosted.org/packages/45/12/0a5925b971c4be09644933b999909d255ff4d0e9af07ab452d9fb6a6148c/ecofaber-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-07 23:41:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flokapi",
    "github_project": "ecofaber",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ecofaber"
}
        
Elapsed time: 0.11999s