proper triangle layout and dynamic resizing

resolves #77