It may not be what you asked but here is my triangle function I used in one app
#constant green = MakeColor(0,255,0)
function createTriangleImage()
rem draw a triangle image used for the player sprite on radar
SetClearColor(0,0,0)
ClearScreen()
Render()
DrawLine(5,0,9,9,green,green)
DrawLine(1,8,8,8,green,green)
DrawLine(1,9,5,0,green,green)
//DrawLine(5,0,5,9,green,green)
//draw these if you want it filled
DrawLine(4,0,8,9,green,green)
DrawLine(0,9,8,9,green,green)
DrawLine(0,9,4,0,green,green)
DrawBox(4,1,6,8,green,green,green,green,1)
swap()
img = getimage(0,0,10,10)
SetImageTransparentColor(img,0,0,0)
endfunction img
it should be easy enough converted to what you are asking
fubar