from itertools import chain

import matplotlib.pyplot as plt

from mpl_toolkits.mplot3d import Axes3D

triangles = [

((1, 1, 1), (2, 2, 2), (1, 3, 4)),

((2, 3, 4), (9, 9, 9), (3, 4, 5)),

]

# Convert the list of triangles into a "flat" list of points

tri_points = list(chain.from_iterable(triangles))

# Get the X, Y and Z coordinates of each point

x, y, z = zip(*tri_points)

# Make list of triangle indices ([(0, 1, 2), (3, 4, 5), ...])

tri_idx = [(3 * i, 3 * i + 1, 3 * i + 2) for i in range(len(triangles))]

# Make 3D axes

ax = plt.figure().gca(projection='3d')

# Plot triangles

ax.plot_trisurf(x, y, z, triangles=tri_idx)