Adjusting centre points

Does anyone know how to adjust he center points of a polygon?
I want to able able to adjust the distance of the centres, so i can vary the distance between the two triangles vertically such as in the example image:


image

here is the script from grasshopper