j: triangle solver