Posts

Showing posts with the label C Graphics Program For 3D Transformation

C Graphics Program For 3D Transformation

Image
C Graphics Program For 3D Transformation Source Code:- 1:  //Program to implement 3D Transformation   2:  #include<math.h> 3:  #include<stdio.h> 4:  #include<process.h> 5:  #include<iostream.h> 6:  #include<conio.h> 7:  #include<graphics.h> 8:  #include "grplib.h" 9:  #define X 0 10:  #define Y 1 11:  int getx(float mat[4][1]) 12:       { 13:       return ceil(mat[0][0]); 14:       } 15:  int gety(float mat[4][1]) 16:       { 17:       return ceil(mat[1][0]); 18:       } 19:  int getz(float mat[4][1]) 20:       { 21:       return ceil(mat[2][0]); 22:       } 23:  void create_mat_pnt(float mat[4][1],int x,int y,int z) 24:       { 25:       mat[0][0]=x; 26:      ...