tags:

views:

74

answers:

1

Is there a way with PHP GD to draw a star using imagefilledpolygon?

Where would the points be plotted?

I believe it involves sine and cosine because...

alt text

How can I relate those points to the center using sine and cosine in GD?

+3  A: 

yes. I suggest you read that manual entry you yourself supplied, as it tells you exactly what you need to do. It even gives an example of a 3-point star, and there's even an example in the user notes of a 5-sided star.

Crayon Violent