How to compute non-repeatable vertices for a Cube

17 Views Asked by At

Given 8 edge vertices, how can I compute the vectors of the points in-between all of them using maths ?

For example, I have a density, which is how many points should be added between all sections, so if that is 2 and my edges are at (1, 0, 1) and (-1, 0 ,1), they are going to be somewhere around (0.33, 0, 1) and (-0.33, 0, 1).

How can I compute all these coordinates given a density N and the initial 8 vertices.