電腦圖學
(1) 主題:寫檔、讀檔。
(2) 主題: 控制關節
(3) 主題: 動作內插
Step 1 - 寫程式開啟檔案
(圖一)
#include <stdio.h>
int main()
{
FILE * fp =fopen("output.txt","w+");
fprintf(fp,"Hello World!!");
printf("Hello World!!");
}
Step 2 - 使用變數開啟檔案
(圖二)
#include <stdio.h>
int main()
{
float angle=0,angle2=10,angle3=30;
FILE * fp =fopen("output.txt","w+");
fprintf(fp,"%.3f %.3f %.3f",angle,angle2,angle3);
}
Step 3- 結合
(圖三)




沒有留言:
張貼留言