I have a cloud of 3D points ("colors.csv") and a code that generates its convex hull:
#loading cloud of points
points = np.array([(XYZRGB(rank, name, X, Y, Z))
for rank, name, X, Y, Z in csv.reader(open('colors.csv'))])
#doing geometry
hull = points[tri.convex_hull]
print hull
with print hull
i get a series of triangles defined by 3 points:
[[['5' 'PINKwB' '74.62792193' ..., '239' '212' '240']
['15' 'TUwC' '74.43151414' ..., '208' '242' '247']
['25' 'OR0B' '80.01931102' ..., '255' '215' '190']]
...,
[['29' 'gY6B' '9.473696537' ..., '32' '134' '39']
['16' 'K2M' '13.46800615' ..., '150' '30' '46']
['31' 'gY6D' '35.53944758' ..., '176' '187' '0']]]
Each point is a color, defined by a rank, a name, XYZ coordinates in 3D space and RGB color.
I would like to create a 2D map (a diagram) representing the relations between the vertices of the triangles. For example, I would start with the first triangle of the list, plot its 3 points, draw its edges, then add a further point to draw a second triangle, etc. Until I plot the last point.
I don't care the real distances between the points, I just want a map representing real connexions between them. Is there any standard way to do this?
thanks