Calculate triangle field and input dialog