Source Codes

Circuit Icon

3D Landmark

Icon

#include "Z.h"
#include 
#include  
#include 
#include 
#define PI 3.1415
			
		int AxeZ( int ZOx, int ZOy, int ZCerRotxRad, int ZCerRotyRad, int ZPourcX, int ZPourcY, int ZTailleAxey )
		{
			/* Defining variable values */
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
				/**//* for the X axis */
				/**/	int ZXclr = COLOR( 205, 16, 26 );	//	color (red) of X-axis components
				/**/	int ZXclrf = COLOR( 213, 17, 27 );	//	color (D red) of X-axis components
				/**/	/* upper component (leading line) of the X axis */
				/**/		int ZXx1CompoSup = ZOx+cos((0)*0.02*PI)*(ZOx-ZCerRotxRad*cos((25+ZPourcX)*0.02*PI)-ZOx);
				/**/		int ZXy1CompoSup = ZOy+cos((0)*0.02*PI)*(ZOy-0*ZCerRotyRad*sin((25+ZPourcX)*0.02*PI)-ZOy)-sin((0)*0.02*PI)*(ZTailleAxey);
				/**/		int ZXx2CompoSup = ZOx ;
				/**/		int ZXy2CompoSup = ZOy ;
				/**/	/* lower component (tail line) of the X axis */
				/**/		int ZXx1CompoInf = ZOx+cos((50)*0.02*PI)*(ZOx-ZCerRotxRad*cos((25+ZPourcX)*0.02*PI)-ZOx);
				/**/		int ZXy1CompoInf = ZOy+cos((50)*0.02*PI)*(ZOy-0*ZCerRotyRad*sin((25+ZPourcX)*0.02*PI)-ZOy)-sin((50)*0.02*PI)*(ZTailleAxey);
				/**/		int ZXx2CompoInf = ZOx ;
				/**/		int ZXy2CompoInf = ZOy ;
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
				/**//* pour l'axe Y */
				/**/	int ZYclr = COLOR( 22, 114, 50 );	//	color (green) of the Y axis components
				/**/	int ZYclrf = COLOR( 22, 118, 51 );	//	color (D green) of the Y axis components
				/**/	/* upper component (leading line) of the Y axis */
				/**/		int ZYx1CompoSup = ZOx+cos((50+ZPourcY)*0.02*PI)*(ZOx-ZCerRotxRad*cos(ZPourcX*0.02*PI)-ZOx);
				/**/		int ZYy1CompoSup = ZOy+cos((50+ZPourcY)*0.02*PI)*(ZOy+0*ZCerRotyRad*sin(ZPourcX*0.02*PI)-ZOy)-sin((50+ZPourcY)*0.02*PI)*(ZTailleAxey-0*ZCerRotyRad);
				/**/		int ZYx2CompoSup = ZOx ;
				/**/		int ZYy2CompoSup = ZOy ;
				/**/	/* lower component (tail line) of the Y axis */
				/**/		int ZYx1CompoInf = ZOx+cos((0+ZPourcY)*0.02*PI)*(ZOx-ZCerRotxRad*cos(ZPourcX*0.02*PI)-ZOx);
				/**/		int ZYy1CompoInf = ZOy+cos((0+ZPourcY)*0.02*PI)*(ZOy+0*ZCerRotyRad*sin(ZPourcX*0.02*PI)-ZOy)-sin((0+ZPourcY)*0.02*PI)*(ZTailleAxey-0*ZCerRotyRad);
				/**/		int ZYx2CompoInf = ZOx ;
				/**/		int ZYy2CompoInf = ZOy ;
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
			
				/* for the Z axis */
						Zclr = COLOR( 0, 0, 201 );	//	color (blue) of Z axis components
						Zclrf = COLOR( 4, 4, 255 );	//	color (D blue) of the Z axis components
					/* upper component (leading line) of the Z axis */
						Zx1CompoSup = ZOx+cos((25+ZPourcY)*0.02*PI)*(ZOx-ZCerRotxRad*cos(ZPourcX*0.02*PI)-ZOx);
						Zy1CompoSup = ZOy+cos((25+ZPourcY)*0.02*PI)*(ZOy+0*ZCerRotyRad*sin(ZPourcX*0.02*PI)-ZOy)-sin((25+ZPourcY)*0.02*PI)*(ZTailleAxey-0*ZCerRotyRad);
						Zx2CompoSup = ZOx ;
						Zy2CompoSup = ZOy ;
					/* lower component (tail line) of the Z axis */
						Zx1CompoInf = ZOx+cos((75+ZPourcY)*0.02*PI)*(ZOx-ZCerRotxRad*cos(ZPourcX*0.02*PI)-ZOx) ;
						Zy1CompoInf = ZOy+cos((75+ZPourcY)*0.02*PI)*(ZOy+0*ZCerRotyRad*sin(ZPourcX*0.02*PI)-ZOy)-sin((75+ZPourcY)*0.02*PI)*(ZTailleAxey-0*ZCerRotyRad);
						Zx2CompoInf = ZOx ;
						Zy2CompoInf = ZOy ;
										
				/* Using variable values */
				/* for the axes */
					/* for the Y axis */
						setlinestyle( 0, 1, 2 );
						setcolor( ZYclr );
							line( ZYx1CompoInf, ZYy1CompoInf, ZYx2CompoInf, ZYy2CompoInf );	// lower component Y axis
						/* Y axis graduation */
							setlinestyle( 0, 1, 1 );
							setfillstyle( 1, ZYclrpntgrad );
								for( int pntgrad=0 ; pntgrad<10; pntgrad++ )
								{
						//			fillellipse( ZYx1CompoInf+0.05*(ZYx2CompoInf-ZYx1CompoInf)-pntgrad*0.1*(ZYx1CompoInf+0.05*(ZYx2CompoInf-ZYx1CompoInf)-ZOx), ZYy1CompoInf+0.05*(ZYy2CompoInf-ZYy1CompoInf)-pntgrad*0.1*(ZYy1CompoInf+0.05*(ZYy2CompoInf-ZYy1CompoInf)-ZOy), 2, 2 );	// graduation to tail Y axis
						//			fillellipse( ZYx1CompoSup+0.05*(ZYx2CompoSup-ZYx1CompoSup)-pntgrad*0.1*(ZYx1CompoSup+0.05*(ZYx2CompoSup-ZYx1CompoSup)-ZOx), ZYy1CompoSup+0.05*(ZYy2CompoSup-ZYy1CompoSup)-pntgrad*0.1*(ZYy1CompoSup+0.05*(ZYy2CompoSup-ZYy1CompoSup)-ZOy), 2, 2 );	// graduation to head Y axis
								}
						
						setlinestyle( 0, 1, 2 );
						setcolor( Zclr );
						setfillstyle( 1, Zclr );
							line( Zx1CompoInf, Zy1CompoInf, Zx2CompoInf, Zy2CompoInf );	// lower Z axis component
						/* Z axis graduation */
							setlinestyle( 0, 1, 1 );
							setfillstyle( 1, Zclrpntgrad );
								for( int pntgrad=0 ; pntgrad<10; pntgrad++ )
								{
						//			fillellipse( Zx1CompoInf+0.05*(Zx2CompoInf-Zx1CompoInf)-pntgrad*0.1*(Zx1CompoInf+0.05*(Zx2CompoInf-Zx1CompoInf)-ZOx), Zy1CompoInf+0.05*(Zy2CompoInf-Zy1CompoInf)-pntgrad*0.1*(Zy1CompoInf+0.05*(Zy2CompoInf-Zy1CompoInf)-ZOy), 2, 2 );	// graduation towards Z axis tail
								}
								
						setlinestyle( 0, 1, 2 );
						setcolor( ZXclr );
							line( ZXx1CompoInf, ZXy1CompoInf, ZXx2CompoInf, ZXy2CompoInf );	// lower component X axis
							line( ZXx1CompoSup, ZXy1CompoSup, ZXx2CompoSup, ZXy2CompoSup );	// upper component X axis
						/* graduation de l'axe X */
							setlinestyle( 0, 1, 1 );
							setfillstyle( 1, ZXclrpntgrad );
								for( int pntgrad=0 ; pntgrad<10; pntgrad++ )
								{
						//			fillellipse( ZXx1CompoInf+0.05*(ZXx2CompoInf-ZXx1CompoInf)-pntgrad*0.1*(ZXx1CompoInf+0.05*(ZXx2CompoInf-ZXx1CompoInf)-ZOx), ZXy1CompoInf+0.05*(ZXy2CompoInf-ZXy1CompoInf)-pntgrad*0.1*(ZXy1CompoInf+0.05*(ZXy2CompoInf-ZXy1CompoInf)-ZOy), 2, 2 );	// graduation to tail X axis
						//			fillellipse( ZXx1CompoSup+0.05*(ZXx2CompoSup-ZXx1CompoSup)-pntgrad*0.1*(ZXx1CompoSup+0.05*(ZXx2CompoSup-ZXx1CompoSup)-ZOx), ZXy1CompoSup+0.05*(ZXy2CompoSup-ZXy1CompoSup)-pntgrad*0.1*(ZXy1CompoSup+0.05*(ZXy2CompoSup-ZXy1CompoSup)-ZOy), 2, 2 );	// graduation towards X axis head
								}
						setlinestyle( 0, 1, 2 );
						setcolor( ZYclr );
							line( ZYx1CompoSup, ZYy1CompoSup, ZYx2CompoSup, ZYy2CompoSup );	// upper component Y axis
								
							setcolor( Zclr );
							line( Zx1CompoSup, Zy1CompoSup, Zx2CompoSup, Zy2CompoSup );	// upper Z axis component
						/* graduation de l'axe Z */
							setlinestyle( 0, 1, 1 );
							setfillstyle( 1, Zclrpntgrad );
								for( int pntgrad=0 ; pntgrad<10; pntgrad++ )
								{
						//			fillellipse( Zx1CompoSup+0.05*(Zx2CompoSup-Zx1CompoSup)-pntgrad*0.1*(Zx1CompoSup+0.05*(Zx2CompoSup-Zx1CompoSup)-ZOx), Zy1CompoSup+0.05*(Zy2CompoSup-Zy1CompoSup)-pntgrad*0.1*(Zy1CompoSup+0.05*(Zy2CompoSup-Zy1CompoSup)-ZOy), 2, 2 );	// graduation towards Z axis head
								}

				/////////////////////////////////////////////////////////////////////////////////////////////////////////
						setcolor( ZYclrf );
						setfillstyle( 1, ZYclr );			
							/* Y axis hat */
							for( int point=0; point<360; point++)
							{
								(point%2==0) ? ZYtabpnts[point]=ZOx+0.02*cos(point*PI/180)*(ZXx1CompoInf-ZXx2CompoInf)+0.96*(ZYx1CompoSup-ZYx2CompoSup) : ZYtabpnts[point]=ZOy+0.02*cos(point*PI/180)*(ZXy1CompoInf-ZXy2CompoInf)-0.02*sin(point*PI/180)*(Zy2CompoSup-Zy1CompoSup)+0.96*(ZYy1CompoSup-ZYy2CompoSup);
								line( ZOx+0.02*cos(point*PI/180)*(ZXx1CompoInf-ZXx2CompoInf)+0.96*(ZYx1CompoSup-ZYx2CompoSup), ZOy+0.02*cos(point*PI/180)*(ZXy1CompoInf-ZXy2CompoInf)-0.02*sin(point*PI/180)*(Zy2CompoSup-Zy1CompoSup)+0.96*(ZYy1CompoSup-ZYy2CompoSup), ZYx1CompoSup, ZYy1CompoSup );
							}
							fillpoly( 180, ZYtabpnts);
							drawpoly( 180, ZYtabpnts);						
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
						setcolor( ZXclrf );
						setfillstyle( 1, ZXclr );
							/* X axis hat */
							for( int point=0; point<360; point++)
							{
								(point%2==0) ? ZXtabpnts[point]=ZOx+0.02*cos(point*PI/180)*(ZYx1CompoInf-ZYx2CompoInf)+0.96*(ZXx1CompoSup-ZXx2CompoSup) : ZXtabpnts[point]=ZOy+0.02*cos(point*PI/180)*(ZYy1CompoInf-ZYy2CompoInf)-0.02*sin(point*PI/180)*(Zy2CompoSup-Zy1CompoSup)+0.96*(ZXy1CompoSup-ZXy2CompoSup);
								line( ZOx+0.02*cos(point*PI/180)*(ZYx1CompoInf-ZYx2CompoInf)+0.96*(ZXx1CompoSup-ZXx2CompoSup), ZOy+0.02*cos(point*PI/180)*(ZYy1CompoInf-ZYy2CompoInf)-0.02*sin(point*PI/180)*(Zy2CompoSup-Zy1CompoSup)+0.96*(ZXy1CompoSup-ZXy2CompoSup), ZXx1CompoSup, ZXy1CompoSup );
							}
							fillpoly( 180, ZXtabpnts);
							drawpoly( 180, ZXtabpnts);
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
				/////////////////////////////////////////////////////////////////////////////////////////////////////////
						setcolor( Zclrf );
						setfillstyle( 1, Zclrf );
							/** Z axis hat **/
							for( int point=0; point<360; point++)
							{
								(point%2==0) ? Ztabpnts[point]=ZOx+0.02*cos(point*PI/180)*(ZXx1CompoInf-ZXx2CompoInf)-0.02*sin(point*PI/180)*(ZYx1CompoInf-ZYx2CompoInf)-0.96*(Zx2CompoSup-Zx1CompoSup) : Ztabpnts[point]=ZOy+0.02*cos(point*PI/180)*(ZXy1CompoInf-ZXy2CompoInf)-0.02*sin(point*PI/180)*(ZYy2CompoSup-ZYy1CompoSup)-0.96*(Zy2CompoSup-Zy1CompoSup);
								line( ZOx+0.02*cos(point*PI/180)*(ZXx1CompoInf-ZXx2CompoInf)-0.02*sin(point*PI/180)*(ZYx1CompoInf-ZYx2CompoInf)-0.96*(Zx2CompoSup-Zx1CompoSup), ZOy+0.02*cos(point*PI/180)*(ZXy1CompoInf-ZXy2CompoInf)-0.02*sin(point*PI/180)*(ZYy2CompoSup-ZYy1CompoSup)-0.96*(Zy2CompoSup-Zy1CompoSup), Zx1CompoSup, Zy1CompoSup );
							}
							fillpoly( 180, Ztabpnts);
							drawpoly( 180, Ztabpnts);						
				/////////////////////////////////////////////////////////////////////////////////////////////////////////


		return 0;

		}
                   
