how to draw lines with different colors

I want to write a function called DrawLineSegments.This function must change the color of lines at every corner where the corner angle is greater than 60 deg (Assume that there is a function called checkangle). The color sequence must be black, red, green, blue, and repeat this sequence after the fourth color.

Could anyone give me a prototype about how to make this happen?
I'm not at a PC right now, so no code, but you can write it really enough yourself.Use the Law of Cosines.

Good luck!
Topic archived. No new replies allowed.