Windows 7 Ultimate SP1 32bit
Visual C++ 2010
DXライブラリ
8の字の移動を行いたいのですが、なかなかいい方法が思いつきません。
8の字の交差部分を原点として、ぐるぐると回したいだけなのですが・・・
//xyが描画座標、baseが原点
static double x, y, baseX, baseY;
static double ang = 0
static int flame = 0;
if( flame == 0 ){
baseX = 100;
baseY = 100;
}
//cos2とかはcosのDeg版
x = baseX + 100 * cos2( ang );
y = baseY + 200 * sin2( ang );
flame ++;
ang ++;
回転移動はある程度理解できたのですが、8の字となると思いつきません;;
何かアドバイスをいただけると幸いです。