home *** CD-ROM | disk | FTP | other *** search
- # include <stdio.h>
- # include <graph.h>
- # include "asyncxx.h"
- # include "hpplot.h"
- # include "worlddr.h"
- # include "plot3d.h"
-
-
-
- void DrawHouse()
- {
-
- Move3Abs(1.0,1.0,1.0);
- Line3Abs(1.0,1.0,-1.0);
- Line3Abs(1.0,-1.0,-1.0);
- /*right side*/
- Line3Abs(1.0,-1.0,1.0);
- Line3Abs(1.0,1.0,1.0);
- Move3Abs(-1.0,1.0,1.0);
- Line3Abs(-1.0,1.0,-1.0);
- Line3Abs(-1.0,-1.0,-1.0);
- /*left side*/
- Line3Abs(-1.0,-1.0,1.0);
- Line3Abs(-1.0,1.0,1.0);
- Move3Abs(1.0,1.0,1.0);
- /*front top*/
- Line3Abs(-1.0,1.0,1.0);
- Move3Abs(1.0,-1.0,1.0);
- Line3Abs(-1.0,-1.0,1.0);
- /*front bottom*/
- Move3Abs(1.0,1.0,-1.0);
- /*back top*/
- Line3Abs(-1.0,1.0,-1.0);
- Move3Abs(1.0,-1.0,-1.0);
- /*back bottom*/
- Line3Abs(-1.0,-1.0,-1.0);
- Move3Abs(1.0,1.0,1.0);
- Line3Abs(0.0,1.5,1.0);
- /*roof*/
- Line3Abs(-1.0,1.0,1.0);
- Move3Abs(1.0,1.0,-1.0);
- Line3Abs(0.0,1.5,-1.0);
- Line3Abs(-1.0,1.0,-1.0);
- Move3Abs(0.0,1.5,1.0);
- Line3Abs(0.0,1.5,-1.0);
-
- }
-
-
- void main()
- {
-
- int i;
-
- tInit3();
- /****************************************************
- - IF YOU WANT TO CONFIGURE FOR CGA 4 COLORS
- CHOOSE Init3D(1);
- - HERCULES SUPPORT IS NOW INCLUDED IN MICROSOFT
- C VERSION 5.1. IF YOU WANT TO USE THE
- HERCULES DRIVER YOU MUST FIRST INSTALL
- MSHERC.COM FROM DOS BY TYPING
- msherc<enter>
- THEN IN YOUR MAIN PROGRAM CALL
- Init3D(12);
- - REFER TO THE README.DOC FILE - PART 3
- INCLUDED IN YOUR MICROSOFT C 5.1 COMPILER
- FOR DETAILS ON ADDED HERCULES SUPPORT.
- **************************************************/
-
- Init3D(6);
- SetWorldCoordinates( -10.0,-10.0,10.0,10.0);
- SelectColor(3);
- WorldScale3(1.0,1.0,2.0);
- WorldRotate3(10.0,0);
- WorldRotate3(10.0,1);
- Persp(15.0);
- for ( i=0; i<=10; ++i){
- WorldScale3(1.2,1.2,1.4);
- SelectColor(i+1);
- DrawHouse();
- SelectColor(0);
- DrawHouse();
- }
- Close3DGraphics();
- }