mchmara: Added triangle input function.