Return to circle-dda.rr CVS log | Up to [local] / OpenXM / src / cfep / Samples |
1.1 ! takayama 1: import("glib3.rr"); ! 2: Glib_math_coordinate=1; ! 3: glib_window(-2,-2, 2,2); ! 4: glib_clear(); ! 5: E = 0.1; ! 6: C1 = 1.0; C2=1.0; ! 7: S1 = 0.0; S2=E; ! 8: for (T=0; T<=deval(2*@pi); T = T+E) { ! 9: C3 = 2*C2-C1-E*E*C2; ! 10: S3 = 2*S2-S1-E*E*S2; ! 11: glib_line(C1,S1, C2,S2); ! 12: C1=C2; S1=S2; ! 13: C2=C3; S2=S3; ! 14: glib_flush(); ! 15: }