added experimental connections between triangles, updated cpu with distance clamping