Triangle code