For a design idea i needed to fill a prismatic volume with randomly distributed and sized objects. I did a few trigonometric calculations to derive x and y positions from to lines dividing two corners so that the crossover point always lays within the triangle.
maybe there are a more sophisticated way doing this, but it works.
Next step is to alter the triangle in size depending on the objects size, so that the object lays always within the volume. [done]
Now need to fix objects that pop out on top and bottom.
Final step would be some postcalculation to tune the overlaps and connections to make it 3D printable.