OpenGL with SFML, create an n-pointed star? Completely stuck on how to do this. Yes, it is a homework problem, but its the first we've had in the class so not too familiar with graphics. Also, seeing as its homework, please don't just give the answer, just some pointers in the right direction would be great.

I've tried to do it as a triangle fan, and as a polygon but that just ends up in really weird shapes.
Try starting at the origin, then dividing 360 degrees by n to find some useful angles for the points of your star.
I hope this drawing will help you to find a solution.


Now that you have the angle theta, and the values of alpha and x are chosen by you, you have the tools to calculate all required vertices to make the star using trigonometry.