正弦曲线迷茫中,大家帮帮忙,该如何解决

正弦曲线迷茫中,大家帮帮忙
之前关于EVC下图形编程画二维曲线问题已经有了进展,现在刚画出简单的二维曲线,就是随机折线那样的,主要通过两个随机数nRandomX   =   rand()   %   10;nRandomY   =   rand()   %   10;
主要代码如下:
BOOL   CDraw2DGraphDlg::OnInitDialog()
{
CDialog::OnInitDialog();

//   Set   the   icon   for   this   dialog.     The   framework   does   this   automatically
//     when   the   application 's   main   window   is   not   a   dialog
SetIcon(m_hIcon,   TRUE); //   Set   big   icon
SetIcon(m_hIcon,   FALSE); //   Set   small   icon

CenterWindow(GetDesktopWindow()); //   center   to   the   hpc   screen

//   TODO:   Add   extra   initialization   here
CRect   rect;
rect.left   =   10;
rect.top   =   10;
rect.right   =   220;
rect.bottom   =   160;
//创建曲线控件实例
m_2DGraph.Create(_T( " "),_T( " "),WS_VISIBLE|WS_CHILD,rect,this,0,NULL);

m_pointCount   =   0;
//启动添加点计时器
SetTimer(1,400,NULL);

return   TRUE;     //   return   TRUE     unless   you   set   the   focus   to   a   control
}


//定时给曲线添加点
void   CDraw2DGraphDlg::OnTimer(UINT   nIDEvent)  
{
//   TODO:   Add   your   message   handler   code   here   and/or   call   default
int   nRandomY,   nRandomX;

//产生一个1~10的随机数
nRandomX   =   rand()   %   10;
nRandomY   =   rand()   %   10;

//如果曲线点数大于10个点,则删除第一个点
if(m_pointCount   >   10)
{
m_2DGraph.DeleteFirstPoint();
m_pointCount--;
}
//给曲线添加点
m_2DGraph.AppendPoint(nRandomX,   nRandomY);

m_pointCount++;

CDialog::OnTimer(nIDEvent);

}
可我的目标是画滚动正弦曲线,不知道应该用什么函数怎么画,知道正弦是sin,但怎么用完全不了解,请大家帮忙想想喔,给我思路和一些代码,不胜感激感谢!(*^__^*)

------解决方案--------------------
这个算是你编的吗? 哈哈~~

sin函数好像只能用直线模拟,例如一个pi下划分N个点(N越大越精细),然后计算N个点的坐标(N越大越计算越慢),然后是PolyLine实现
------解决方案--------------------
用C语言求Sin等三角函数
用C语言来求SIN等三角函数就要用到math.h中的SIN等数学运算命令.
请见以下几个函数的用法:

函数名: sin
功 能: 正弦函数
用 法: double sin(double x);
程序例:
#include <stdio.h>
#include <math.h>
int main(void)
{
double result, x = 0.5;
result = sin(x);
printf( "The sin() of %lf is %lf\n ", x, result);
return 0;
}