Create a mesh and color it according to its normal direction.
- load a mesh, e.g. the stanford bunny
- iterate over the vertices of the mesh, and get the normal direction of the vertex using the
mesh.vertex_normal
method - use
try
andexcept
to catch theValueError
exception when the vertex has no valid normal direction
Create a mesh and deform it using attractors. Color the mesh according to the distance to the attractors.
- start with a sphere
- create a few points in space
- iterate over the vertices of the mesh, and move them according to the distance to the attractor points