学校の自由課題で円に沿ったsinカーブを描きたいのですがsinカーブを円の形に曲げれません。
どうかご指南お願いいたします
#include <stdio.h>
#include <math.h>
#include <eggx.h>
#define PI 3.141592
#define COLOR 10000
int main() {
int x, win;
int color = 2 * COLOR;
double r, y;
win=gopen(400,400); //描画ウィンドウを開く
winname(win, "sample 1"); //名前をつける
for(r = 0; r <= 2 * PI; r += 0.0001) {//円を描く
if (color > 8 * COLOR)//色を戻す
color = 2 * COLOR;
x = 190 * cos(r);//描く式
y = 10 * sin(r*20);
newpen(win, color / COLOR);//色指定
pset(win, x + 200.0, y + 200.0);
color++;
}
ggetch(); //キー入力を待つ
gclose(win); //描画ウィンドウを閉じる
return 0;
}