Aile gauche Aile droite Get

Circuit Icon

3D Cube

Icon

#include "Cube.h"
#include 
#include  
#include 
#include 
#define PI 3.1415

		int Cube3D( int CuPourcX, int CuPourcY, int CuZXx1CompoSup, int CuZXy1CompoSup, int CuZXx2CompoSup, int CuZXy2CompoSup, int CuZXx1CompoInf, int CuZXy1CompoInf, int CuZXx2CompoInf, int CuZXy2CompoInf, int CuZYx1CompoSup, int CuZYy1CompoSup, int CuZYx2CompoSup, int CuZYy2CompoSup, int CuZYx1CompoInf, int CuZYy1CompoInf, int CuZYx2CompoInf, int CuZYy2CompoInf, int CuZx1CompoSup, int CuZx2CompoSup, int CuZy1CompoSup, int CuZy2CompoSup )
		{

			// Declaring the internal functions of the faces of the cube
			int CucoteH( int, int* );
			int CucoteB( int, int* );
			int CucoteG( int, int* );
			int CucoteD( int, int* );
			int CucoteV( int, int* );
			int CucoteR( int, int* );

			setcolor( Cuclrb );
			setfillstyle( 1, Cuclrf );
			setlinestyle( 0, 1, 1 );

			// Position
			int Xpos =CuZXx2CompoSup ;
			int Ypos =CuZXy2CompoSup ;
			
			int FaceBas[10]=
			{
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};
			int FaceGauche[10]=
			{
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};
			
			int FaceDroite[10]=
			{
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};
			
			int FaceArriere[10]=
			{
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};
			int FaceAvant[10]=
			{
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))-CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))-CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};
			
			int FaceHaut[10]=
			{
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)+(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)+(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)-(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)-(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoInf-CuZXx2CompoInf)+(CuZYx2CompoInf-(CuZYx2CompoInf+CuCote*(CuZYx1CompoInf-CuZYx2CompoInf)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoInf-CuZXy2CompoInf)+(CuZYy2CompoInf-(CuZYy2CompoInf+CuCote*(CuZYy1CompoInf-CuZYy2CompoInf)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup),
				Xpos+CuCote*(CuZXx1CompoSup-CuZXx2CompoSup)-(CuZYx2CompoSup-(CuZYx2CompoSup+CuCote*(CuZYx1CompoSup-CuZYx2CompoSup)))+CuCote*(CuZx1CompoSup-CuZx2CompoSup), Ypos+CuCote*(CuZXy1CompoSup-CuZXy2CompoSup)-(CuZYy2CompoSup-(CuZYy2CompoSup+CuCote*(CuZYy1CompoSup-CuZYy2CompoSup)))+CuCote*(CuZy1CompoSup-CuZy2CompoSup)
			};

			/// Display of the cube faces
				/* For Y [ 0 ] */
				if( CuPourcY==0 )
				{
					/* For X [ 0~25 ] */
						if( CuPourcX<=25 )
						{

						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );

						}
					/* For X [ 26~50 ] */
						if( CuPourcX>25 && CuPourcX<=50 )
						{

						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );

						}
					/* For X [ 51~75 ] */
						if( CuPourcX>50 && CuPourcX<=75 )
						{

						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );

						}
					/* For X [ 76~100 ] */
						if( CuPourcX>75 && CuPourcX<=100 )
						{
						
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );

						}
				}
				/* For Y [ 1~25 ] */
				if( CuPourcY>0 && CuPourcY<=25  )
				{
					/* For X [ 0~25 ] */
						if( CuPourcX<=25 )
						{
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
							
						}
					/* For X [ 26~50 ] */
						if( CuPourcX>25 && CuPourcX<=50 )
						{

						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );

						}
					/* For X [ 51~75 ] */
						if( CuPourcX>50 && CuPourcX<=75 )
						{

						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );

						}
					/* For X [ 76~100 ] */
						if( CuPourcX>75 && CuPourcX<=100 )
						{

						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );

						}
				}
				/* For Y [ 26~50 ] */
				if( CuPourcY>25 && CuPourcY<=50  )
				{
					/* For X [ 0~25 ] */
						if( CuPourcX<=25 )
						{
						
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );

						}
					/* For X [ 26~50 ] */
						if( CuPourcX>25 && CuPourcX<=50 )
						{

						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );

						}
					/* For X [ 51~75 ] */
						if( CuPourcX>50 && CuPourcX<=75 )
						{
							
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );

						}
					/* For X [ 76~100 ] */
						if( CuPourcX>75 && CuPourcX<=100 )
						{

						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
				
						}
				}
				/* For Y [ 51~75 ] */
				if( CuPourcY>50 && CuPourcY<=75  )
				{
					/* For X [ 0~25 ] */
						if( CuPourcX<=25 )
						{

						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );

						}
					/* For X [ 26~50 ] */
						if( CuPourcX>25 && CuPourcX<=50 )
						{

						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );

						}
					/* For X [ 51~75 ] */
						if( CuPourcX>50 && CuPourcX<=75 )
						{

						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );

						}
					/* For X [ 76~100 ] */
						if( CuPourcX>75 && CuPourcX<=100 )
						{

						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );

						}
				}
				/* For Y [ 76~100 ] */
				if( CuPourcY>75 && CuPourcY<=100  )
				{
					/* For X [ 0~25 ] */
						if( CuPourcX<=25 )
						{

						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );

						}
					/* For X [ 26~50 ] */
						if( CuPourcX>25 && CuPourcX<=50 )
						{

						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );

						}
					/* For X [ 51~75 ] */
						if( CuPourcX>50 && CuPourcX<=75 )
						{

						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );

						}
					/* For X [ 76~100 ] */
						if( CuPourcX>75 && CuPourcX<=100 )
						{

						// Affichage Face Droite
				CucoteD( CuclrfGchDte, FaceDroite );
						// Display of bottom sides
				CucoteB( CuclrfHtBs, FaceBas );
						// Display of front side
				CucoteV( CuclrfAvAr, FaceAvant );
						// Display of back side
				CucoteR( CuclrfAvAr, FaceArriere );
						// Display of top sides
				CucoteH( CuclrfHtBs, FaceHaut );
						// Display of left side
				CucoteG( CuclrfGchDte, FaceGauche );

						}
				}
			
			return 0;

		}

