谢尔宾三角形
绘图库:Easy Graphics Engine (EGE)
编程语言:c++
代码:
#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <time.h>
const double pi = 3.1415926536;
struct Point
{
double x;
double y;
};
Point Rotate(Point p1, Point p2, double A)
{
Point r;
r.x = p1.x + (p2.x - p1.x) * cos(A)