1 #-----------------------------------------------------------
2 # Test of the python interpreter and use of animation in
3 # xcircuit. Execute this script using menu option
4 # "File/Execute Script", if Python has been compiled in.
5 #-----------------------------------------------------------
7 from math
import pi
,sin
,cos
10 d
= {"position": (x
, y
)}
15 d
= {"radius": r
, "minor axis": r
, "position": (x
, y
)}
24 step
= 2 * pi
/ (nsteps
- 1)
30 h1
= newarc(x
, y
, 100)
31 h2
= newarc(x2
, y2
, 85)
34 for i
in range(0,nsteps
):
37 x
= int(round(bigrx
* sin(i
* step
)))
38 y
= int(round(bigry
* cos(i
* step
)))
48 #-----------------------------------------------------------