Skip to main content

Python plotting library for Blender

Project description

blendfig

Overview

blendfig is a Python module to be used with the 3D modeling software Blender. With blendfig you can create surface plots in Blender similarly to the usual Python plotting libraries such as plotly and matplotlib. You can then use Blender's powerful shading, modeling etc. features to create beautiful plots and animations.

Installation

python -m pip install blendfig

Blender comes with its own Python installation so make sure you are using Blender's Python binary. On Windows it is located at C:\Program Files\Blender Foundation\Blender <version>\<version>\python\bin\python.exe by default (you may need to run as administrator).

Usage

Syntax is similar to that of plotly.

import blendfig as bf
import numpy as np

x, y = np.mgrid[-1:1:51j, -1:1:51j]
z =(x**2+y**2-1)**2

fig = bf.Figure()
fig.add_trace(bf.Surface(x=x, y=y, z=z))
fig.create()

Example

And after some simple shading After shading

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blendfig-0.0.1.tar.gz (153.2 kB view hashes)

Uploaded Source

Built Distribution

blendfig-0.0.1-py3-none-any.whl (154.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page