工程下载
http://pan.baidu.com/s/1o7OEMc6
tcddd.rar
此处为在Windows下运行的TC图形程序;使用了EasyX库;
EasyX库可参考:
http://blog.csdn.net/bcbobo21cn/article/details/51207782
http://www.easyx.cn
代码参考
http://blog.sina.com.cn/s/articlelist_1287275024_9_1.html
一 三维透视投影变换算法
#include <math.h>
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
void draw(float z[][4],float xt0,float yt0,float ts0);
void matrix(float t[][4]);
#define N 22
float p[N][4]={
{45,30,0,1},{27,30,0,1},{27,30,10,1},{18,30,10,1},
{18,30,0,1},{0,30,0,1},{0,30,15,1},{45,30,15,1},
{45,30,0,1},{45,0,0,1},{45,0,15,1},{45,15,27,1},
{0,15,27,1},{0,30,15,1},{45,30,15,1},{45,15,27,1},
{45,10,15,1},{45,10,5,1},{45,20,5,1},