home *** CD-ROM | disk | FTP | other *** search
-
- INCLUDE 'GRAFTYPE.FOR'
-
- RECORD /WorldRect/ wr
- INTEGER i
-
-
- CALL tInit3
- CALL Init3D(-1, 'c:\FOR\LIB\*.FON')
- CALL SetWorldRect(wr,-10.0,-10.0,10.0,10.0)
- CALL SetWorldCoordinates(wr)
- CALL WorldRotate3(-60.0,0)
- CALL WorldRotate3(30.0,1)
- DO i = 0, 4
- CALL ClearViewportXX
- CALL Selectcolor(i+1)
- SELECT CASE (i)
- CASE (0)
- CALL Draw3DAxes(10.0,10.0,10.0)
- CASE (1)
- CALL WorldScale3(0.5,0.5,0.5)
- CALL Draw3DAxes(10.0,10.0,10.0)
- CASE (2)
- CALL WorldScale3(2.0,2.0,2.0)
- CALL WorldRotate3(-40.0,0)
- CALL Draw3DAxes(10.0,10.0,10.0)
- CASE (3)
- CALL WorldRotate3(40.0,0)
- CALL WorldTran3(4.0,3.0,2.0)
- CALL Draw3DAxes(10.0,10.0,10.0)
-
- CASE (4)
- CALL WorldTran3(-4.0,-3.0,-2.0)
- CALL Persp(20.0)
- CALL Draw3DAxes(10.0,10.0,10.0)
- END SELECT
- CALL DrawFunction
- END DO
-
- CALL Close3DGraphics
-
- END
-
- SUBROUTINE DrawFunction()
- INTEGER i,j
- REAL x,y,z
-
- DO i = -15, 15
- x = REAL(i)/2.0
- DO j = -15, 15
- y = REAL(j)/2.0
- z = 7.0 * exp(-0.1 * (x*x + y*y))
- IF (j .EQ. -15) THEN
- CALL Move3Abs(x,y,z)
- ELSE
- CALL Line3Abs(x,y,z)
- END IF
- END DO
- END DO
- DO i = -15, 15
- y = REAL(i)/2.0
- DO j= -15, 15
- x = REAL(j)/2.0
- z = 7.0 * exp(-0.1 * (x*x + y*y))
- IF (j .EQ. -15) then
- CALL Move3Abs(x,y,z)
- ELSE
- CALL Line3Abs(x,y,z)
- END IF
- END DO
- END DO
- END
-
-