一、心形
http://mathworld.wolfram.com/HeartCurve.html
#include<stdio.h> using namespace std; int main() { for (float y=1.5;y>-1.5;y-=0.1) //行 { for(float x=-1.5;x<1.5;x+=0.05) //列 { float a=x*x+y*y-1; putchar(a*a*a-x*x*y*y*y<=0.0?'*':' '); } putchar('\n'); } }
对上面第二个公式的画图。