¥sAutoCAD ¦Û°Ê µe¹Ïªº ½d¨Ò«°¥«
- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
¥sAutoCAD ¦Û°Ê µe¹Ïªº ½d¨Ò«°¥«
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- // ----------------------------------------------
- #define pi (4.0*atan(1.0))
- // ----------------------------------------------
- int main(int argc, char *argv[])
- {
- // plot y= sin(x), x= 0 to pi
- double x1= 0.0, x2= pi, x, y, dx;
- int no= 16;
- FILE *f1;
-
- // for x= x1 to x2 step dx do ...
- dx= (x2 - x1)/no;
- x2+= dx/10.0;
- x= x1;
-
- f1= fopen("XXX.SCR", "wt");
- fprintf(f1, "spline\n");
- while (x <= x2) {
- y= sin(x);
- fprintf(f1, "%.6lf,%.6lf\n", x, y);
-
- x+= dx;
- }
- fprintf(f1, "\n\n\n");
- fclose(f1);
-
- system("PAUSE");
- return 0;
- }
½Æ»s¥N½X |
|
¤Ñ¤U¬°¤½
|
|
|
|
|