

This is another example using the Voronoi diagram, but this time in the 3rd dimension. Each class has corresponding labels which are rotated toward the camera by a Locked Track Constraint. Additionally each collection of shapes in a class has different materials assigned to them. The data set is loaded into the scene as a 3D scatter plot with different shape primitives for each class of flower from the BMesh Operators. append( label) idx += 1 y = idx - 1 # Reduce components by implemented Principal Component Analysis X = PCA( X, 3) # Create target vector y and corresponding labels labels, idx =, 0 for i, label in enumerate( iris_data): genfromtxt( path, dtype = 'str', delimiter = ',') In order to create a material for the tetrahedron the material is assigned as shown here: in Blender which I show in this quick tutorial. This is an example for a fractal tetrahedron, where each tetrahedron is subdivided into smaller pieces with a recursive function. This is a collection of simple to more involved examples to scripting in Blender with Python. The steps to use Anaconda as the Interpreter in Blender 2.77 are shown in this solution. The Voronoi diagram is implemented with the module scipy.spatial which can be added with Scipy, or can be found in the Python distribution Anaconda. This is a more advanced example for using a Voronoi diagram.

Generate random metaballs in Blender inspired by this tutorial. The function createSurface(surface, n, m) can be also used for other parameterizations such as surfaces of revolution or other parametric surfaces. In parametric_torus.py, the function torusSurface(r0, r1) returns the surface parameterization function for a torus which is then used in createSurface(surface, n, m) as the first argument, which creates the object from a n by m grid.

Where the values u, v are between 0 and 1 and are then mapped to x, y, z coordinates.
#Blender tutorial python code
Line of code 2 creates a simple Plane, on which the Cubes.
#Blender tutorial python how to
The torus is created with the following parameterization of a grid of the variables u, v (If youre completely new to Blender Python, click here to find out how to copy-paste the code.). primitive_ico_sphere_add( subdivisions = 4, location =( 0, 0, 0))
