home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 4203 / pov20_21.txt < prev    next >
Text File  |  1993-12-01  |  69KB  |  2,152 lines

  1. diff -c2 -r ./file_id.diz \povray2/file_id.diz
  2. *** ./file_id.diz    Thu Sep 30 16:56:56 1993
  3. --- \povray2/file_id.diz    Mon Nov 29 13:44:52 1993
  4. ***************
  5. *** 1,12 ****
  6.   This is the source code in highly 
  7.   portible C for the Persistence of 
  8. ! Vision Ray Tracer POV-Ray version 2.0.
  9. ! It also include machine specific 
  10. ! source for all platforms except 
  11. ! Macintosh. (Mac users see POVSRC.SEA)  
  12. ! Create your own \POVRAY2 directory and 
  13. ! un-zip this file using the -d option 
  14. ! to insure that the proper sub-
  15. ! directories are created. Other files 
  16. ! are needed.  See POVINF.DOC from this 
  17. ! library for more information.
  18. --- 1,13 ----
  19.   This is the source code in highly 
  20.   portible C for the Persistence of 
  21. ! Vision Ray Tracer POV-Ray version 
  22. ! 2.1. It also include machine 
  23. ! specific source for all platforms 
  24. ! except Macintosh. (Mac users see 
  25. ! POVSRC.SEA)  Create your own \POVRAY2
  26. ! directory and un-zip this file using 
  27. ! the -d option to insure that the 
  28. ! proper sub-directories are created. 
  29. ! Other files are needed.  See 
  30. ! POVINF.DOC from this library for more 
  31. ! information.
  32. diff -c2 -r ./machine/ibmpc/ibm.c \povray2/machine/ibmpc/ibm.c
  33. *** ./machine/ibmpc/ibm.c    Tue Sep 28 13:49:04 1993
  34. --- \povray2/machine/ibmpc/ibm.c    Mon Oct 18 14:05:20 1993
  35. ***************
  36. *** 145,149 ****
  37.   
  38.   /*#define DEBUG_VIDEO*/        /* Uncomment to display Video initialization info during program startup. */
  39. ! /*#define SVBOX*/            /* Uncomment to use setvbuf in GCCDOS anyway. */
  40.   
  41.   #ifdef DEBUG_VIDEO
  42. --- 145,149 ----
  43.   
  44.   /*#define DEBUG_VIDEO*/        /* Uncomment to display Video initialization info during program startup. */
  45. ! /*#define SVBOK*/            /* Uncomment to use setvbuf in GCCDOS anyway. */
  46.   
  47.   #ifdef DEBUG_VIDEO
  48. ***************
  49. *** 218,222 ****
  50. --- 218,224 ----
  51.   
  52.     #define CLD
  53. +   #ifndef min
  54.     #define min(x,y) ((x) < (y)? (x): (y))
  55. +   #endif
  56.   
  57.     #ifdef DOS386
  58. ***************
  59. *** 1375,1379 ****
  60.       if(First_Column > 1 || Last_Column < width ||
  61.        First_Line > 1 || Last_Line < height)
  62. !         box (First_Column, First_Line, Last_Column, Last_Line-1);
  63.   
  64.   #if defined(DOS16RM)
  65. --- 1377,1381 ----
  66.       if(First_Column > 1 || Last_Column < width ||
  67.        First_Line > 1 || Last_Line < height)
  68. !         box (First_Column, First_Line, Last_Column-1, Last_Line-1);
  69.   
  70.   #if defined(DOS16RM)
  71. ***************
  72. *** 1789,1793 ****
  73.   void setmany(palbuf, start, count)
  74.   unsigned char palbuf[256][3];
  75. ! int start, int count;
  76.   {
  77.      unsigned char _far *fp;
  78. --- 1791,1795 ----
  79.   void setmany(palbuf, start, count)
  80.   unsigned char palbuf[256][3];
  81. ! int start, count;
  82.   {
  83.      unsigned char _far *fp;
  84. ***************
  85. *** 1951,1955 ****
  86.   #endif
  87.   #ifdef DOS386
  88. !                 int86x_real(0x21, &inr, &inr, &segs);
  89.   #else
  90.                   int86x(0x21, ®s, ®s, &segs);              /* call DOS - status of operation is !regs.x.cflag */
  91. --- 1953,1957 ----
  92.   #endif
  93.   #ifdef DOS386
  94. !                 int86x_real(0x21, ®s, ®s, &segs);
  95.   #else
  96.                   int86x(0x21, ®s, ®s, &segs);              /* call DOS - status of operation is !regs.x.cflag */
  97. ***************
  98. *** 1968,1972 ****
  99.   
  100.     /* plot a single RGB pixel */
  101. ! void display_plot (x, y, Red, Green, Blue)   /* plot a single RGB pixel */
  102.      int x, y;
  103.      unsigned char Red, Green, Blue;
  104. --- 1970,1974 ----
  105.   
  106.     /* plot a single RGB pixel */
  107. ! void display_plot (x, y, Red, Green, Blue)
  108.      int x, y;
  109.      unsigned char Red, Green, Blue;
  110. ***************
  111. *** 2655,2659 ****
  112.   
  113.   #if !__STDC__
  114. ! #ifndef __BORLANDC__  /* BCC has srand but doesn't set __STDC__ */
  115.   
  116.   /* ANSI Standard psuedo-random number generator */
  117. --- 2657,2663 ----
  118.   
  119.   #if !__STDC__
  120. ! #if !defined(__BORLANDC__) && !defined (__ZTC__)  
  121. !  /* BCC has srand but doesn't set __STDC__ same as Zortech */
  122. !   
  123.   
  124.   /* ANSI Standard psuedo-random number generator */
  125. diff -c2 -r ./machine/ibmpc/ibmconf.h \povray2/machine/ibmpc/ibmconf.h
  126. *** ./machine/ibmpc/ibmconf.h    Tue Sep 28 13:50:38 1993
  127. --- \povray2/machine/ibmpc/ibmconf.h    Fri Oct  8 21:27:50 1993
  128. ***************
  129. *** 186,189 ****
  130. --- 186,190 ----
  131.   
  132.   #ifdef __ZTC__
  133. +  #define QSORT_FUNCT_PARM const void *
  134.    #ifndef __386__
  135.     #define COMPILER_VER ".ibmztc"
  136. ***************
  137. *** 242,245 ****
  138. --- 243,248 ----
  139.    #define COMPILER_VER ".ibmbc"
  140.    #define IFF_SWITCH_CAST (long)
  141. +  #define QSORT_FUNCT_PARM const void _FAR *
  142. +  #define QSORT_FUNCT_RET  int _Cdecl
  143.   #endif
  144.   
  145. diff -c2 -r ./machine/ibmpc/zortech/ibmzor3.lnk \povray2/machine/ibmpc/zortech/ibmzor3.lnk
  146. *** ./machine/ibmpc/zortech/ibmzor3.lnk    Tue Jan 26 08:00:52 1993
  147. --- \povray2/machine/ibmpc/zortech/ibmzor3.lnk    Fri Oct  8 20:02:46 1993
  148. ***************
  149. *** 1,3 ****
  150. ! d:\zt\lib\cx.obj+
  151.   povray+bezier+blob+bound+boxes+
  152.   camera+colour+cones+csg+discs+
  153. --- 1,3 ----
  154. ! cx.obj+
  155.   povray+bezier+blob+bound+boxes+
  156.   camera+colour+cones+csg+discs+
  157. diff -c2 -r ./machine/unix/unix.mak \povray2/machine/unix/unix.mak
  158. *** ./machine/unix/unix.mak    Thu Aug 19 16:21:06 1993
  159. --- \povray2/machine/unix/unix.mak    Sat Oct  9 14:39:44 1993
  160. ***************
  161. *** 43,44 ****
  162. --- 43,117 ----
  163.       $(CC) $(LFLAGS) $(POVOBJS) -lm
  164.   
  165. + povray.$(OBJ) : povray.c povproto.h frame.h vector.h config.h
  166. + bezier.$(OBJ): config.h frame.h povproto.h vector.h
  167. + blob.$(OBJ): config.h frame.h povproto.h vector.h
  168. + bound.$(OBJ): config.h frame.h povproto.h vector.h
  169. + boxes.$(OBJ): config.h frame.h povproto.h vector.h
  170. + camera.$(OBJ): config.h frame.h povproto.h vector.h
  171. + colour.$(OBJ): config.h frame.h povproto.h vector.h
  172. + cones.$(OBJ): config.h frame.h povproto.h vector.h
  173. + csg.$(OBJ): config.h frame.h povproto.h vector.h
  174. + discs.$(OBJ): config.h frame.h povproto.h vector.h
  175. + dump.$(OBJ): config.h frame.h povproto.h
  176. + express.$(OBJ): config.h frame.h parse.h povproto.h vector.h
  177. + gif.$(OBJ): config.h frame.h povproto.h
  178. + gifdecod.$(OBJ): config.h frame.h povproto.h
  179. + hfield.$(OBJ): config.h frame.h povproto.h vector.h
  180. + iff.$(OBJ): config.h frame.h povproto.h
  181. + image.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  182. + lighting.$(OBJ): config.h frame.h povproto.h vector.h
  183. + matrices.$(OBJ): config.h frame.h povproto.h vector.h
  184. + normal.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  185. + objects.$(OBJ): config.h frame.h povproto.h vector.h
  186. + parse.$(OBJ): config.h frame.h parse.h povproto.h vector.h
  187. + pigment.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  188. + planes.$(OBJ): config.h frame.h povproto.h vector.h
  189. + point.$(OBJ): config.h frame.h povproto.h vector.h
  190. + poly.$(OBJ): config.h frame.h povproto.h vector.h
  191. + quadrics.$(OBJ): config.h frame.h povproto.h vector.h
  192. + raw.$(OBJ): config.h frame.h povproto.h
  193. + ray.$(OBJ): config.h frame.h povproto.h vector.h
  194. + render.$(OBJ): config.h frame.h povproto.h vector.h
  195. + spheres.$(OBJ): config.h frame.h povproto.h vector.h
  196. + targa.$(OBJ): config.h frame.h povproto.h
  197. + texture.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  198. + tokenize.$(OBJ): config.h frame.h parse.h povproto.h
  199. + triangle.$(OBJ): config.h frame.h povproto.h vector.h
  200. + txttest.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  201. + vect.$(OBJ): config.h frame.h povproto.h vector.h
  202. diff -c2 -r ./machine/unix/xwindows.mak \povray2/machine/unix/xwindows.mak
  203. *** ./machine/unix/xwindows.mak    Wed Nov 11 01:11:00 1992
  204. --- \povray2/machine/unix/xwindows.mak    Sat Oct  9 14:39:46 1993
  205. ***************
  206. *** 32,45 ****
  207.   
  208.   
  209. ! POVOBJS = povray.$(OBJ) render.$(OBJ) tokenize.$(OBJ) parse.$(OBJ) \
  210. !       objects.$(OBJ) spheres.$(OBJ) quadrics.$(OBJ) lighting.$(OBJ) \
  211. !       prioq.$(OBJ) texture.$(OBJ) matrices.$(OBJ) csg.$(OBJ) \
  212. !       hfield.$(OBJ) txtcolor.$(OBJ) txtbump.$(OBJ) txtmap.$(OBJ) \
  213. !       txttest.$(OBJ) colour.$(OBJ) viewpnt.$(OBJ) ray.$(OBJ) point.$(OBJ)\
  214. !       planes.$(OBJ) iff.$(OBJ) gif.$(OBJ) gifdecod.$(OBJ) blob.$(OBJ)\
  215. !       triangle.$(OBJ) raw.$(OBJ) dump.$(OBJ) targa.$(OBJ) poly.$(OBJ) \
  216. !       bezier.$(OBJ) vect.$(OBJ) boxes.$(OBJ) $(MACHINE_OBJ)
  217.   
  218.   povray:    $(POVOBJS)
  219.       cc $(POVOBJS) -lm $(LFLAGS)
  220. --- 32,45 ----
  221.   
  222.   
  223. ! POVOBJS = povray.$(OBJ) bezier.$(OBJ) blob.$(OBJ) bound.$(OBJ) boxes.$(OBJ)  \
  224. !       camera.$(OBJ) colour.$(OBJ) cones.$(OBJ) csg.$(OBJ) discs.$(OBJ)   \
  225. !       dump.$(OBJ) express.$(OBJ) gif.$(OBJ) gifdecod.$(OBJ)              \
  226. !       hfield.$(OBJ) iff.$(OBJ) image.$(OBJ) lighting.$(OBJ)              \
  227. !       matrices.$(OBJ) normal.$(OBJ) objects.$(OBJ) parse.$(OBJ)          \
  228. !       pigment.$(OBJ) planes.$(OBJ) point.$(OBJ) poly.$(OBJ)              \
  229. !       quadrics.$(OBJ) raw.$(OBJ) ray.$(OBJ) render.$(OBJ) spheres.$(OBJ) \
  230. !       targa.$(OBJ) texture.$(OBJ) tokenize.$(OBJ) triangle.$(OBJ)        \
  231. !       txttest.$(OBJ) vect.$(OBJ) $(MACHINE_OBJ)
  232.   
  233.   povray:    $(POVOBJS)
  234.       cc $(POVOBJS) -lm $(LFLAGS)
  235. ***************
  236. *** 50,112 ****
  237.       $(CC) $(CFLAGS) -I$(X11)/include xwindows.c
  238.   
  239. ! tokenize.$(OBJ) : tokenize.c povproto.h frame.h config.h
  240.   
  241. ! parse.$(OBJ) : parse.c povproto.h frame.h config.h
  242.   
  243. ! render.$(OBJ) : render.c povproto.h frame.h vector.h config.h
  244.   
  245. ! lighting.$(OBJ) : lighting.c povproto.h frame.h vector.h config.h
  246.   
  247. ! prioq.$(OBJ) : prioq.c povproto.h frame.h config.h
  248.   
  249. ! texture.$(OBJ) : texture.c povproto.h frame.h vector.h config.h texture.h
  250.   
  251. ! txtcolor.$(OBJ) : txtcolor.c povproto.h frame.h vector.h config.h texture.h
  252.   
  253. ! txtbump.$(OBJ) : txtbump.c povproto.h frame.h vector.h config.h texture.h
  254.   
  255. ! txtmap.$(OBJ) : txtmap.c povproto.h frame.h vector.h config.h texture.h
  256.   
  257. ! txttest.$(OBJ) : txttest.c povproto.h frame.h vector.h config.h texture.h
  258.   
  259. ! objects.$(OBJ) : objects.c povproto.h frame.h vector.h config.h
  260.   
  261. ! spheres.$(OBJ) : spheres.c povproto.h frame.h vector.h config.h
  262.   
  263. ! planes.$(OBJ) : planes.c povproto.h frame.h vector.h config.h
  264.   
  265. ! poly.$(OBJ) : poly.c povproto.h frame.h vector.h config.h
  266.   
  267. ! hfield.$(OBJ) : hfield.c povproto.h frame.h vector.h config.h
  268.   
  269. ! bezier.$(OBJ) : bezier.c povproto.h frame.h vector.h config.h
  270.   
  271. ! vect.$(OBJ) : vect.c povproto.h frame.h config.h
  272.   
  273. ! quadrics.$(OBJ) : quadrics.c povproto.h frame.h vector.h config.h
  274.   
  275. ! matrices.$(OBJ) : matrices.c povproto.h frame.h vector.h config.h
  276.   
  277. ! csg.$(OBJ) : csg.c povproto.h frame.h vector.h config.h
  278.   
  279. ! colour.$(OBJ) : colour.c povproto.h frame.h config.h
  280.   
  281. ! viewpnt.$(OBJ) : viewpnt.c povproto.h frame.h vector.h config.h
  282.   
  283. ! ray.$(OBJ) : ray.c povproto.h frame.h vector.h config.h
  284.   
  285. ! iff.$(OBJ) : iff.c povproto.h frame.h config.h
  286.   
  287. ! gif.$(OBJ) : gif.c povproto.h frame.h config.h
  288.   
  289. ! gifdecod.$(OBJ) : gifdecod.c povproto.h frame.h config.h
  290.   
  291. ! raw.$(OBJ) :    raw.c povproto.h frame.h config.h
  292.   
  293. ! triangle.$(OBJ) : triangle.c povproto.h frame.h vector.h config.h
  294.   
  295. ! dump.$(OBJ) :    dump.c povproto.h frame.h config.h
  296.   
  297. ! boxes.$(OBJ) : boxes.c povproto.h frame.h vector.h config.h
  298.   
  299. ! blob.$(OBJ) : blob.c povproto.h frame.h vector.h config.h
  300. --- 50,122 ----
  301.       $(CC) $(CFLAGS) -I$(X11)/include xwindows.c
  302.   
  303. ! bezier.$(OBJ): config.h frame.h povproto.h vector.h
  304. ! blob.$(OBJ): config.h frame.h povproto.h vector.h
  305. ! bound.$(OBJ): config.h frame.h povproto.h vector.h
  306. ! boxes.$(OBJ): config.h frame.h povproto.h vector.h
  307. ! camera.$(OBJ): config.h frame.h povproto.h vector.h
  308. ! colour.$(OBJ): config.h frame.h povproto.h vector.h
  309.   
  310. ! cones.$(OBJ): config.h frame.h povproto.h vector.h
  311.   
  312. ! csg.$(OBJ): config.h frame.h povproto.h vector.h
  313.   
  314. ! discs.$(OBJ): config.h frame.h povproto.h vector.h
  315.   
  316. ! dump.$(OBJ): config.h frame.h povproto.h
  317.   
  318. ! express.$(OBJ): config.h frame.h parse.h povproto.h vector.h
  319.   
  320. ! gif.$(OBJ): config.h frame.h povproto.h
  321.   
  322. ! gifdecod.$(OBJ): config.h frame.h povproto.h
  323.   
  324. ! hfield.$(OBJ): config.h frame.h povproto.h vector.h
  325.   
  326. ! iff.$(OBJ): config.h frame.h povproto.h
  327.   
  328. ! image.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  329.   
  330. ! lighting.$(OBJ): config.h frame.h povproto.h vector.h
  331.   
  332. ! matrices.$(OBJ): config.h frame.h povproto.h vector.h
  333.   
  334. ! normal.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  335.   
  336. ! objects.$(OBJ): config.h frame.h povproto.h vector.h
  337.   
  338. ! parse.$(OBJ): config.h frame.h parse.h povproto.h vector.h
  339.   
  340. ! pigment.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  341.   
  342. ! planes.$(OBJ): config.h frame.h povproto.h vector.h
  343.   
  344. ! point.$(OBJ): config.h frame.h povproto.h vector.h
  345.   
  346. ! poly.$(OBJ): config.h frame.h povproto.h vector.h
  347.   
  348. ! quadrics.$(OBJ): config.h frame.h povproto.h vector.h
  349.   
  350. ! raw.$(OBJ): config.h frame.h povproto.h
  351.   
  352. ! ray.$(OBJ): config.h frame.h povproto.h vector.h
  353.   
  354. ! render.$(OBJ): config.h frame.h povproto.h vector.h
  355.   
  356. ! spheres.$(OBJ): config.h frame.h povproto.h vector.h
  357.   
  358. ! targa.$(OBJ): config.h frame.h povproto.h
  359.   
  360. ! texture.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  361.   
  362. ! tokenize.$(OBJ): config.h frame.h parse.h povproto.h
  363.   
  364. ! triangle.$(OBJ): config.h frame.h povproto.h vector.h
  365.   
  366. ! txttest.$(OBJ): config.h frame.h povproto.h texture.h vector.h
  367.   
  368. ! vect.$(OBJ): config.h frame.h povproto.h vector.h
  369. diff -c2 -r ./machine/vax/vax.doc \povray2/machine/vax/vax.doc
  370. *** ./machine/vax/vax.doc    Thu Sep 30 10:33:32 1993
  371. --- \povray2/machine/vax/vax.doc    Tue Nov  9 14:06:18 1993
  372. ***************
  373. *** 53,70 ****
  374.        4) rename vaxconf.h to config.h
  375.   
  376. !      5) edit the file 'POVRAY.C'.
  377. !         change the definition of 'main' and 'alt_main' to return 'int'
  378. !         instead of 'void'. you may also like to add a return statement.
  379.   
  380. !      6) edit the file 'tokenize.c'.
  381. !         remove the reference to 'extern Library_Paths []'.
  382.   
  383. -      7) edit the files 'csg.c' and 'objects.c'.
  384. -         remove the reference to 'extern RAY VP_Ray'.
  385. -      8) execute "@vaxbuild" for a NON XWindows executable.
  386. -      9) execute "@xvaxbld" for an XWindows executable.
  387.      Note that if you switch between X and non-X versions you MUST recompile
  388.      ALL FILES.
  389. --- 53,60 ----
  390.        4) rename vaxconf.h to config.h
  391.   
  392. !      5) execute "@vaxbuild" for a NON XWindows executable.
  393.   
  394. !      6) execute "@xvaxbld" for an XWindows executable.
  395.   
  396.      Note that if you switch between X and non-X versions you MUST recompile
  397.      ALL FILES.
  398. ***************
  399. *** 72,77 ****
  400.   Post-processing Images:
  401.      POV-Ray images can be post-processed using the PBMPLUS utilities.
  402. !    The program TGA2GIF (source available on Compuserve in GRAPHDEV) will run on
  403. !    a VAX and does a nice job of converting Targa output files into GIF files.
  404.   
  405.   Displaying Images:
  406. --- 62,68 ----
  407.   Post-processing Images:
  408.      POV-Ray images can be post-processed using the PBMPLUS utilities.
  409. !    The program TGA2GIF (source available on Compuserve in GRAPHDEV section 8
  410. !    as TGAGI2.ZIP) will run on a VAX and does a nice job of converting Targa
  411. !    output files into GIF files.
  412.   
  413.   Displaying Images:
  414. ***************
  415. *** 106,108 ****
  416.   Chris Cason.
  417.   CIS:100032,1644
  418. ! Internet:100032.1644@compuserve.com
  419. --- 97,99 ----
  420.   Chris Cason.
  421.   CIS:100032,1644
  422. ! Internet:100032.1644@compuserve.com
  423. diff -c2 -r ./machine/vax/vaxconf.h \povray2/machine/vax/vaxconf.h
  424. *** ./machine/vax/vaxconf.h    Wed Sep 29 23:58:32 1993
  425. --- \povray2/machine/vax/vaxconf.h    Thu Oct 28 13:08:14 1993
  426. ***************
  427. *** 113,116 ****
  428. --- 113,120 ----
  429.   #endif
  430.   
  431. + #ifdef ALPHA
  432. + #pragma message disable IMPLICITFUNC
  433. + #endif
  434.   #define EPSILON 1.0e-5
  435.   
  436. ***************
  437. *** 124,131 ****
  438.   #define DEFAULT_OUTPUT_FORMAT     't'
  439.   
  440. ! /* this is for VMS C on the Alpha. comment it out if your compiler complains  */
  441. ! /* strictly speaking, no compiler should complain about a pragma it does not  */
  442. ! /* recognise, but nevertheless, some compiler manufacturers have managed to ! */
  443. ! #pragma message disable IMPLICITFUNC
  444.   
  445.   #ifdef XWINDOWS
  446. --- 128,133 ----
  447.   #define DEFAULT_OUTPUT_FORMAT     't'
  448.   
  449. ! #define MAIN_RETURN_TYPE          int
  450. ! #define FINISH_POVRAY             return (0) ;
  451.   
  452.   #ifdef XWINDOWS
  453. diff -c2 -r ./povinf.doc \povray2/povinf.doc
  454. *** ./povinf.doc    Thu Sep 30 15:02:52 1993
  455. --- \povray2/povinf.doc    Mon Nov 29 14:01:58 1993
  456. ***************
  457. *** 49,53 ****
  458.           POVDOC.ZIP - The documentation and essential data files for POV-Ray
  459.           POVSCN.ZIP - The example scene files for POV-Ray
  460. !         POVIBM.ZIP - Executable and docs for IBM-PC and compatibles
  461.   
  462.           You will also need a program like PICLAB or Image Alchemy to convert
  463. --- 49,53 ----
  464.           POVDOC.ZIP - The documentation and essential data files for POV-Ray
  465.           POVSCN.ZIP - The example scene files for POV-Ray
  466. !         POVIBM.EXE - Executable and docs for IBM-PC and compatibles
  467.   
  468.           You will also need a program like PICLAB or Image Alchemy to convert
  469. ***************
  470. *** 164,168 ****
  471.   
  472.        CIS: 76702,1655
  473. !      Internet: 76702,1655 @compuserve.com
  474.   
  475.   
  476. --- 164,168 ----
  477.   
  478.        CIS: 76702,1655
  479. !      Internet: 76702.1655@compuserve.com
  480.   
  481.   
  482. diff -c2 -r ./source/bezier.c \povray2/source/bezier.c
  483. *** ./source/bezier.c    Wed Aug  4 12:44:58 1993
  484. --- \povray2/source/bezier.c    Tue Nov  9 14:33:16 1993
  485. ***************
  486. *** 52,57 ****
  487.   static void find_average PARAMS((int, VECTOR *, VECTOR *, DBL *));
  488.   static int spherical_bounds_check PARAMS((RAY *, VECTOR *, DBL));
  489. ! static int intersect_bicubic_patch0 PARAMS((RAY *, BICUBIC_PATCH *, DBL *));
  490. ! static int intersect_bicubic_patch1 PARAMS((RAY *, BICUBIC_PATCH *, DBL *));
  491.   static DBL point_plane_distance PARAMS((VECTOR *, VECTOR *, DBL *));
  492.   static DBL determine_subpatch_flatness PARAMS((VECTOR (*)[4][4]));
  493. --- 52,56 ----
  494.   static void find_average PARAMS((int, VECTOR *, VECTOR *, DBL *));
  495.   static int spherical_bounds_check PARAMS((RAY *, VECTOR *, DBL));
  496. ! static int intersect_bicubic_patch0 PARAMS((RAY *, BICUBIC_PATCH *, ISTACK *));
  497.   static DBL point_plane_distance PARAMS((VECTOR *, VECTOR *, DBL *));
  498.   static DBL determine_subpatch_flatness PARAMS((VECTOR (*)[4][4]));
  499. ***************
  500. *** 58,64 ****
  501.   static int flat_enough PARAMS((BICUBIC_PATCH *, VECTOR (*)[4][4]));
  502.   static void bezier_bounding_sphere PARAMS((VECTOR (*)[4][4], VECTOR *,DBL *));
  503. ! static void bezier_subpatch_intersect PARAMS((RAY *, BICUBIC_PATCH *,
  504.   VECTOR (*)[4][4], DBL, DBL, DBL, DBL,
  505. ! int *, DBL *));
  506.   static void bezier_split_left_right PARAMS((VECTOR (*)[4][4],VECTOR (*)[4][4],
  507.   VECTOR (*)[4][4]));
  508. --- 57,63 ----
  509.   static int flat_enough PARAMS((BICUBIC_PATCH *, VECTOR (*)[4][4]));
  510.   static void bezier_bounding_sphere PARAMS((VECTOR (*)[4][4], VECTOR *,DBL *));
  511. ! static int bezier_subpatch_intersect PARAMS((RAY *, BICUBIC_PATCH *,
  512.   VECTOR (*)[4][4], DBL, DBL, DBL, DBL,
  513. ! ISTACK *));
  514.   static void bezier_split_left_right PARAMS((VECTOR (*)[4][4],VECTOR (*)[4][4],
  515.   VECTOR (*)[4][4]));
  516. ***************
  517. *** 65,70 ****
  518.   static void bezier_split_up_down PARAMS((VECTOR (*)[4][4], VECTOR (*)[4][4],
  519.   VECTOR (*)[4][4]));
  520. ! static void bezier_subdivider PARAMS((RAY *, BICUBIC_PATCH *,VECTOR (*)[4][4],
  521. ! DBL, DBL, DBL, DBL, int, int *, DBL *));
  522.   static void bezier_tree_deleter PARAMS((BEZIER_NODE *Node));
  523.   static BEZIER_NODE *bezier_tree_builder PARAMS((BICUBIC_PATCH *Object,
  524. --- 64,69 ----
  525.   static void bezier_split_up_down PARAMS((VECTOR (*)[4][4], VECTOR (*)[4][4],
  526.   VECTOR (*)[4][4]));
  527. ! static int bezier_subdivider PARAMS((RAY *, BICUBIC_PATCH *,VECTOR (*)[4][4],
  528. ! DBL, DBL, DBL, DBL, int, ISTACK *));
  529.   static void bezier_tree_deleter PARAMS((BEZIER_NODE *Node));
  530.   static BEZIER_NODE *bezier_tree_builder PARAMS((BICUBIC_PATCH *Object,
  531. ***************
  532. *** 71,76 ****
  533.   VECTOR(*Patch)[4][4], DBL u0, DBL u1,
  534.   DBL v0, DBL v1, int depth));
  535. ! static void bezier_tree_walker PARAMS((RAY *, BICUBIC_PATCH *, BEZIER_NODE *,
  536. ! int, int *, DBL *));
  537.   static BEZIER_NODE *create_new_bezier_node PARAMS((void));
  538.   static BEZIER_VERTICES *create_bezier_vertex_block PARAMS((void));
  539. --- 70,75 ----
  540.   VECTOR(*Patch)[4][4], DBL u0, DBL u1,
  541.   DBL v0, DBL v1, int depth));
  542. ! static int bezier_tree_walker PARAMS((RAY *, BICUBIC_PATCH *, BEZIER_NODE *,
  543. ! ISTACK *));
  544.   static BEZIER_NODE *create_new_bezier_node PARAMS((void));
  545.   static BEZIER_VERTICES *create_bezier_vertex_block PARAMS((void));
  546. ***************
  547. *** 551,557 ****
  548.     }
  549.   
  550. ! static void
  551. ! bezier_subpatch_intersect(ray, Shape, Patch, u0, u1, v0, v1,
  552. ! depth_count, Depths)
  553.   RAY *ray;
  554.   BICUBIC_PATCH *Shape;
  555. --- 550,555 ----
  556.     }
  557.   
  558. ! static int
  559. ! bezier_subpatch_intersect(ray, Shape, Patch, u0, u1, v0, v1, Depth_Stack)
  560.   RAY *ray;
  561.   BICUBIC_PATCH *Shape;
  562. ***************
  563. *** 558,565 ****
  564.   VECTOR (*Patch)[4][4];
  565.   DBL u0, u1, v0, v1;
  566. ! int *depth_count;
  567. ! DBL *Depths;
  568.     {
  569. !   int tcnt = Shape->Intersection_Count;
  570.     VECTOR V[3];
  571.     DBL u, v, Depth, uu[3], vv[3];
  572. --- 556,562 ----
  573.   VECTOR (*Patch)[4][4];
  574.   DBL u0, u1, v0, v1;
  575. ! ISTACK *Depth_Stack;
  576.     {
  577. !   int cnt = 0;
  578.     VECTOR V[3];
  579.     DBL u, v, Depth, uu[3], vv[3];
  580. ***************
  581. *** 566,573 ****
  582.     VECTOR P, N;
  583.   
  584. -   if (tcnt + *depth_count >= MAX_BICUBIC_INTERSECTIONS) return;
  585.     V[0] = (*Patch)[0][0];
  586.     V[1] = (*Patch)[0][3];
  587. !   V[2] = (*Patch)[3][0];
  588.   
  589.     uu[0] = u0; uu[1] = u0; uu[2] = u1;
  590. --- 563,569 ----
  591.     VECTOR P, N;
  592.   
  593.     V[0] = (*Patch)[0][0];
  594.     V[1] = (*Patch)[0][3];
  595. !   V[2] = (*Patch)[3][3];
  596.   
  597.     uu[0] = u0; uu[1] = u0; uu[2] = u1;
  598. ***************
  599. *** 576,587 ****
  600.     if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  601.       {
  602. !     Shape->IPoint[tcnt + *depth_count] = P;
  603. !     Shape->Normal_Vector[tcnt + *depth_count] = N;
  604. !     Depths[*depth_count] = Depth;
  605. !     *depth_count += 1;
  606.       }
  607.   
  608. -   if (tcnt + *depth_count >= MAX_BICUBIC_INTERSECTIONS) return;
  609.     V[1] = V[2];
  610.     V[2] = (*Patch)[3][0];
  611. --- 572,579 ----
  612.     if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  613.       {
  614. !     push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack);
  615. !     cnt++;
  616.       }
  617.   
  618.     V[1] = V[2];
  619.     V[2] = (*Patch)[3][0];
  620. ***************
  621. *** 591,599 ****
  622.     if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  623.       {
  624. !     Shape->IPoint[tcnt + *depth_count] = P;
  625. !     Shape->Normal_Vector[tcnt + *depth_count] = N;
  626. !     Depths[*depth_count] = Depth;
  627. !     *depth_count += 1;
  628.       }
  629.     }
  630.   
  631. --- 583,591 ----
  632.     if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  633.       {
  634. !     push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack);
  635. !     cnt++;
  636.       }
  637. +   return cnt;
  638.     }
  639.   
  640. ***************
  641. *** 749,754 ****
  642.     }
  643.   
  644. ! static void bezier_subdivider(Ray, Object, Patch, u0, u1, v0, v1,
  645. ! recursion_depth, depth_count, Depths)
  646.   RAY *Ray;
  647.   BICUBIC_PATCH *Object;
  648. --- 741,746 ----
  649.     }
  650.   
  651. ! static int bezier_subdivider(Ray, Object, Patch, u0, u1, v0, v1,
  652. ! recursion_depth, Depth_Stack)
  653.   RAY *Ray;
  654.   BICUBIC_PATCH *Object;
  655. ***************
  656. *** 755,760 ****
  657.   VECTOR (*Patch)[4][4];
  658.   DBL u0, u1, v0, v1;
  659. ! int recursion_depth, *depth_count;
  660. ! DBL *Depths;
  661.     {
  662.     VECTOR Lower_Left[4][4], Lower_Right[4][4];
  663. --- 747,752 ----
  664.   VECTOR (*Patch)[4][4];
  665.   DBL u0, u1, v0, v1;
  666. ! int recursion_depth;
  667. ! ISTACK *Depth_Stack;
  668.     {
  669.     VECTOR Lower_Left[4][4], Lower_Right[4][4];
  670. ***************
  671. *** 762,769 ****
  672.     VECTOR center;
  673.     DBL ut, vt, radius;
  674. !   int tcnt = Object->Intersection_Count;
  675. !   /* Don't waste time if there are already too many intersections */
  676. !   if (tcnt >= MAX_BICUBIC_INTERSECTIONS) return;
  677.   
  678.     /* Make sure the ray passes through a sphere bounding the control points of
  679. --- 754,758 ----
  680.     VECTOR center;
  681.     DBL ut, vt, radius;
  682. !   int cnt = 0;
  683.   
  684.     /* Make sure the ray passes through a sphere bounding the control points of
  685. ***************
  686. *** 771,775 ****
  687.     bezier_bounding_sphere(Patch, ¢er, &radius);
  688.     if (!spherical_bounds_check(Ray, ¢er, radius))
  689. !     return;
  690.   
  691.     /* If the patch is close to being flat, then just perform a ray-plane
  692. --- 760,764 ----
  693.     bezier_bounding_sphere(Patch, ¢er, &radius);
  694.     if (!spherical_bounds_check(Ray, ¢er, radius))
  695. !     return 0;
  696.   
  697.     /* If the patch is close to being flat, then just perform a ray-plane
  698. ***************
  699. *** 776,786 ****
  700.         intersection test. */
  701.     if (flat_enough(Object, Patch))
  702. !     bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1,
  703. !       depth_count, Depths);
  704.   
  705.     if (recursion_depth >= Object->U_Steps)
  706.       if (recursion_depth >= Object->V_Steps)
  707. !       bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1,
  708. !         depth_count, Depths);
  709.       else 
  710.         {
  711. --- 765,775 ----
  712.         intersection test. */
  713.     if (flat_enough(Object, Patch))
  714. !     return bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1,
  715. !                      Depth_Stack);
  716.   
  717.     if (recursion_depth >= Object->U_Steps)
  718.       if (recursion_depth >= Object->V_Steps)
  719. !        return bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1,
  720. !                     Depth_Stack);
  721.       else 
  722.         {
  723. ***************
  724. *** 788,797 ****
  725.           (VECTOR (*)[4][4])Upper_Left);
  726.         vt = (v1 - v0) / 2.0;
  727. !       bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  728. !         u0, u1, v0, vt,
  729. !         recursion_depth+1, depth_count, Depths);
  730. !       bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left,
  731. !         u0, u1, vt, v1,
  732. !         recursion_depth+1, depth_count, Depths);
  733.         }
  734.     else if (recursion_depth >= Object->V_Steps) 
  735. --- 777,784 ----
  736.           (VECTOR (*)[4][4])Upper_Left);
  737.         vt = (v1 - v0) / 2.0;
  738. !       cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  739. !                    u0, u1, v0, vt, recursion_depth+1, Depth_Stack);
  740. !       cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left,
  741. !                    u0, u1, vt, v1, recursion_depth+1, Depth_Stack);
  742.         }
  743.     else if (recursion_depth >= Object->V_Steps) 
  744. ***************
  745. *** 800,809 ****
  746.         (VECTOR (*)[4][4])Lower_Right);
  747.       ut = (u1 - u0) / 2.0;
  748. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  749. !       u0, ut, v0, v1,
  750. !       recursion_depth+1, depth_count, Depths);
  751. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right,
  752. !       ut, u1, v0, v1,
  753. !       recursion_depth+1, depth_count, Depths);
  754.       }
  755.     else 
  756. --- 787,794 ----
  757.         (VECTOR (*)[4][4])Lower_Right);
  758.       ut = (u1 - u0) / 2.0;
  759. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  760. !                  u0, ut, v0, v1, recursion_depth+1, Depth_Stack);
  761. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right,
  762. !                  ut, u1, v0, v1, recursion_depth+1, Depth_Stack);
  763.       }
  764.     else 
  765. ***************
  766. *** 812,835 ****
  767.       vt = (v1 - v0) / 2.0;
  768.       bezier_split_left_right(Patch, (VECTOR (*)[4][4])Lower_Left,
  769. !       (VECTOR (*)[4][4])Lower_Right);
  770.       bezier_split_up_down((VECTOR (*)[4][4])Lower_Left,
  771. !       (VECTOR (*)[4][4])Lower_Left,
  772. !       (VECTOR (*)[4][4])Upper_Left);
  773.       bezier_split_up_down((VECTOR (*)[4][4])Lower_Right,
  774. !       (VECTOR (*)[4][4])Lower_Right,
  775. !       (VECTOR (*)[4][4])Upper_Right);
  776. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  777. !       u0, ut, v0, vt,
  778. !       recursion_depth+1, depth_count, Depths);
  779. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left,
  780. !       u0, ut, vt, v1,
  781. !       recursion_depth+1, depth_count, Depths);
  782. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right,
  783. !       ut, u1, v0, vt,
  784. !       recursion_depth+1, depth_count, Depths);
  785. !     bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Right,
  786. !       ut, u1, vt, v1,
  787. !       recursion_depth+1, depth_count, Depths);
  788.       }
  789.     }
  790.   
  791. --- 797,817 ----
  792.       vt = (v1 - v0) / 2.0;
  793.       bezier_split_left_right(Patch, (VECTOR (*)[4][4])Lower_Left,
  794. !                 (VECTOR (*)[4][4])Lower_Right);
  795.       bezier_split_up_down((VECTOR (*)[4][4])Lower_Left,
  796. !              (VECTOR (*)[4][4])Lower_Left,
  797. !              (VECTOR (*)[4][4])Upper_Left) ;
  798.       bezier_split_up_down((VECTOR (*)[4][4])Lower_Right,
  799. !              (VECTOR (*)[4][4])Lower_Right,
  800. !              (VECTOR (*)[4][4])Upper_Right);
  801. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left,
  802. !                  u0, ut, v0, vt, recursion_depth+1, Depth_Stack);
  803. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left,
  804. !                  u0, ut, vt, v1, recursion_depth+1, Depth_Stack);
  805. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right,
  806. !                  ut, u1, v0, vt, recursion_depth+1, Depth_Stack);
  807. !     cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Right,
  808. !                  ut, u1, vt, v1, recursion_depth+1, Depth_Stack);
  809.       }
  810. +   return cnt;
  811.     }
  812.   
  813. ***************
  814. *** 857,866 ****
  815.     }
  816.   
  817. ! static void bezier_tree_walker(Ray, Shape, Node, depth, depth_count, Depths)
  818.   RAY *Ray;
  819.   BICUBIC_PATCH *Shape;
  820.   BEZIER_NODE *Node;
  821. ! int depth, *depth_count;
  822. ! DBL *Depths;
  823.     {
  824.     BEZIER_CHILDREN *Children;
  825. --- 839,847 ----
  826.     }
  827.   
  828. ! static int bezier_tree_walker(Ray, Shape, Node, Depth_Stack)
  829.   RAY *Ray;
  830.   BICUBIC_PATCH *Shape;
  831.   BEZIER_NODE *Node;
  832. ! ISTACK *Depth_Stack;
  833.     {
  834.     BEZIER_CHILDREN *Children;
  835. ***************
  836. *** 868,880 ****
  837.     VECTOR N, P, V[3];
  838.     DBL Depth, u, v, uu[3], vv[3];
  839. !   int i, tcnt = Shape->Intersection_Count;
  840.   
  841. -   /* Don't waste time if there are already too many intersections */
  842. -   if (tcnt >= MAX_BICUBIC_INTERSECTIONS) return;
  843.     /* Make sure the ray passes through a sphere bounding the control points of
  844.         the patch */
  845.     if (!spherical_bounds_check(Ray, &(Node->Center), Node->Radius_Squared))
  846. !     return;
  847.   
  848.     /* If this is an interior node then continue the descent, else
  849. --- 849,858 ----
  850.     VECTOR N, P, V[3];
  851.     DBL Depth, u, v, uu[3], vv[3];
  852. !   int i, cnt = 0;
  853.   
  854.     /* Make sure the ray passes through a sphere bounding the control points of
  855.         the patch */
  856.     if (!spherical_bounds_check(Ray, &(Node->Center), Node->Radius_Squared))
  857. !     return 0;
  858.   
  859.     /* If this is an interior node then continue the descent, else
  860. ***************
  861. *** 884,889 ****
  862.       Children = (BEZIER_CHILDREN *)Node->Data_Ptr;
  863.       for (i=0;i<Node->Count;i++)
  864. !       bezier_tree_walker(Ray, Shape, Children->Children[i],
  865. !         depth+1, depth_count, Depths);
  866.       }
  867.     else if (Node->Node_Type == BEZIER_LEAF_NODE) 
  868. --- 862,866 ----
  869.       Children = (BEZIER_CHILDREN *)Node->Data_Ptr;
  870.       for (i=0;i<Node->Count;i++)
  871. !       cnt += bezier_tree_walker(Ray, Shape, Children->Children[i], Depth_Stack);
  872.       }
  873.     else if (Node->Node_Type == BEZIER_LEAF_NODE) 
  874. ***************
  875. *** 902,914 ****
  876.   
  877.       /* Triangulate this subpatch, then check for intersections in
  878. !          the triangles. */
  879. !     if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  880. !       {
  881. !       Shape->IPoint[tcnt + *depth_count] = P;
  882. !       Shape->Normal_Vector[tcnt + *depth_count] = N;
  883. !       Depths[*depth_count] = Depth;
  884. !       *depth_count += 1;
  885.         }
  886. -     if (*depth_count + tcnt >= MAX_BICUBIC_INTERSECTIONS) return;
  887.   
  888.       V[1] = V[2];
  889. --- 879,887 ----
  890.   
  891.       /* Triangulate this subpatch, then check for intersections in
  892. !        the triangles. */
  893. !     if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) {
  894. !       push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack);
  895. !       cnt++;
  896.         }
  897.   
  898.       V[1] = V[2];
  899. ***************
  900. *** 917,926 ****
  901.       vv[1] = vv[2]; vv[2] = Vertices->uvbnds[2];
  902.   
  903. !     if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) 
  904. !       {
  905. !       Shape->IPoint[tcnt + *depth_count] = P;
  906. !       Shape->Normal_Vector[tcnt + *depth_count] = N;
  907. !       Depths[*depth_count] = Depth;
  908. !       *depth_count += 1;
  909.         }
  910.       }
  911. --- 890,896 ----
  912.       vv[1] = vv[2]; vv[2] = Vertices->uvbnds[2];
  913.   
  914. !     if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) {
  915. !       push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack);
  916. !       cnt++;
  917.         }
  918.       }
  919. ***************
  920. *** 927,955 ****
  921.     else 
  922.       {
  923. !     printf("Bad Node type at depth %d\n", depth);
  924.       }
  925. -   }
  926. - static int intersect_bicubic_patch0(Ray, Shape, Depths)
  927. - RAY *Ray;
  928. - BICUBIC_PATCH *Shape;
  929. - DBL *Depths;
  930. -   {
  931. -   int cnt = 0;
  932. -   VECTOR (*Patch)[4][4] = (VECTOR (*)[4][4]) Shape->Control_Points;
  933. -   bezier_subdivider(Ray, Shape, Patch, 0.0, 1.0, 0.0, 1.0,
  934. -     0, &cnt, Depths);
  935.     return cnt;
  936.     }
  937.   
  938. ! static int intersect_bicubic_patch1(Ray, Shape, Depths)
  939.   RAY *Ray;
  940.   BICUBIC_PATCH *Shape;
  941. ! DBL *Depths;
  942.     {
  943. !   int cnt = 0;
  944. !   bezier_tree_walker(Ray, Shape, Shape->Node_Tree, 0, &cnt, Depths);
  945. !   return cnt;
  946.     }
  947.   
  948. --- 897,914 ----
  949.     else 
  950.       {
  951. !     /* This should be a fatal error */
  952. !     printf("Bad Node type\n");
  953.       }
  954.     return cnt;
  955.     }
  956.   
  957. ! static int intersect_bicubic_patch0(Ray, Shape, Depth_Stack)
  958.   RAY *Ray;
  959.   BICUBIC_PATCH *Shape;
  960. ! ISTACK *Depth_Stack;
  961.     {
  962. !   VECTOR (*Patch)[4][4] = (VECTOR (*)[4][4]) Shape->Control_Points;
  963. !   return bezier_subdivider(Ray, Shape, Patch, 0.0, 1.0, 0.0, 1.0, 0,
  964. !                Depth_Stack);
  965.     }
  966.   
  967. ***************
  968. *** 959,965 ****
  969.   ISTACK *Depth_Stack;
  970.     {
  971. !   DBL Depths[MAX_BICUBIC_INTERSECTIONS];
  972. !   VECTOR IPoint;
  973. !   int cnt, tcnt, i, Found;
  974.   
  975.     Found = FALSE;
  976. --- 918,922 ----
  977.   ISTACK *Depth_Stack;
  978.     {
  979. !   int Found, cnt = 0;
  980.   
  981.     Found = FALSE;
  982. ***************
  983. *** 966,999 ****
  984.     Ray_Bicubic_Tests++;
  985.   
  986. -   if (Ray == CM_Ray)
  987. -     ((BICUBIC_PATCH *)Object)->Intersection_Count = 0;
  988. -   tcnt = ((BICUBIC_PATCH *)Object)->Intersection_Count;
  989.     switch (((BICUBIC_PATCH *)Object)->Patch_Type)
  990.     {
  991.     case 0: 
  992. !     cnt = intersect_bicubic_patch0(Ray, ((BICUBIC_PATCH *)Object), &Depths[0]);
  993.       break;
  994.     case 1: 
  995. !     cnt = intersect_bicubic_patch1(Ray, ((BICUBIC_PATCH *)Object), &Depths[0]);
  996.       break;
  997. !   default: 
  998.       Error("Bad patch type\n");
  999.     }
  1000.   
  1001. !   if (cnt > 0) Ray_Bicubic_Tests_Succeeded++;
  1002. !   for (i=0;i<cnt;i++) 
  1003. !     {
  1004. !     if (!Shadow_Test_Flag)
  1005. !       ((BICUBIC_PATCH *)Object)->Intersection_Count++;
  1006. !     IPoint = ((BICUBIC_PATCH *)Object)->IPoint[tcnt + i];
  1007. !     if (Point_In_Clip(&IPoint,Object->Clip))
  1008. !       {
  1009. !       push_entry(Depths[i], IPoint, Object, Depth_Stack);
  1010. !       Found = TRUE;
  1011. !       }
  1012. !     }
  1013. !   return (Found);
  1014.     }
  1015.   
  1016. --- 923,945 ----
  1017.     Ray_Bicubic_Tests++;
  1018.   
  1019.     switch (((BICUBIC_PATCH *)Object)->Patch_Type)
  1020.     {
  1021.     case 0: 
  1022. !     cnt = intersect_bicubic_patch0(Ray, ((BICUBIC_PATCH *)Object), Depth_Stack);
  1023.       break;
  1024.     case 1: 
  1025. !     cnt = bezier_tree_walker(Ray, (BICUBIC_PATCH *)Object,
  1026. !                  ((BICUBIC_PATCH *)Object)->Node_Tree, Depth_Stack);
  1027.       break;
  1028. !   default:
  1029.       Error("Bad patch type\n");
  1030.     }
  1031.   
  1032. !   if (cnt > 0) {
  1033. !      Ray_Bicubic_Tests_Succeeded++;
  1034. !      Found = TRUE;
  1035. !      }
  1036. !   return Found;
  1037.     }
  1038.   
  1039. ***************
  1040. *** 1010,1033 ****
  1041.   VECTOR *Result, *IPoint;
  1042.     {
  1043. !   BICUBIC_PATCH *Patch = (BICUBIC_PATCH *)Object;
  1044. !   int i;
  1045. !   /* If all is going well, the normal was computed at the time the intersection
  1046. !       was computed.  Look on the list of associated intersection points and normals */
  1047. !   for (i=0;i<Patch->Intersection_Count;i++)
  1048. !     if (IPoint->x == Patch->IPoint[i].x &&
  1049. !       IPoint->y == Patch->IPoint[i].y &&
  1050. !       IPoint->z == Patch->IPoint[i].z) 
  1051. !       {
  1052. !       Result->x = Patch->Normal_Vector[i].x;
  1053. !       Result->y = Patch->Normal_Vector[i].y;
  1054. !       Result->z = Patch->Normal_Vector[i].z;
  1055. !       return;
  1056. !       }
  1057. !   if (Options & DEBUGGING) 
  1058. !     {
  1059. !     printf("Bicubic patch normal for unknown intersection point\n");
  1060. !     fflush(stdout);
  1061. !     }
  1062.     Result->x = 1.0;
  1063.     Result->y = 0.0;
  1064. --- 956,960 ----
  1065.   VECTOR *Result, *IPoint;
  1066.     {
  1067. !   /* Should never get here! */
  1068.     Result->x = 1.0;
  1069.     Result->y = 0.0;
  1070. ***************
  1071. *** 1085,1092 ****
  1072.     INIT_OBJECT_FIELDS(New,BICUBIC_PATCH_OBJECT,&Bicubic_Patch_Methods)
  1073.   
  1074. !     New->Patch_Type = -1;
  1075.     New->U_Steps = 0;
  1076.     New->V_Steps = 0;
  1077. -   New->Intersection_Count = 0;
  1078.     New->Flatness_Value = 0.0;
  1079.     New->Node_Tree = NULL;
  1080. --- 1012,1018 ----
  1081.     INIT_OBJECT_FIELDS(New,BICUBIC_PATCH_OBJECT,&Bicubic_Patch_Methods)
  1082.   
  1083. !   New->Patch_Type = -1;
  1084.     New->U_Steps = 0;
  1085.     New->V_Steps = 0;
  1086.     New->Flatness_Value = 0.0;
  1087.     New->Node_Tree = NULL;
  1088. ***************
  1089. *** 1118,1122 ****
  1090.   
  1091.     New->Flatness_Value     = ((BICUBIC_PATCH *)Object)->Flatness_Value;
  1092. -   New->Intersection_Count = ((BICUBIC_PATCH *)Object)->Intersection_Count;
  1093.   
  1094.     Precompute_Patch_Values(New);
  1095. --- 1044,1047 ----
  1096. diff -c2 -r ./source/bound.c \povray2/source/bound.c
  1097. *** ./source/bound.c    Sun Aug 22 14:12:06 1993
  1098. --- \povray2/source/bound.c    Wed Nov  3 13:27:06 1993
  1099. ***************
  1100. *** 70,73 ****
  1101. --- 70,75 ----
  1102.   static void PriorityQueueDelete PARAMS((Qelem *Queue, unsigned *Qsize,
  1103.   DBL *key, OBJECT **obj));
  1104. + /* QSORT_FUNCT_RET compslabs PARAMS((QSORT_FUNCT_PARAM in_a,
  1105. + QSORT_FUNCT_PARAM in_b)); */
  1106.   
  1107.   /* Should move these out of here... */
  1108. ***************
  1109. *** 77,81 ****
  1110.   unsigned long nEnqueued = 0;
  1111.   
  1112. ! unsigned MAXQUEUE = 256;
  1113.   
  1114.   METHODS Composite_Methods =
  1115. --- 79,83 ----
  1116.   unsigned long nEnqueued = 0;
  1117.   
  1118. ! unsigned MAXQUEUE = 512;
  1119.   
  1120.   METHODS Composite_Methods =
  1121. ***************
  1122. *** 163,169 ****
  1123.     }
  1124.   
  1125. ! int CDECL compslabs(in_a, in_b)
  1126. ! void *in_a;
  1127. ! void *in_b;
  1128.     {
  1129.   
  1130. --- 165,171 ----
  1131.     }
  1132.   
  1133. ! QSORT_FUNCT_RET compslabs(in_a, in_b)
  1134. ! QSORT_FUNCT_PARAM in_a;
  1135. ! QSORT_FUNCT_PARAM in_b;
  1136.     {
  1137.   
  1138. diff -c2 -r ./source/boxes.c \povray2/source/boxes.c
  1139. *** ./source/boxes.c    Wed Jul 28 16:54:28 1993
  1140. --- \povray2/source/boxes.c    Wed Oct 13 20:50:10 1993
  1141. ***************
  1142. *** 338,350 ****
  1143.   VECTOR *Vector;
  1144.     {
  1145.     TRANSFORM Trans;
  1146.   
  1147.     if (((BOX *)Object)->Trans == NULL)
  1148.       {
  1149. !     VEvaluateEq(((BOX *)Object)->bounds[0], *Vector);
  1150. !     VEvaluateEq(((BOX *)Object)->bounds[1], *Vector);
  1151. !     Object->Bounds.Lower_Left = ((BOX *)Object)->bounds[0];
  1152. !     VSub(Object->Bounds.Lengths, ((BOX *)Object)->bounds[1],
  1153. !       ((BOX *)Object)->bounds[0]);
  1154.       }
  1155.     else
  1156. --- 338,366 ----
  1157.   VECTOR *Vector;
  1158.     {
  1159. +   BOX *Box = (BOX *)Object;
  1160.     TRANSFORM Trans;
  1161. +   DBL temp;
  1162.   
  1163.     if (((BOX *)Object)->Trans == NULL)
  1164.       {
  1165. !     VEvaluateEq(Box->bounds[0], *Vector);
  1166. !     VEvaluateEq(Box->bounds[1], *Vector);
  1167. !     if (Box->bounds[0].x > Box->bounds[1].x) {
  1168. !        temp = Box->bounds[0].x;
  1169. !        Box->bounds[0].x = Box->bounds[1].x;
  1170. !        Box->bounds[1].x = temp;
  1171. !        }
  1172. !     if (Box->bounds[0].y > Box->bounds[1].y) {
  1173. !        temp = Box->bounds[0].y;
  1174. !        Box->bounds[0].y = Box->bounds[1].y;
  1175. !        Box->bounds[1].y = temp;
  1176. !        }
  1177. !     if (Box->bounds[0].z > Box->bounds[1].z) {
  1178. !        temp = Box->bounds[0].z;
  1179. !        Box->bounds[0].z = Box->bounds[1].z;
  1180. !        Box->bounds[1].z = temp;
  1181. !        }
  1182. !     Box->Bounds.Lower_Left = Box->bounds[0];
  1183. !     VSub(Object->Bounds.Lengths, Box->bounds[1], Box->bounds[0]);
  1184.       }
  1185.     else
  1186. diff -c2 -r ./source/csg.c \povray2/source/csg.c
  1187. *** ./source/csg.c    Sun Aug 15 12:58:42 1993
  1188. --- \povray2/source/csg.c    Thu Oct 28 13:28:32 1993
  1189. ***************
  1190. *** 53,58 ****
  1191.   };
  1192.   
  1193. - extern RAY *VP_Ray;
  1194.   int All_CSG_Union_Intersections (Object, Ray, Depth_Stack)
  1195.   OBJECT *Object;
  1196. --- 53,56 ----
  1197. ***************
  1198. *** 392,394 ****
  1199.     VSub(Object->Bounds.Lengths, maxs, mins);
  1200.     }
  1201. --- 390,391 ----
  1202. diff -c2 -r ./source/frame.h \povray2/source/frame.h
  1203. *** ./source/frame.h    Thu Sep 30 13:00:00 1993
  1204. --- \povray2/source/frame.h    Mon Nov 29 13:47:34 1993
  1205. ***************
  1206. *** 34,38 ****
  1207.   /* These are used by POVRAY.C and the machine specific modules */
  1208.   
  1209. ! #define POV_RAY_VERSION "2.0"
  1210.   
  1211.   /* This message is for the personal distribution release. */
  1212. --- 34,38 ----
  1213.   /* These are used by POVRAY.C and the machine specific modules */
  1214.   
  1215. ! #define POV_RAY_VERSION "2.1"
  1216.   
  1217.   /* This message is for the personal distribution release. */
  1218. ***************
  1219. *** 41,45 ****
  1220.   #define DISTRIBUTION_MESSAGE_3 "The POV-Ray Team is not responsible for supporting this version."
  1221.   
  1222.   #ifndef READ_ENV_VAR_BEFORE 
  1223.   #define READ_ENV_VAR_BEFORE 
  1224. --- 41,44 ----
  1225. ***************
  1226. *** 236,239 ****
  1227. --- 235,254 ----
  1228.   #endif
  1229.   
  1230. + #ifndef QSORT_FUNCT_RET
  1231. + #define QSORT_FUNCT_RET int CDECL
  1232. + #endif
  1233. + #ifndef QSORT_FUNCT_PARAM
  1234. + #define QSORT_FUNCT_PARAM void *
  1235. + #endif
  1236. + #ifndef MAIN_RETURN_TYPE
  1237. + #define MAIN_RETURN_TYPE void
  1238. + #endif
  1239. + #ifndef MAIN_RETURN_STATEMENT
  1240. + #define MAIN_RETURN_STATEMENT
  1241. + #endif
  1242.   /* These values determine the minumum and maximum distances
  1243.      that qualify as ray-object intersections */
  1244. ***************
  1245. *** 515,518 ****
  1246. --- 530,535 ----
  1247.   #define SMOOTH_OK_OBJECT      128   /* SMOOTH legal */
  1248.   #define IS_CHILD_OBJECT       256   /* Object is inside a COMPOUND */
  1249. + #define DOUBLE_ILLUMINATE     512   /* Illuminate both sides of surface to
  1250. +                                        avoid normal purturb bug */
  1251.   
  1252.   #define COMPOSITE_OBJECT       (BOUNDING_OBJECT)
  1253. ***************
  1254. *** 525,530 ****
  1255.   #define HEIGHT_FIELD_OBJECT    (BASIC_OBJECT+WATER_LEVEL_OK_OBJECT+SMOOTH_OK_OBJECT)
  1256.   #define TRIANGLE_OBJECT        (PATCH_OBJECT)
  1257. ! #define SMOOTH_TRIANGLE_OBJECT (PATCH_OBJECT)
  1258. ! #define BICUBIC_PATCH_OBJECT   (PATCH_OBJECT)
  1259.   #define UNION_OBJECT           (COMPOUND_OBJECT)
  1260.   #define MERGE_OBJECT           (COMPOUND_OBJECT)
  1261. --- 542,547 ----
  1262.   #define HEIGHT_FIELD_OBJECT    (BASIC_OBJECT+WATER_LEVEL_OK_OBJECT+SMOOTH_OK_OBJECT)
  1263.   #define TRIANGLE_OBJECT        (PATCH_OBJECT)
  1264. ! #define SMOOTH_TRIANGLE_OBJECT (PATCH_OBJECT+DOUBLE_ILLUMINATE)
  1265. ! #define BICUBIC_PATCH_OBJECT   (PATCH_OBJECT+DOUBLE_ILLUMINATE)
  1266.   #define UNION_OBJECT           (COMPOUND_OBJECT)
  1267.   #define MERGE_OBJECT           (COMPOUND_OBJECT)
  1268. ***************
  1269. *** 605,609 ****
  1270.   
  1271.   #define INIT_OBJECT_FIELDS(o,t,m)\
  1272. !  o->Type=t;o->Methods=m;o->Sibling=NULL;o->Texture=NULL;\
  1273.    o->Bound=NULL;o->Clip=NULL;o->No_Shadow_Flag=FALSE;\
  1274.    Make_Vector(&o->Bounds.Lower_Left, -BOUND_HUGE/2, -BOUND_HUGE/2, -BOUND_HUGE/2)\
  1275. --- 622,626 ----
  1276.   
  1277.   #define INIT_OBJECT_FIELDS(o,t,m)\
  1278. !  o->Type=t;o->Methods= m;o->Sibling=NULL;o->Texture=NULL;\
  1279.    o->Bound=NULL;o->Clip=NULL;o->No_Shadow_Flag=FALSE;\
  1280.    Make_Vector(&o->Bounds.Lower_Left, -BOUND_HUGE/2, -BOUND_HUGE/2, -BOUND_HUGE/2)\
  1281. ***************
  1282. *** 782,786 ****
  1283.   #define BEZIER_INTERIOR_NODE 0
  1284.   #define BEZIER_LEAF_NODE 1
  1285. - #define MAX_BICUBIC_INTERSECTIONS 32
  1286.   
  1287.   #define MAX_PATCH_TYPE 4
  1288. --- 799,802 ----
  1289. ***************
  1290. *** 794,802 ****
  1291.      DBL Bounding_Sphere_Radius;
  1292.      DBL Flatness_Value;
  1293. -    int Intersection_Count;
  1294. -    VECTOR Normal_Vector[MAX_BICUBIC_INTERSECTIONS];
  1295. -    VECTOR IPoint[MAX_BICUBIC_INTERSECTIONS];
  1296. -    VECTOR **Interpolated_Grid, **Interpolated_Normals, **Smooth_Normals;
  1297. -    DBL **Interpolated_D;
  1298.      BEZIER_NODE *Node_Tree;
  1299.     };
  1300. --- 810,813 ----
  1301. ***************
  1302. *** 920,923 ****
  1303. --- 931,936 ----
  1304.      DBL Depth;
  1305.      VECTOR IPoint;
  1306. +    VECTOR INormal;
  1307. +    int NFlag;
  1308.      OBJECT *Object;
  1309.     };
  1310. ***************
  1311. *** 932,937 ****
  1312.   #define itop(i) i->istack[i->top_entry]
  1313.   #define push_entry(d,v,o,i) itop(i).Depth=d; itop(i).IPoint=v; \
  1314. !  itop(i).Object=o; incstack(i);
  1315. ! #define push_copy(i,e) itop(i)=*e; incstack(i);
  1316.   #define pop_entry(i) (i->top_entry > 0)?&(i->istack[--i->top_entry]):NULL
  1317.   
  1318. --- 945,952 ----
  1319.   #define itop(i) i->istack[i->top_entry]
  1320.   #define push_entry(d,v,o,i) itop(i).Depth=d; itop(i).IPoint=v; \
  1321. !  itop(i).NFlag=0; itop(i).Object=o; incstack(i);
  1322. ! #define push_normal_entry(d,v,n,o,i) itop(i).Depth=d; itop(i).IPoint=v; \
  1323. !  itop(i).INormal=n; itop(i).NFlag=1; itop(i).Object=o; incstack(i);
  1324. ! #define push_copy(i,e) itop(i)= *e; incstack(i);
  1325.   #define pop_entry(i) (i->top_entry > 0)?&(i->istack[--i->top_entry]):NULL
  1326.   
  1327. diff -c2 -r ./source/hfield.c \povray2/source/hfield.c
  1328. *** ./source/hfield.c    Tue Sep 21 15:55:34 1993
  1329. --- \povray2/source/hfield.c    Mon Nov 29 13:40:40 1993
  1330. ***************
  1331. *** 1297,1301 ****
  1332.                 break;
  1333.               case TGA_FILE:
  1334. !               if (Image->data.rgb_lines != NULL) 
  1335.                   {
  1336.                   temp1 = Image->data.rgb_lines[max_z - z - 1].red[x];
  1337. --- 1297,1301 ----
  1338.                 break;
  1339.               case TGA_FILE:
  1340. !               if (Image->Colour_Map == NULL) 
  1341.                   {
  1342.                   temp1 = Image->data.rgb_lines[max_z - z - 1].red[x];
  1343. ***************
  1344. *** 1340,1344 ****
  1345.             free(Image->data.map_lines[max_z - z - 1]); break;
  1346.           case TGA_FILE:
  1347. !           if (Image->data.rgb_lines != NULL) 
  1348.               {
  1349.               free(Image->data.rgb_lines[max_z - z - 1].blue);
  1350. --- 1340,1344 ----
  1351.             free(Image->data.map_lines[max_z - z - 1]); break;
  1352.           case TGA_FILE:
  1353. !           if (Image->Colour_Map == NULL) 
  1354.               {
  1355.               free(Image->data.rgb_lines[max_z - z - 1].blue);
  1356. diff -c2 -r ./source/lighting.c \povray2/source/lighting.c
  1357. *** ./source/lighting.c    Sun Oct  3 10:24:28 1993
  1358. --- \povray2/source/lighting.c    Fri Oct 29 12:12:52 1993
  1359. ***************
  1360. *** 298,302 ****
  1361.           IPoint, &Dummy_Colour);
  1362.   
  1363. !       Sample_Colour[i]=*Light_Colour;
  1364.   
  1365.         Block_Point_Light (Light_Source, Light_Source_Depth,
  1366. --- 298,302 ----
  1367.           IPoint, &Dummy_Colour);
  1368.   
  1369. !       Sample_Colour[i]= *Light_Colour;
  1370.   
  1371.         Block_Point_Light (Light_Source, Light_Source_Depth,
  1372. ***************
  1373. *** 352,356 ****
  1374.           IPoint, &Dummy_Colour);
  1375.   
  1376. !       Sample_Colour[i]=*Light_Colour;
  1377.   
  1378.         Block_Area_Light (Light_Source, Light_Source_Depth,
  1379. --- 352,356 ----
  1380.           IPoint, &Dummy_Colour);
  1381.   
  1382. !       Sample_Colour[i]= *Light_Colour;
  1383.   
  1384.         Block_Area_Light (Light_Source, Light_Source_Depth,
  1385. ***************
  1386. *** 761,765 ****
  1387.     }
  1388.   
  1389. ! void Diffuse (Finish, IPoint, Eye, Layer_Normal, Layer_Pigment_Colour, Colour, Attenuation)
  1390.   FINISH *Finish;
  1391.   VECTOR *IPoint, *Layer_Normal;
  1392. --- 761,765 ----
  1393.     }
  1394.   
  1395. ! void Diffuse (Finish, IPoint, Eye, Layer_Normal, Layer_Pigment_Colour, Colour, Attenuation, Object)
  1396.   FINISH *Finish;
  1397.   VECTOR *IPoint, *Layer_Normal;
  1398. ***************
  1399. *** 768,771 ****
  1400. --- 768,772 ----
  1401.   RAY    *Eye;
  1402.   DBL    Attenuation;
  1403. + OBJECT *Object;
  1404.     {
  1405.     DBL Light_Source_Depth, Cos_Shadow_Angle;
  1406. ***************
  1407. *** 802,809 ****
  1408.   
  1409.       /* See if light on far side of surface from camera. */
  1410. -     VDot(Cos_Shadow_Angle,*Layer_Normal,Light_Source_Ray.Direction);
  1411.   
  1412. !     if (Cos_Shadow_Angle < 0.0)
  1413. !       continue;
  1414.   
  1415.       /* If light source was not blocked by any intervening object, then
  1416. --- 803,813 ----
  1417.   
  1418.       /* See if light on far side of surface from camera. */
  1419.   
  1420. !     if (!(Object->Type & DOUBLE_ILLUMINATE))
  1421. !       {
  1422. !        VDot(Cos_Shadow_Angle,*Layer_Normal,Light_Source_Ray.Direction);
  1423. !        if (Cos_Shadow_Angle < 0.0)
  1424. !          continue;
  1425. !       }
  1426.   
  1427.       /* If light source was not blocked by any intervening object, then
  1428. ***************
  1429. *** 1054,1059 ****
  1430.       }
  1431.   
  1432. !   Diffuse (Finish, &Ray_Intersection ->IPoint, Ray,
  1433. !     Layer_Normal, Layer_Pigment_Colour, &Emitted_Colour, Attenuation);
  1434.   
  1435.     Colour->Red   += Emitted_Colour.Red;
  1436. --- 1058,1064 ----
  1437.       }
  1438.   
  1439. !   Diffuse (Finish, &Ray_Intersection->IPoint, Ray,
  1440. !     Layer_Normal, Layer_Pigment_Colour, &Emitted_Colour, Attenuation, 
  1441. !     Ray_Intersection->Object);
  1442.   
  1443.     Colour->Red   += Emitted_Colour.Red;
  1444. ***************
  1445. *** 1083,1087 ****
  1446.   #define QColour Texture->Pigment->Quick_Colour
  1447.   
  1448. !   Normal (&Raw_Normal, Ray_Intersection->Object, &Ray_Intersection->IPoint);
  1449.     /* Now, we perform the lighting calculations. */
  1450.   
  1451. --- 1088,1097 ----
  1452.   #define QColour Texture->Pigment->Quick_Colour
  1453.   
  1454. !   /* Get the normal to the surface */
  1455. !   if (Ray_Intersection->NFlag)
  1456. !      Raw_Normal = Ray_Intersection->INormal;
  1457. !   else
  1458. !      Normal (&Raw_Normal, Ray_Intersection->Object, &Ray_Intersection->IPoint);
  1459.     /* Now, we perform the lighting calculations. */
  1460.   
  1461. ***************
  1462. *** 1246,1248 ****
  1463.   
  1464.     }
  1465. --- 1256,1257 ----
  1466. diff -c2 -r ./source/objects.c \povray2/source/objects.c
  1467. *** ./source/objects.c    Wed Jul 28 17:53:20 1993
  1468. --- \povray2/source/objects.c    Thu Oct 28 13:13:26 1993
  1469. ***************
  1470. *** 26,30 ****
  1471.   #include "povproto.h"
  1472.   
  1473. - extern RAY *VP_Ray;
  1474.   extern long Bounding_Region_Tests, Bounding_Region_Tests_Succeeded;
  1475.   extern long Clipping_Region_Tests, Clipping_Region_Tests_Succeeded;
  1476. --- 26,29 ----
  1477. ***************
  1478. *** 143,154 ****
  1479.     New = Copy (Old);
  1480.   
  1481. !   /* This is redundant if Copy did *New = *Old but we cannot assume it did.
  1482.      It is safe for Copy to do *New = *Old but it should not otherwise
  1483. !    touch OBJECT_FIELDS.
  1484. !    
  1485. !    Because New and Old are type OBJECT, only OBJECT_FIELDS are affected
  1486. !    by the next statement. */
  1487.   
  1488. !   *New = *Old;
  1489.   
  1490.     New->Sibling = NULL;          /* Important */
  1491. --- 142,158 ----
  1492.     New = Copy (Old);
  1493.   
  1494. !   /* The following copying of OBJECT_FIELDS is redundant if Copy 
  1495. !    did *New = *Old but we cannot assume it did.
  1496.      It is safe for Copy to do *New = *Old but it should not otherwise
  1497. !    touch OBJECT_FIELDS. */
  1498.   
  1499. !   New->Methods = Old->Methods;
  1500. !   New->Type    = Old->Type;
  1501. !   New->Sibling = Old->Sibling;
  1502. !   New->Texture = Old->Texture;
  1503. !   New->Bound   = Old->Bound;
  1504. !   New->Clip    = Old->Clip;
  1505. !   New->Bounds  = Old->Bounds;
  1506. !   New->No_Shadow_Flag = Old->No_Shadow_Flag;
  1507.   
  1508.     New->Sibling = NULL;          /* Important */
  1509. diff -c2 -r ./source/parse.c \povray2/source/parse.c
  1510. *** ./source/parse.c    Sun Sep 26 17:02:40 1993
  1511. --- \povray2/source/parse.c    Tue Nov  9 14:35:14 1993
  1512. ***************
  1513. *** 1012,1027 ****
  1514.          EXIT
  1515.        END_CASE
  1516.   
  1517. !      OTHERWISE  /* Look for [pnf_texture] */
  1518.          UNGET
  1519.          Texture = Copy_Textures (Default_Texture);
  1520. !        EXPECT   /* Look for [tpnf_ids] */
  1521. !          CASE (TEXTURE_ID_TOKEN)
  1522. !            Destroy_Textures(Texture);
  1523. !            Texture = Copy_Textures((TEXTURE *) Token.Constant_Data);
  1524. !          END_CASE
  1525.            CASE (PIGMENT_ID_TOKEN)
  1526.              Destroy_Pigment(Texture->Pigment);
  1527. --- 1012,1032 ----
  1528.          EXIT
  1529.        END_CASE
  1530. +      
  1531. +      CASE (TEXTURE_ID_TOKEN)
  1532. +        Texture = Copy_Textures((TEXTURE *) Token.Constant_Data);
  1533. +        EXIT
  1534. +      END_CASE
  1535.   
  1536. !      OTHERWISE
  1537.          UNGET
  1538.          Texture = Copy_Textures (Default_Texture);
  1539. !        EXIT
  1540. !      END_CASE
  1541. !    END_EXPECT
  1542. !    
  1543. !    /* Look for [pnf_texture] */
  1544. !    if (Texture->Type == PNF_TEXTURE)
  1545. !      {
  1546. !        EXPECT   /* Look for [pnf_ids] */
  1547.            CASE (PIGMENT_ID_TOKEN)
  1548.              Destroy_Pigment(Texture->Pigment);
  1549. ***************
  1550. *** 1408,1415 ****
  1551.            Parse_Error(PIGMENT_ID_TOKEN);
  1552.   
  1553. !        EXIT
  1554. !      END_CASE        /* End of pnf texture */
  1555. !    END_EXPECT       /* End of texture_body */
  1556.   
  1557.      EXPECT            /* Look for texture_mods */
  1558. --- 1413,1417 ----
  1559.            Parse_Error(PIGMENT_ID_TOKEN);
  1560.   
  1561. !      }
  1562.   
  1563.      EXPECT            /* Look for texture_mods */
  1564. ***************
  1565. *** 1510,1514 ****
  1566. --- 1512,1519 ----
  1567.      VECTOR Local_Vector;
  1568.      TEXTURE *Local_Texture;
  1569. +    OBJECT *Temp1_Object;
  1570. +    OBJECT *Temp2_Object;
  1571.      COLOUR Local_Colour;
  1572. +    DBL Temp_Water_Level;
  1573.   
  1574.      EXPECT
  1575. ***************
  1576. *** 1548,1555 ****
  1577.          Parse_Begin ();
  1578.          if (Object->Bound != NULL)
  1579. !          Error ("Cannot have more than one BOUNDED_BY {} per object");
  1580.   
  1581.          EXPECT
  1582.            CASE (CLIPPED_BY_TOKEN)
  1583.              Object->Bound = Object->Clip;
  1584.              EXIT
  1585. --- 1553,1563 ----
  1586.          Parse_Begin ();
  1587.          if (Object->Bound != NULL)
  1588. !          if (Object->Clip == Object->Bound)
  1589. !            Error ("Cannot add bounds after linking bounds and clips");
  1590.   
  1591.          EXPECT
  1592.            CASE (CLIPPED_BY_TOKEN)
  1593. +            if (Object->Bound != NULL)
  1594. +              Error ("Cannot link clips with previous bounds");
  1595.              Object->Bound = Object->Clip;
  1596.              EXIT
  1597. ***************
  1598. *** 1558,1562 ****
  1599.            OTHERWISE
  1600.              UNGET
  1601. !            Object->Bound = Parse_Bound_Clip ();
  1602.              EXIT
  1603.            END_CASE
  1604. --- 1566,1574 ----
  1605.            OTHERWISE
  1606.              UNGET
  1607. !            Temp1_Object = Temp2_Object = Parse_Bound_Clip ();
  1608. !            while (Temp2_Object->Sibling != NULL)
  1609. !              Temp2_Object = Temp2_Object->Sibling;
  1610. !            Temp2_Object->Sibling = Object->Bound;
  1611. !            Object->Bound = Temp1_Object;
  1612.              EXIT
  1613.            END_CASE
  1614. ***************
  1615. *** 1569,1576 ****
  1616.          Parse_Begin ();
  1617.          if (Object->Clip != NULL)
  1618. !          Error ("Cannot have more than one CLIPPED_BY {} per object");
  1619.   
  1620.          EXPECT
  1621.            CASE (BOUNDED_BY_TOKEN)
  1622.              Object->Clip = Object->Bound;
  1623.              EXIT
  1624. --- 1581,1591 ----
  1625.          Parse_Begin ();
  1626.          if (Object->Clip != NULL)
  1627. !          if (Object->Clip == Object->Bound)
  1628. !            Error ("Cannot add clips after linking bounds and clips");
  1629.   
  1630.          EXPECT
  1631.            CASE (BOUNDED_BY_TOKEN)
  1632. +            if (Object->Clip != NULL)
  1633. +              Error ("Cannot link bounds with previous clips");
  1634.              Object->Clip = Object->Bound;
  1635.              EXIT
  1636. ***************
  1637. *** 1579,1583 ****
  1638.            OTHERWISE
  1639.              UNGET
  1640. !            Object->Clip = Parse_Bound_Clip ();
  1641.              EXIT
  1642.            END_CASE
  1643. --- 1594,1602 ----
  1644.            OTHERWISE
  1645.              UNGET
  1646. !            Temp1_Object = Temp2_Object = Parse_Bound_Clip ();
  1647. !            while (Temp2_Object->Sibling != NULL)
  1648. !              Temp2_Object = Temp2_Object->Sibling;
  1649. !            Temp2_Object->Sibling = Object->Clip;
  1650. !            Object->Clip = Temp1_Object;
  1651.              EXIT
  1652.            END_CASE
  1653. ***************
  1654. *** 1636,1640 ****
  1655.          if (!(Object->Type & WATER_LEVEL_OK_OBJECT))
  1656.            Error ("Cannot use WATER_LEVEL here");
  1657. !        ((HEIGHT_FIELD *) Object)->bounding_box->bounds[0].y = 65536.0 * Parse_Float();
  1658.        END_CASE
  1659.   
  1660. --- 1655,1662 ----
  1661.          if (!(Object->Type & WATER_LEVEL_OK_OBJECT))
  1662.            Error ("Cannot use WATER_LEVEL here");
  1663. !        Temp_Water_Level = Parse_Float();
  1664. !        if (Language_Version < 2.0)
  1665. !          Temp_Water_Level /=256.0;
  1666. !        ((HEIGHT_FIELD *) Object)->bounding_box->bounds[0].y = 65536.0 * Temp_Water_Level;
  1667.        END_CASE
  1668.   
  1669. ***************
  1670. *** 1643,1646 ****
  1671. --- 1665,1669 ----
  1672.            Error ("Cannot use SMOOTH here");
  1673.          ((HEIGHT_FIELD *) Object)->Smoothed = TRUE;
  1674. +        Object->Type |= DOUBLE_ILLUMINATE;
  1675.        END_CASE
  1676.   
  1677. ***************
  1678. *** 1873,1876 ****
  1679. --- 1896,1900 ----
  1680.     {
  1681.      BOX *Object;
  1682. +    DBL temp;
  1683.   
  1684.      Parse_Begin ();
  1685. ***************
  1686. *** 1883,1888 ****
  1687.      Parse_Vector(&(Object->bounds[0]));     Parse_Comma();
  1688.      Parse_Vector(&(Object->bounds[1]));
  1689. !    
  1690. !    Object->Bounds.Lower_Left=Object->bounds[0];
  1691.      VSub(Object->Bounds.Lengths, Object->bounds[1],Object->bounds[0]);
  1692.   
  1693. --- 1907,1928 ----
  1694.      Parse_Vector(&(Object->bounds[0]));     Parse_Comma();
  1695.      Parse_Vector(&(Object->bounds[1]));
  1696. !     if (Object->bounds[0].x > Object->bounds[1].x) {
  1697. !        temp = Object->bounds[0].x;
  1698. !        Object->bounds[0].x = Object->bounds[1].x;
  1699. !        Object->bounds[1].x = temp;
  1700. !        }
  1701. !     if (Object->bounds[0].y > Object->bounds[1].y) {
  1702. !        temp = Object->bounds[0].y;
  1703. !        Object->bounds[0].y = Object->bounds[1].y;
  1704. !        Object->bounds[1].y = temp;
  1705. !        }
  1706. !     if (Object->bounds[0].z > Object->bounds[1].z) {
  1707. !        temp = Object->bounds[0].z;
  1708. !        Object->bounds[0].z = Object->bounds[1].z;
  1709. !        Object->bounds[1].z = temp;
  1710. !        }
  1711. !    Object->Bounds.Lower_Left = Object->bounds[0];
  1712.      VSub(Object->Bounds.Lengths, Object->bounds[1],Object->bounds[0]);
  1713.   
  1714. ***************
  1715. *** 1892,1895 ****
  1716. --- 1932,1937 ----
  1717.     }
  1718.   
  1719. +  
  1720.   static
  1721.   OBJECT *Parse_Disc ()
  1722. ***************
  1723. *** 3164,3169 ****
  1724.        }
  1725.      else
  1726. !      if (Object->Texture == NULL)
  1727. !        Object->Texture = Copy_Textures(Default_Texture);
  1728.      Post_Textures (Object->Texture);
  1729.      if ((Object->Type & WATER_LEVEL_OK_OBJECT) &&
  1730. --- 3206,3216 ----
  1731.        }
  1732.      else
  1733. !      {
  1734. !       if (Object->Texture == NULL)
  1735. !         Object->Texture = Copy_Textures(Default_Texture);
  1736. !       if (Object->Texture->Type == PNF_TEXTURE) 
  1737. !         if (Object->Texture->Tnormal != NULL)
  1738. !           Object->Type |= DOUBLE_ILLUMINATE;
  1739. !      }
  1740.      Post_Textures (Object->Texture);
  1741.      if ((Object->Type & WATER_LEVEL_OK_OBJECT) &&
  1742. diff -c2 -r ./source/povproto.h \povray2/source/povproto.h
  1743. *** ./source/povproto.h    Fri Jul 16 16:43:56 1993
  1744. --- \povray2/source/povproto.h    Tue Oct 12 14:21:46 1993
  1745. ***************
  1746. *** 283,287 ****
  1747.   void Add_Pigment PARAMS((COLOUR *Colour, PIGMENT *Pigment, VECTOR *IPoint));
  1748.   void Perturb_Normal PARAMS((VECTOR *Layer_Normal, TNORMAL *Tnormal, VECTOR *IPoint));
  1749. ! void Diffuse PARAMS((FINISH *Finish, VECTOR *IPoint, RAY *Eye, VECTOR *Layer_Normal, COLOUR *Layer_Colour, COLOUR *Colour,DBL Attenuation));
  1750.   void Reflect PARAMS((DBL Reflection, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour));
  1751.   void Refract PARAMS((TEXTURE *Texture, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour));
  1752. --- 283,288 ----
  1753.   void Add_Pigment PARAMS((COLOUR *Colour, PIGMENT *Pigment, VECTOR *IPoint));
  1754.   void Perturb_Normal PARAMS((VECTOR *Layer_Normal, TNORMAL *Tnormal, VECTOR *IPoint));
  1755. ! void Diffuse PARAMS((FINISH *Finish, VECTOR *IPoint, RAY *Eye, VECTOR *Layer_Normal, 
  1756. !  COLOUR *Layer_Colour, COLOUR *Colour,DBL Attenuation, OBJECT *Object));
  1757.   void Reflect PARAMS((DBL Reflection, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour));
  1758.   void Refract PARAMS((TEXTURE *Texture, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour));
  1759. diff -c2 -r ./source/povray.c \povray2/source/povray.c
  1760. *** ./source/povray.c    Sun Oct  3 10:21:50 1993
  1761. --- \povray2/source/povray.c    Thu Oct 28 13:13:30 1993
  1762. ***************
  1763. *** 105,117 ****
  1764.   #ifdef NOCMDLINE    /* a main() by any other name... */
  1765.   #ifdef ALTMAIN
  1766. ! void alt_main()
  1767.   #else
  1768. !   void main()
  1769.   #endif
  1770.   #else
  1771.   #ifdef ALTMAIN
  1772. !   void alt_main(argc, argv)
  1773.   #else
  1774. !   void main(argc, argv)
  1775.   #endif
  1776.       int argc;
  1777. --- 105,117 ----
  1778.   #ifdef NOCMDLINE    /* a main() by any other name... */
  1779.   #ifdef ALTMAIN
  1780. !   MAIN_RETURN_TYPE alt_main()
  1781.   #else
  1782. !   MAIN_RETURN_TYPE main()
  1783.   #endif
  1784.   #else
  1785.   #ifdef ALTMAIN
  1786. !   MAIN_RETURN_TYPE alt_main(argc, argv)
  1787.   #else
  1788. !   MAIN_RETURN_TYPE main(argc, argv)
  1789.   #endif
  1790.       int argc;
  1791. ***************
  1792. *** 157,161 ****
  1793.   
  1794.     if (Last_Column == -1)
  1795. !     Last_Column = Frame.Screen_Width-1;
  1796.   
  1797.     if (Options & DISKWRITE) 
  1798. --- 157,161 ----
  1799.   
  1800.     if (Last_Column == -1)
  1801. !     Last_Column = Frame.Screen_Width;
  1802.   
  1803.     if (Options & DISKWRITE) 
  1804. ***************
  1805. *** 374,380 ****
  1806.     Last_Column = -1;
  1807.   
  1808. !   First_Line_Temp = (DBL) First_Line;
  1809.     Last_Line_Temp = (DBL) Last_Line;
  1810. !   First_Column_Temp = (DBL) First_Column ;
  1811.     Last_Column_Temp = (DBL) Last_Column;
  1812.   
  1813. --- 374,380 ----
  1814.     Last_Column = -1;
  1815.   
  1816. !   First_Line_Temp = (DBL) First_Line+1;
  1817.     Last_Line_Temp = (DBL) Last_Line;
  1818. !   First_Column_Temp = (DBL) First_Column+1;
  1819.     Last_Column_Temp = (DBL) Last_Column;
  1820.   
  1821. ***************
  1822. *** 706,710 ****
  1823.         First_Column = (int) (Frame.Screen_Width * First_Column_Temp);
  1824.       else
  1825. !       First_Column = (int) First_Column_Temp;
  1826.   
  1827.       if(First_Line_Temp > 0.0 && First_Line_Temp < 1.0)
  1828. --- 706,710 ----
  1829.         First_Column = (int) (Frame.Screen_Width * First_Column_Temp);
  1830.       else
  1831. !       First_Column = (int) First_Column_Temp-1;
  1832.   
  1833.       if(First_Line_Temp > 0.0 && First_Line_Temp < 1.0)
  1834. ***************
  1835. *** 711,715 ****
  1836.         First_Line = (int) (Frame.Screen_Height * First_Line_Temp);
  1837.       else
  1838. !       First_Line = (int) First_Line_Temp;
  1839.   
  1840.       if (First_Column < 0)
  1841. --- 711,715 ----
  1842.         First_Line = (int) (Frame.Screen_Height * First_Line_Temp);
  1843.       else
  1844. !       First_Line = (int) First_Line_Temp-1;
  1845.   
  1846.       if (First_Column < 0)
  1847. ***************
  1848. *** 750,755 ****
  1849.         Last_Line = (int) Last_Line_Temp;
  1850.   
  1851. !     if (Last_Column < 0 || Last_Column >= Frame.Screen_Width)
  1852. !       Last_Column = Frame.Screen_Width - 1;
  1853.   
  1854.       if (Last_Line > Frame.Screen_Height)
  1855. --- 750,755 ----
  1856.         Last_Line = (int) Last_Line_Temp;
  1857.   
  1858. !     if (Last_Column < 0 || Last_Column > Frame.Screen_Width)
  1859. !       Last_Column = Frame.Screen_Width;
  1860.   
  1861.       if (Last_Line > Frame.Screen_Height)
  1862. ***************
  1863. *** 772,776 ****
  1864.       case 'b': /* Min Bounded */
  1865.       case 'B':
  1866. !       if (sscanf (&Option_String[2], "%d", &bounds_thresh) != EOF)
  1867.           Bounds_Threshold=bounds_thresh;
  1868.         Use_Slabs = Add_Option;
  1869. --- 772,776 ----
  1870.       case 'b': /* Min Bounded */
  1871.       case 'B':
  1872. !       if (sscanf (&Option_String[2], "%ld", &bounds_thresh) != EOF)
  1873.           Bounds_Threshold=bounds_thresh;
  1874.         Use_Slabs = Add_Option;
  1875. ***************
  1876. *** 865,869 ****
  1877.   
  1878.       fprintf (stdout,"-q%d -w%d -h%d -s%d -e%d\n",Quality,
  1879. !       Frame.Screen_Width, Frame.Screen_Height, First_Line, Last_Line);
  1880.   
  1881.       fprintf (stdout, "-k%.3f -mv%.1f -i%s ", Clock_Value, Language_Version, 
  1882. --- 865,869 ----
  1883.   
  1884.       fprintf (stdout,"-q%d -w%d -h%d -s%d -e%d\n",Quality,
  1885. !       Frame.Screen_Width, Frame.Screen_Height, First_Line+1, Last_Line);
  1886.   
  1887.       fprintf (stdout, "-k%.3f -mv%.1f -i%s ", Clock_Value, Language_Version, 
  1888. diff -c2 -r ./source/render.c \povray2/source/render.c
  1889. *** ./source/render.c    Thu Aug 26 15:41:18 1993
  1890. --- \povray2/source/render.c    Thu Oct 28 13:13:32 1993
  1891. ***************
  1892. *** 153,157 ****
  1893.       check_stats(y);
  1894.   
  1895. !     for (x = First_Column ; x <= Last_Column ; x++) 
  1896.         {
  1897.   
  1898. --- 153,157 ----
  1899.       check_stats(y);
  1900.   
  1901. !     for (x = First_Column ; x < Last_Column ; x++) 
  1902.         {
  1903.   
  1904. ***************
  1905. *** 209,213 ****
  1906.       printf ("POV-Ray rendering %s to %s",Input_File_Name,Output_File_Name);
  1907.       if((First_Line != 0) || (Last_Line != Frame.Screen_Height))
  1908. !       printf(" from %4d to %4d:\n",First_Line, Last_Line);
  1909.       else
  1910.         printf (":\n");
  1911. --- 209,213 ----
  1912.       printf ("POV-Ray rendering %s to %s",Input_File_Name,Output_File_Name);
  1913.       if((First_Line != 0) || (Last_Line != Frame.Screen_Height))
  1914. !       printf(" from %4d to %4d:\n",First_Line+1, Last_Line);
  1915.       else
  1916.         printf (":\n");
  1917. ***************
  1918. *** 481,486 ****
  1919.       JScale = 1.0/(DBL)(AntialiasDepth*AntialiasDepth);              /* LSK */
  1920.   
  1921. !     for (i=-JRange;i<=JRange;i+=JSteps)
  1922. !       for (j=-JRange;j<=JRange;j+=JSteps)
  1923.         {
  1924.         if (Options & JITTER)
  1925. --- 481,486 ----
  1926.       JScale = 1.0/(DBL)(AntialiasDepth*AntialiasDepth);              /* LSK */
  1927.   
  1928. !     for (i= -JRange;i<=JRange;i+=JSteps)
  1929. !       for (j= -JRange;j<=JRange;j+=JSteps)
  1930.         {
  1931.         if (Options & JITTER)
  1932. ***************
  1933. *** 530,533 ****
  1934.   
  1935.     }
  1936.   
  1937. --- 530,532 ----
  1938. diff -c2 -r ./source/texture.c \povray2/source/texture.c
  1939. *** ./source/texture.c    Sun Oct  3 10:25:12 1993
  1940. --- \povray2/source/texture.c    Sat Oct  9 12:47:56 1993
  1941. ***************
  1942. *** 695,698 ****
  1943. --- 695,699 ----
  1944.         ((MATERIAL *)New)->Materials = Copy_Materials (((MATERIAL *)Layer)->Materials);
  1945.         ((MATERIAL *)New)->Trans = Copy_Transform (((MATERIAL *)Layer)->Trans);
  1946. +       ((MATERIAL *)New)->Image = Copy_Image (((MATERIAL *)Layer)->Image);
  1947.         ((MATERIAL *)New)->Num_Of_Mats = (((MATERIAL *)Layer)->Num_Of_Mats);
  1948.         break;
  1949. diff -c2 -r ./source/tokenize.c \povray2/source/tokenize.c
  1950. *** ./source/tokenize.c    Mon Sep 20 17:50:58 1993
  1951. --- \povray2/source/tokenize.c    Thu Oct 28 13:13:36 1993
  1952. ***************
  1953. *** 35,39 ****
  1954.   char String[MAX_STRING_INDEX];
  1955.   int String_Index;
  1956. - extern char Library_Path[];
  1957.   extern int Stop_Flag;
  1958.   static int pov_stricmp PARAMS ((char *s1,char *s2));
  1959. --- 35,38 ----
  1960. diff -c2 -r ./source/triangle.c \povray2/source/triangle.c
  1961. *** ./source/triangle.c    Thu Jul 29 16:47:44 1993
  1962. --- \povray2/source/triangle.c    Mon Oct 25 18:59:20 1993
  1963. ***************
  1964. *** 375,378 ****
  1965. --- 375,380 ----
  1966.     VECTOR Translation;
  1967.   
  1968. +   if(Triangle->Degenerate_Flag) return;
  1969.     VEvaluate (Translation, Triangle->Normal_Vector, *Vector);
  1970.     Triangle->Distance -= Translation.x + Translation.y + Translation.z;
  1971. ***************
  1972. *** 391,394 ****
  1973. --- 393,398 ----
  1974.     TRANSFORM Trans;
  1975.   
  1976. +   if(((TRIANGLE *)Object)->Degenerate_Flag) return;
  1977.     Compute_Rotation_Transform (&Trans, Vector);
  1978.     Transform_Triangle (Object, &Trans);
  1979. ***************
  1980. *** 402,405 ****
  1981. --- 406,411 ----
  1982.     DBL Length,T1,T2,T3;
  1983.   
  1984. +   if(Triangle->Degenerate_Flag) return;
  1985.     Triangle->Normal_Vector.x = Triangle->Normal_Vector.x / Vector->x;
  1986.     Triangle->Normal_Vector.y = Triangle->Normal_Vector.y / Vector->y;
  1987. ***************
  1988. *** 439,442 ****
  1989. --- 445,450 ----
  1990.     TRIANGLE *Triangle = (TRIANGLE *) Object;
  1991.   
  1992. +   if(Triangle->Degenerate_Flag) return;
  1993.     MTransPoint (&Triangle->Normal_Vector,
  1994.       &Triangle->Normal_Vector, Trans);
  1995. ***************
  1996. *** 582,585 ****
  1997. --- 590,595 ----
  1998.     VECTOR Translation;
  1999.   
  2000. +   if(Triangle->Degenerate_Flag) return;
  2001.     VEvaluate (Translation, Triangle->Normal_Vector, *Vector);
  2002.     Triangle->Distance -= Translation.x + Translation.y + Translation.z;
  2003. ***************
  2004. *** 596,599 ****
  2005. --- 606,611 ----
  2006.     TRANSFORM Trans;
  2007.   
  2008. +   if(((SMOOTH_TRIANGLE *)Object)->Degenerate_Flag) return;
  2009.     Compute_Rotation_Transform (&Trans, Vector);
  2010.     Transform_Smooth_Triangle (Object, &Trans);
  2011. ***************
  2012. *** 607,610 ****
  2013. --- 619,624 ----
  2014.     DBL Length;
  2015.   
  2016. +   if(Triangle->Degenerate_Flag) return;
  2017.     Triangle->Normal_Vector.x = Triangle->Normal_Vector.x / Vector->x;
  2018.     Triangle->Normal_Vector.y = Triangle->Normal_Vector.y / Vector->y;
  2019. ***************
  2020. *** 626,629 ****
  2021. --- 640,645 ----
  2022.     {
  2023.     SMOOTH_TRIANGLE *Triangle = (SMOOTH_TRIANGLE *) Object;
  2024. +   if(Triangle->Degenerate_Flag) return;
  2025.   
  2026.     MTransPoint (&Triangle->Normal_Vector,
  2027. diff -c2 -r ./whatsnew.doc \povray2/whatsnew.doc
  2028. *** ./whatsnew.doc    Wed Sep 29 21:15:34 1993
  2029. --- \povray2/whatsnew.doc    Mon Nov 29 13:48:54 1993
  2030. ***************
  2031. *** 1,2 ****
  2032. --- 1,25 ----
  2033. +     What's New in POV-Ray 2.1
  2034. +     --------------------------
  2035. +     This bug-fix release adds no new features but fixes the following
  2036. +     bugs from version 2.0.
  2037. +   - Fixed problem in OBJECTS.C that caused problem on some Unix compilers
  2038. +   - Fixed problem with declared material_maps or declared objects with
  2039. +     material_maps
  2040. +   - Fixed IBM.C problems for Zortech compiler
  2041. +   - Created temporary fix for problems with normals, smooth triangles
  2042. +     beziers and height fields which created unsightly black spots
  2043. +   - Allows scale <-1,1,1> to work with boxes
  2044. +   - Cleared up inconsistency with -sr, -sc, -er, -ec numbering.  Upper
  2045. +     left pixel is 1,1.  Fixed -ec bug.
  2046. +   - Fixed three bezier patch bugs which caused lock-ups, missing reflection,
  2047. +     and triangle dropouts.
  2048. +   - Eliminated some restrictions on multiple clipped_by and bounded_by
  2049. +   - Fixed compiler problems on VMS/VAX
  2050. +   - Fixed scaling bug on degenerate triangles
  2051. +   - Fixed problem with water_level when using +MV1.0
  2052. +   - Fixed problem with color maped TGA height fields
  2053.       What's New in POV-Ray 2.0
  2054.       -------------------------
  2055. ***************
  2056. *** 67,71 ****
  2057.       Should support: 1024 x 768 x 256 color palette
  2058.                        800 x 600 x  15 bit high color
  2059. !                      640x4 480 x  24 bit true color
  2060.     - Diamond 24X 15 and 24 bit mode support added.
  2061.     - Preview reduced to fit selected video screen size if necessary.
  2062. --- 90,94 ----
  2063.       Should support: 1024 x 768 x 256 color palette
  2064.                        800 x 600 x  15 bit high color
  2065. !                      640 x 480 x  24 bit true color
  2066.     - Diamond 24X 15 and 24 bit mode support added.
  2067.     - Preview reduced to fit selected video screen size if necessary.
  2068.