int CucoteH( int CucoteHclrfHtBs, int *CucoteHFaceHaut )
{
	// Display of top side
		setfillstyle( 1, CucoteHclrfHtBs );
		fillpoly( 5, CucoteHFaceHaut ) ;
		
	return 0;	
}
int CucoteB( int CucoteBclrfHtBs, int *CucoteBFaceBas )
{
	// Display of bottom sides
		setfillstyle( 1, CucoteBclrfHtBs );
		fillpoly( 5, CucoteBFaceBas );
		
	return 0;
}

int CucoteG( int CucoteGclrfGchDte, int *CucoteGFaceGauche )
{
	// Display of left side
		setfillstyle( 1, CucoteGclrfGchDte );
		fillpoly( 5, CucoteGFaceGauche ) ;
							
	return 0;
}
int CucoteD( int CucoteDclrfGchDte, int *CucoteDFaceDroite )
{
	// Affichage Face Droite
		setfillstyle( 1, CucoteDclrfGchDte );
		fillpoly( 5, CucoteDFaceDroite );
							
	return 0;
}

int CucoteV( int CucoteVclrfAvAr, int *CucoteVFaceAvant )
{
	// Display of front side
		setfillstyle( 1, CucoteVclrfAvAr );
		fillpoly( 5, CucoteVFaceAvant );
							
	return 0;
}
int CucoteR( int CucoteRclrfAvAr, int *CucoteRFaceArriere )
{
	// Display of back side
		setfillstyle( 1, CucoteRclrfAvAr );
		fillpoly( 5, CucoteRFaceArriere ) ;
							
	return 0;
}
                   
Aile gauche Aile droite Get

Projects Developed