Python code to efficiently generate 3D supershapes with optional Blender support.
Project description
supershape
Python code to efficiently generate 3D SuperShapes.
3D SuperShapes are a family of parametric surfaces that can take on a variety of shapes depending on the parametrization. The following snippet creates 3D coordinates of a flower-like object
import supershape as sshape
x,y,z = sshape.supercoords(
# m, a, b, n1, n2, n3 (1x6 or 2x6)
[7, 1, 1, 0.2, 1.7, 1.7],
# u,v resolution
shape=(50,50)
)
To reproduce the above result, run
python -m supershape
Install
Via pip
pip install supershape
Blender support
Add the cloned folder path to your PYTONPATH
, then launch Blender (>=v2.8) as follows
blender --python-use-system-env --python scripts\blender_demo.py
to get
To avoid modifying your PYTHONPATH
, you can may install supershape
into the Blender Python environment. See this script for example.
Releases
Tags on master are pushed as releases to PyPi.
- Version bump
- Commit push and await build result.
git tag <tagname> -a
git push origin --tags
Or create the tag throuh theReleases
page in github.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for supershape-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c7cf783ae739b21f49fcb650874989524ffae05a4f0cf1be1cf130b6a685759 |
|
MD5 | b47823e0530bd798c469e3669ce63a34 |
|
BLAKE2b-256 | 706aa82b73dee34e56d0af6c314e5085855d2b860a6a0f02157fe16ab869f633 |