Yes, I recall writing something like that, but I don't recall posting it. If you saw it, then I did. Someday soon, I'll have to go download all that Yahoo Maple stuff. I haven't looked at it in many years.
The gist of code in question, IIRC, is that if
for integers p, q, m, n with q = 1, 5, 7, or 11, then the trig functions of θ can be expressed in (complex) radicals. I can't recall if my code handled every case.
The case q = 11 is quite interesting because it involves solving a quintic. I wonder if there are higher values of q for which the polynomial is solvable (even though Maple can't solve it). Does anyone here know? For q odd, the polynomial to solve for is of the form where degree(p) = (q-1)/2 and all the roots are real and in (0,1).
What if q is a Fermat prime? For q=17, that polynomial is degree 8. Maple should be able to compute the galois group, but I don't know how to interpret the results. Seems like there should be a connection between this and Gauss's proof of the compass-and-straight-edge constructability of a regular n-gon when n is a Fermat prime. (Gauss's wanted his tombstone to be engraved with a regular 17-gon.)