李萨如曲线
Lissajous曲线
原理:参数方程parameter equation的绘制
绘图库:Easy Graphics Engine (EGE)
编程语言:c++
表达式
x=a*sin(p*t) y=b*cos(q*t+u) ( 0 < u < pi/(2*p) )
x=sin(2t) y=cos(3t+pi/2)
代码:
#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define pi 3.1415926
double xt(double t)
{
return sin(2*t);
}
double yt(double t)
{
return cos(3*t+pi/2);
}