Code for the spin 1 triangular ising model