// 程序:无限循环几何
// 作者:meijinming123456
// 编译环境:Visual C++ 6.0,EasyX_20210730
// 编写日期:2022-1-23
// 头文件
#include<graphics.h>
#include<conio.h>
#include<math.h>
/ 绘制的高度和宽度 /
#define Width 640
#define Height 480
#define N 8
const double PI = acos(-1.0);
// 记录三维点的坐标
struct point3d
{
double x;
double y;
double z;
};
// 记录正交投影后绘图时的坐标
struct point2d
{
int x;
int y;
};
// 数据初始化,初始状态
void init_start(point3d Point1[N], point3d Point2[N], point3d Point3[N])
{
Point1[0].x = -3; Point1[0].y = -3; Point1[0].z = -3;
Point1[1].x = -3; Point1[1].y = -3; Point1[1].z = 3;
Point1[2].x = -3; Point1[2].y = 3; Point1[2].z = 3;
Point1[3].x = 3; Point1[3].y = 3; Point1[3].z = 3;
Point1[4].x = 3; Point1[4].y = 3; Point1[4].z = -3;
Point1[5].x = 3; Point1[5].y = -3; Point1[5].z = -3;
Point1[6].x = -3; Point1[6].y = 3; Point1[6].z = -3;
Point1[7].x = 3; Point1[7].y = -3; Point1[7].z = 3;
Point2[0].x = -2; Point2[0].y = -2; Point2[0].z = -2;
Point2[1].x = -2; Point2[1].y = -2; Point2[1].z = 2;
Point2[2].x = -2; Point2[2].y = 2; Point2[2].z = 2;
Point2[3].x = 2; Point2[3].y = 2; Point2[3].z = 2;
Point2[4].x = 2; Point2[4].y = 2; Point2[4].z = -2;
Point2[5].x = 2; Point2[5].y = -2; Point2[5].z = -2;
Point2[6].x = -2; Point2[6].y = 2; Point2[6].z = -2;
Point2[7].x = 2; Point2[7].y = -2; Point2[7].z = 2;
Point3[0].x = -1; Point3[0].y = -1; Point3[0].z = -1;
Point3[1].x = -1; Point3[1].y = -1; Point3[1].z = 1;
Point3[2].x = -1; Point3[2].y = 1; Point3[2].z = 1;
Point3[3].x = 1; Point3[3].y &#
用【easyx库】画无限循环的几何体
最新推荐文章于 2023-05-03 21:29:54 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)