Make the origin of coords be the center of the triangle. Also, don't hardcode a side length of 4 in code generation logic. It's now controlled by the 's' variable