next up previous contents index
Next: disc Up: Reference Previous: area   Contents   Index

circle

$ \bigcirc$Name


circle build a circle (Dlist)




$ \bigcirc$Command Synopsis


circle [-r r] [-n n] out



-r r : circle radius (default: 1.0)

-n n : number of points (default: 100)

out : output circle (Dlist)




$ \bigcirc$Function Summary


Dlist circle (out , r , n )

Dlist out ;

double *r ;

int *n ;




$ \bigcirc$Description


This module builds a Dlist containing a regular sampling with n points of a circle of radius r :

Pk = $\displaystyle \left(\vphantom{\begin{array}l r\cos(\frac{2\pi k}n)\\
r\sin(\frac{2\pi k}n)\end{array}}\right.$$\displaystyle \begin{array}l r\cos(\frac{2\pi k}n)\\
r\sin(\frac{2\pi k}n)\end{array}$$\displaystyle \left.\vphantom{\begin{array}l r\cos(\frac{2\pi k}n)\\
r\sin(\frac{2\pi k}n)\end{array}}\right)$,        k = 0, 1..n.

The resulting curve is closed: its first and last points have exactly the same coordinates.




$ \bigcirc$Version 1.0


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: disc Up: Reference Previous: area   Contents   Index
mw 2004-05-05