Added tri3, tr4 & diamond functions.