|
![](/i/fill.gif) |
On Fri, 01 Sep 2000 00:24:51 -0400, J Charter wrote:
>But I know you'll be excited to recall that "set" is a Cobol! instruction...
Yes, but only in the optional table handling module.
>knowing the reverence you young guys still have for it ;-)
Yeah, lets turn POVray in COSOL (COmmon Scene Oriented Language):
IDENTIFICATION DIVISION.
SCENE-ID. BOBBING-SPHERE-ABOVE-CHECKERED-PLANE.
AUTHOR. PETER J. HOLZER
ENVIRONMENT DIVISION.
CONFIGURATON SECTION.
SPECIAL NAMES.
METALS IS "/usr/local/lib/povray/include/metals.inc".
COLORS IS "/usr/local/lib/povray/include/colors.inc".
INPUT-OUTPUT-SECTION.
SELECT OUTPUT AS "SPHERE99.PNG"
ORGANIZATION PNG
MODIFY FILENAME BY CLOCK.
DATA DIVISION.
01 THE-SPHERE.
02 TYPE SPHERE.
02 RADIUS 10.
02 LOCATION (0, 20, 0).
02 TEXTURE
03 COPY METAL-C OF METALS.
01 THE-PLANE.
02 TYPE PLANE.
02 NORMAL (0, 1, 0).
02 OFFSET 0.
02 TEXTURE
03 TYPE CHECKER
04 COPY RED OF COLORS.
04 COPY GREEN OF COLORS.
01 CAMERA.
02 POSITION (0, 15, -30)
02 LOOK AT (0, 15, 0).
77 HEIGHT PIC COMP.
ANIMATION DIVISION.
RENDER FRAMES 0 THRU 35
VARYING CLOCK FROM 0 THRU 350.
RENDER DIVISION.
APPLY ROTATION AROUND Y AXIS BY CLOCK DEGREES TO CAMERA.
COMPUTE SINUS OF CLOCK GIVING HEIGHT.
MULTIPLY HEIGHT BY 10 GIVING HEIGHT.
APPLY TRANSLATION BY HEIGHT UNITS ALONG Y AXIS TO THE-SPHERE.
RENDER IT.
DISPLAY STATISTICS.
SCNR,
hp
PS: I admit that I had to dust off my old Cobol manual to write this.
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsr ac at | -- Ale### [at] univie ac at
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
![](/i/fill.gif) |