Sorry David, the minute you called the polar function you started using the trig functions and you're still calculating all the points. Same for Lee. Here's a couple of more ideas to think about. First consider all N divisible by 4. We can calculate the first N/4 points and use the perpdot operator to get the 2nd quadrant. After that we can then reflect all of the points by changing signs. Doing it this way cuts our use of trig to only a quarter of the points.
;rotate a point by 90 degrees relative to a base point
(defun r90 (bpt p)
(setq p (mapcar '- p bpt)) ;regularize to the base point
(setq p (list (- (car p))(cadr p))) ;rotate by 90
(mapcar '+ bpt p) ;return to true coordinates
)
;Change the sign of a number or point
(defun chs (x)(if (listp x)(mapcar '- x)(- x)))
;Remember, this only works for N divisible by 4
(defun mod4-circle-points (cp r n sa / ca cnt ptlist 2nd half)
(setq ca (/ (+ pi pi) n))
(setq cnt 0)
(repeat (/ n 4)
(setq 1st (cons (polar cp (+ (* cnt ca) sa) r) 1st))
(setq cnt (1+ cnt))
)
(setq 2nd (mapcar 'r90 1st))
(setq half (append (reverse 1st)(reverse 2nd)))
(append half
(reverse (mapcar 'chs half)))
)
But this is not the end! I was reading through Graphics Gems one night and found an algorithm that calculated points by only calculating the sine and cosine of the first point. Since the incrementing angle is constant one can calculate the sine and cosine of the next point by using arithmetic only. Unfortunately, when I was scanning through the code I forgot where I was at and haven't been able to relocate it again! I will try to find it again and convert it to Autolisp unless someone else is aware of the technique.