diff -c2 -r ./file_id.diz \povray2/file_id.diz *** ./file_id.diz Thu Sep 30 16:56:56 1993 --- \povray2/file_id.diz Mon Nov 29 13:44:52 1993 *************** *** 1,12 **** This is the source code in highly portible C for the Persistence of ! Vision Ray Tracer POV-Ray version 2.0. ! It also include machine specific ! source for all platforms except ! Macintosh. (Mac users see POVSRC.SEA) ! Create your own \POVRAY2 directory and ! un-zip this file using the -d option ! to insure that the proper sub- ! directories are created. Other files ! are needed. See POVINF.DOC from this ! library for more information. --- 1,13 ---- This is the source code in highly portible C for the Persistence of ! Vision Ray Tracer POV-Ray version ! 2.1. It also include machine ! specific source for all platforms ! except Macintosh. (Mac users see ! POVSRC.SEA) Create your own \POVRAY2 ! directory and un-zip this file using ! the -d option to insure that the ! proper sub-directories are created. ! Other files are needed. See ! POVINF.DOC from this library for more ! information. diff -c2 -r ./machine/ibmpc/ibm.c \povray2/machine/ibmpc/ibm.c *** ./machine/ibmpc/ibm.c Tue Sep 28 13:49:04 1993 --- \povray2/machine/ibmpc/ibm.c Mon Oct 18 14:05:20 1993 *************** *** 145,149 **** /*#define DEBUG_VIDEO*/ /* Uncomment to display Video initialization info during program startup. */ ! /*#define SVBOX*/ /* Uncomment to use setvbuf in GCCDOS anyway. */ #ifdef DEBUG_VIDEO --- 145,149 ---- /*#define DEBUG_VIDEO*/ /* Uncomment to display Video initialization info during program startup. */ ! /*#define SVBOK*/ /* Uncomment to use setvbuf in GCCDOS anyway. */ #ifdef DEBUG_VIDEO *************** *** 218,222 **** --- 218,224 ---- #define CLD + #ifndef min #define min(x,y) ((x) < (y)? (x): (y)) + #endif #ifdef DOS386 *************** *** 1375,1379 **** if(First_Column > 1 || Last_Column < width || First_Line > 1 || Last_Line < height) ! box (First_Column, First_Line, Last_Column, Last_Line-1); #if defined(DOS16RM) --- 1377,1381 ---- if(First_Column > 1 || Last_Column < width || First_Line > 1 || Last_Line < height) ! box (First_Column, First_Line, Last_Column-1, Last_Line-1); #if defined(DOS16RM) *************** *** 1789,1793 **** void setmany(palbuf, start, count) unsigned char palbuf[256][3]; ! int start, int count; { unsigned char _far *fp; --- 1791,1795 ---- void setmany(palbuf, start, count) unsigned char palbuf[256][3]; ! int start, count; { unsigned char _far *fp; *************** *** 1951,1955 **** #endif #ifdef DOS386 ! int86x_real(0x21, &inr, &inr, &segs); #else int86x(0x21, ®s, ®s, &segs); /* call DOS - status of operation is !regs.x.cflag */ --- 1953,1957 ---- #endif #ifdef DOS386 ! int86x_real(0x21, ®s, ®s, &segs); #else int86x(0x21, ®s, ®s, &segs); /* call DOS - status of operation is !regs.x.cflag */ *************** *** 1968,1972 **** /* plot a single RGB pixel */ ! void display_plot (x, y, Red, Green, Blue) /* plot a single RGB pixel */ int x, y; unsigned char Red, Green, Blue; --- 1970,1974 ---- /* plot a single RGB pixel */ ! void display_plot (x, y, Red, Green, Blue) int x, y; unsigned char Red, Green, Blue; *************** *** 2655,2659 **** #if !__STDC__ ! #ifndef __BORLANDC__ /* BCC has srand but doesn't set __STDC__ */ /* ANSI Standard psuedo-random number generator */ --- 2657,2663 ---- #if !__STDC__ ! #if !defined(__BORLANDC__) && !defined (__ZTC__) ! /* BCC has srand but doesn't set __STDC__ same as Zortech */ ! /* ANSI Standard psuedo-random number generator */ diff -c2 -r ./machine/ibmpc/ibmconf.h \povray2/machine/ibmpc/ibmconf.h *** ./machine/ibmpc/ibmconf.h Tue Sep 28 13:50:38 1993 --- \povray2/machine/ibmpc/ibmconf.h Fri Oct 8 21:27:50 1993 *************** *** 186,189 **** --- 186,190 ---- #ifdef __ZTC__ + #define QSORT_FUNCT_PARM const void * #ifndef __386__ #define COMPILER_VER ".ibmztc" *************** *** 242,245 **** --- 243,248 ---- #define COMPILER_VER ".ibmbc" #define IFF_SWITCH_CAST (long) + #define QSORT_FUNCT_PARM const void _FAR * + #define QSORT_FUNCT_RET int _Cdecl #endif diff -c2 -r ./machine/ibmpc/zortech/ibmzor3.lnk \povray2/machine/ibmpc/zortech/ibmzor3.lnk *** ./machine/ibmpc/zortech/ibmzor3.lnk Tue Jan 26 08:00:52 1993 --- \povray2/machine/ibmpc/zortech/ibmzor3.lnk Fri Oct 8 20:02:46 1993 *************** *** 1,3 **** ! d:\zt\lib\cx.obj+ povray+bezier+blob+bound+boxes+ camera+colour+cones+csg+discs+ --- 1,3 ---- ! cx.obj+ povray+bezier+blob+bound+boxes+ camera+colour+cones+csg+discs+ diff -c2 -r ./machine/unix/unix.mak \povray2/machine/unix/unix.mak *** ./machine/unix/unix.mak Thu Aug 19 16:21:06 1993 --- \povray2/machine/unix/unix.mak Sat Oct 9 14:39:44 1993 *************** *** 43,44 **** --- 43,117 ---- $(CC) $(LFLAGS) $(POVOBJS) -lm + povray.$(OBJ) : povray.c povproto.h frame.h vector.h config.h + + bezier.$(OBJ): config.h frame.h povproto.h vector.h + + blob.$(OBJ): config.h frame.h povproto.h vector.h + + bound.$(OBJ): config.h frame.h povproto.h vector.h + + boxes.$(OBJ): config.h frame.h povproto.h vector.h + + camera.$(OBJ): config.h frame.h povproto.h vector.h + + colour.$(OBJ): config.h frame.h povproto.h vector.h + + cones.$(OBJ): config.h frame.h povproto.h vector.h + + csg.$(OBJ): config.h frame.h povproto.h vector.h + + discs.$(OBJ): config.h frame.h povproto.h vector.h + + dump.$(OBJ): config.h frame.h povproto.h + + express.$(OBJ): config.h frame.h parse.h povproto.h vector.h + + gif.$(OBJ): config.h frame.h povproto.h + + gifdecod.$(OBJ): config.h frame.h povproto.h + + hfield.$(OBJ): config.h frame.h povproto.h vector.h + + iff.$(OBJ): config.h frame.h povproto.h + + image.$(OBJ): config.h frame.h povproto.h texture.h vector.h + + lighting.$(OBJ): config.h frame.h povproto.h vector.h + + matrices.$(OBJ): config.h frame.h povproto.h vector.h + + normal.$(OBJ): config.h frame.h povproto.h texture.h vector.h + + objects.$(OBJ): config.h frame.h povproto.h vector.h + + parse.$(OBJ): config.h frame.h parse.h povproto.h vector.h + + pigment.$(OBJ): config.h frame.h povproto.h texture.h vector.h + + planes.$(OBJ): config.h frame.h povproto.h vector.h + + point.$(OBJ): config.h frame.h povproto.h vector.h + + poly.$(OBJ): config.h frame.h povproto.h vector.h + + quadrics.$(OBJ): config.h frame.h povproto.h vector.h + + raw.$(OBJ): config.h frame.h povproto.h + + ray.$(OBJ): config.h frame.h povproto.h vector.h + + render.$(OBJ): config.h frame.h povproto.h vector.h + + spheres.$(OBJ): config.h frame.h povproto.h vector.h + + targa.$(OBJ): config.h frame.h povproto.h + + texture.$(OBJ): config.h frame.h povproto.h texture.h vector.h + + tokenize.$(OBJ): config.h frame.h parse.h povproto.h + + triangle.$(OBJ): config.h frame.h povproto.h vector.h + + txttest.$(OBJ): config.h frame.h povproto.h texture.h vector.h + + vect.$(OBJ): config.h frame.h povproto.h vector.h diff -c2 -r ./machine/unix/xwindows.mak \povray2/machine/unix/xwindows.mak *** ./machine/unix/xwindows.mak Wed Nov 11 01:11:00 1992 --- \povray2/machine/unix/xwindows.mak Sat Oct 9 14:39:46 1993 *************** *** 32,45 **** ! POVOBJS = povray.$(OBJ) render.$(OBJ) tokenize.$(OBJ) parse.$(OBJ) \ ! objects.$(OBJ) spheres.$(OBJ) quadrics.$(OBJ) lighting.$(OBJ) \ ! prioq.$(OBJ) texture.$(OBJ) matrices.$(OBJ) csg.$(OBJ) \ ! hfield.$(OBJ) txtcolor.$(OBJ) txtbump.$(OBJ) txtmap.$(OBJ) \ ! txttest.$(OBJ) colour.$(OBJ) viewpnt.$(OBJ) ray.$(OBJ) point.$(OBJ)\ ! planes.$(OBJ) iff.$(OBJ) gif.$(OBJ) gifdecod.$(OBJ) blob.$(OBJ)\ ! triangle.$(OBJ) raw.$(OBJ) dump.$(OBJ) targa.$(OBJ) poly.$(OBJ) \ ! bezier.$(OBJ) vect.$(OBJ) boxes.$(OBJ) $(MACHINE_OBJ) - povray: $(POVOBJS) cc $(POVOBJS) -lm $(LFLAGS) --- 32,45 ---- ! POVOBJS = povray.$(OBJ) bezier.$(OBJ) blob.$(OBJ) bound.$(OBJ) boxes.$(OBJ) \ ! camera.$(OBJ) colour.$(OBJ) cones.$(OBJ) csg.$(OBJ) discs.$(OBJ) \ ! dump.$(OBJ) express.$(OBJ) gif.$(OBJ) gifdecod.$(OBJ) \ ! hfield.$(OBJ) iff.$(OBJ) image.$(OBJ) lighting.$(OBJ) \ ! matrices.$(OBJ) normal.$(OBJ) objects.$(OBJ) parse.$(OBJ) \ ! pigment.$(OBJ) planes.$(OBJ) point.$(OBJ) poly.$(OBJ) \ ! quadrics.$(OBJ) raw.$(OBJ) ray.$(OBJ) render.$(OBJ) spheres.$(OBJ) \ ! targa.$(OBJ) texture.$(OBJ) tokenize.$(OBJ) triangle.$(OBJ) \ ! txttest.$(OBJ) vect.$(OBJ) $(MACHINE_OBJ) povray: $(POVOBJS) cc $(POVOBJS) -lm $(LFLAGS) *************** *** 50,112 **** $(CC) $(CFLAGS) -I$(X11)/include xwindows.c ! tokenize.$(OBJ) : tokenize.c povproto.h frame.h config.h ! parse.$(OBJ) : parse.c povproto.h frame.h config.h ! render.$(OBJ) : render.c povproto.h frame.h vector.h config.h ! lighting.$(OBJ) : lighting.c povproto.h frame.h vector.h config.h ! prioq.$(OBJ) : prioq.c povproto.h frame.h config.h ! texture.$(OBJ) : texture.c povproto.h frame.h vector.h config.h texture.h ! txtcolor.$(OBJ) : txtcolor.c povproto.h frame.h vector.h config.h texture.h ! txtbump.$(OBJ) : txtbump.c povproto.h frame.h vector.h config.h texture.h ! txtmap.$(OBJ) : txtmap.c povproto.h frame.h vector.h config.h texture.h ! txttest.$(OBJ) : txttest.c povproto.h frame.h vector.h config.h texture.h ! objects.$(OBJ) : objects.c povproto.h frame.h vector.h config.h ! spheres.$(OBJ) : spheres.c povproto.h frame.h vector.h config.h ! planes.$(OBJ) : planes.c povproto.h frame.h vector.h config.h ! poly.$(OBJ) : poly.c povproto.h frame.h vector.h config.h ! hfield.$(OBJ) : hfield.c povproto.h frame.h vector.h config.h ! bezier.$(OBJ) : bezier.c povproto.h frame.h vector.h config.h ! vect.$(OBJ) : vect.c povproto.h frame.h config.h ! quadrics.$(OBJ) : quadrics.c povproto.h frame.h vector.h config.h ! matrices.$(OBJ) : matrices.c povproto.h frame.h vector.h config.h ! csg.$(OBJ) : csg.c povproto.h frame.h vector.h config.h ! colour.$(OBJ) : colour.c povproto.h frame.h config.h ! viewpnt.$(OBJ) : viewpnt.c povproto.h frame.h vector.h config.h ! ray.$(OBJ) : ray.c povproto.h frame.h vector.h config.h ! iff.$(OBJ) : iff.c povproto.h frame.h config.h ! gif.$(OBJ) : gif.c povproto.h frame.h config.h ! gifdecod.$(OBJ) : gifdecod.c povproto.h frame.h config.h ! raw.$(OBJ) : raw.c povproto.h frame.h config.h ! triangle.$(OBJ) : triangle.c povproto.h frame.h vector.h config.h ! dump.$(OBJ) : dump.c povproto.h frame.h config.h ! boxes.$(OBJ) : boxes.c povproto.h frame.h vector.h config.h ! blob.$(OBJ) : blob.c povproto.h frame.h vector.h config.h --- 50,122 ---- $(CC) $(CFLAGS) -I$(X11)/include xwindows.c ! bezier.$(OBJ): config.h frame.h povproto.h vector.h ! ! blob.$(OBJ): config.h frame.h povproto.h vector.h ! ! bound.$(OBJ): config.h frame.h povproto.h vector.h ! ! boxes.$(OBJ): config.h frame.h povproto.h vector.h ! ! camera.$(OBJ): config.h frame.h povproto.h vector.h ! ! colour.$(OBJ): config.h frame.h povproto.h vector.h ! cones.$(OBJ): config.h frame.h povproto.h vector.h ! csg.$(OBJ): config.h frame.h povproto.h vector.h ! discs.$(OBJ): config.h frame.h povproto.h vector.h ! dump.$(OBJ): config.h frame.h povproto.h ! express.$(OBJ): config.h frame.h parse.h povproto.h vector.h ! gif.$(OBJ): config.h frame.h povproto.h ! gifdecod.$(OBJ): config.h frame.h povproto.h ! hfield.$(OBJ): config.h frame.h povproto.h vector.h ! iff.$(OBJ): config.h frame.h povproto.h ! image.$(OBJ): config.h frame.h povproto.h texture.h vector.h ! lighting.$(OBJ): config.h frame.h povproto.h vector.h ! matrices.$(OBJ): config.h frame.h povproto.h vector.h ! normal.$(OBJ): config.h frame.h povproto.h texture.h vector.h ! objects.$(OBJ): config.h frame.h povproto.h vector.h ! parse.$(OBJ): config.h frame.h parse.h povproto.h vector.h ! pigment.$(OBJ): config.h frame.h povproto.h texture.h vector.h ! planes.$(OBJ): config.h frame.h povproto.h vector.h ! point.$(OBJ): config.h frame.h povproto.h vector.h ! poly.$(OBJ): config.h frame.h povproto.h vector.h ! quadrics.$(OBJ): config.h frame.h povproto.h vector.h ! raw.$(OBJ): config.h frame.h povproto.h ! ray.$(OBJ): config.h frame.h povproto.h vector.h ! render.$(OBJ): config.h frame.h povproto.h vector.h ! spheres.$(OBJ): config.h frame.h povproto.h vector.h ! targa.$(OBJ): config.h frame.h povproto.h ! texture.$(OBJ): config.h frame.h povproto.h texture.h vector.h ! tokenize.$(OBJ): config.h frame.h parse.h povproto.h ! triangle.$(OBJ): config.h frame.h povproto.h vector.h ! txttest.$(OBJ): config.h frame.h povproto.h texture.h vector.h ! vect.$(OBJ): config.h frame.h povproto.h vector.h diff -c2 -r ./machine/vax/vax.doc \povray2/machine/vax/vax.doc *** ./machine/vax/vax.doc Thu Sep 30 10:33:32 1993 --- \povray2/machine/vax/vax.doc Tue Nov 9 14:06:18 1993 *************** *** 53,70 **** 4) rename vaxconf.h to config.h ! 5) edit the file 'POVRAY.C'. ! change the definition of 'main' and 'alt_main' to return 'int' ! instead of 'void'. you may also like to add a return statement. ! 6) edit the file 'tokenize.c'. ! remove the reference to 'extern Library_Paths []'. - 7) edit the files 'csg.c' and 'objects.c'. - remove the reference to 'extern RAY VP_Ray'. - - 8) execute "@vaxbuild" for a NON XWindows executable. - - 9) execute "@xvaxbld" for an XWindows executable. - Note that if you switch between X and non-X versions you MUST recompile ALL FILES. --- 53,60 ---- 4) rename vaxconf.h to config.h ! 5) execute "@vaxbuild" for a NON XWindows executable. ! 6) execute "@xvaxbld" for an XWindows executable. Note that if you switch between X and non-X versions you MUST recompile ALL FILES. *************** *** 72,77 **** Post-processing Images: POV-Ray images can be post-processed using the PBMPLUS utilities. ! The program TGA2GIF (source available on Compuserve in GRAPHDEV) will run on ! a VAX and does a nice job of converting Targa output files into GIF files. Displaying Images: --- 62,68 ---- Post-processing Images: POV-Ray images can be post-processed using the PBMPLUS utilities. ! The program TGA2GIF (source available on Compuserve in GRAPHDEV section 8 ! as TGAGI2.ZIP) will run on a VAX and does a nice job of converting Targa ! output files into GIF files. Displaying Images: *************** *** 106,108 **** Chris Cason. CIS:100032,1644 ! Internet:100032.1644@compuserve.com --- 97,99 ---- Chris Cason. CIS:100032,1644 ! Internet:100032.1644@compuserve.com diff -c2 -r ./machine/vax/vaxconf.h \povray2/machine/vax/vaxconf.h *** ./machine/vax/vaxconf.h Wed Sep 29 23:58:32 1993 --- \povray2/machine/vax/vaxconf.h Thu Oct 28 13:08:14 1993 *************** *** 113,116 **** --- 113,120 ---- #endif + #ifdef ALPHA + #pragma message disable IMPLICITFUNC + #endif + #define EPSILON 1.0e-5 *************** *** 124,131 **** #define DEFAULT_OUTPUT_FORMAT 't' ! /* this is for VMS C on the Alpha. comment it out if your compiler complains */ ! /* strictly speaking, no compiler should complain about a pragma it does not */ ! /* recognise, but nevertheless, some compiler manufacturers have managed to ! */ ! #pragma message disable IMPLICITFUNC #ifdef XWINDOWS --- 128,133 ---- #define DEFAULT_OUTPUT_FORMAT 't' ! #define MAIN_RETURN_TYPE int ! #define FINISH_POVRAY return (0) ; #ifdef XWINDOWS diff -c2 -r ./povinf.doc \povray2/povinf.doc *** ./povinf.doc Thu Sep 30 15:02:52 1993 --- \povray2/povinf.doc Mon Nov 29 14:01:58 1993 *************** *** 49,53 **** POVDOC.ZIP - The documentation and essential data files for POV-Ray POVSCN.ZIP - The example scene files for POV-Ray ! POVIBM.ZIP - Executable and docs for IBM-PC and compatibles You will also need a program like PICLAB or Image Alchemy to convert --- 49,53 ---- POVDOC.ZIP - The documentation and essential data files for POV-Ray POVSCN.ZIP - The example scene files for POV-Ray ! POVIBM.EXE - Executable and docs for IBM-PC and compatibles You will also need a program like PICLAB or Image Alchemy to convert *************** *** 164,168 **** CIS: 76702,1655 ! Internet: 76702,1655 @compuserve.com --- 164,168 ---- CIS: 76702,1655 ! Internet: 76702.1655@compuserve.com diff -c2 -r ./source/bezier.c \povray2/source/bezier.c *** ./source/bezier.c Wed Aug 4 12:44:58 1993 --- \povray2/source/bezier.c Tue Nov 9 14:33:16 1993 *************** *** 52,57 **** static void find_average PARAMS((int, VECTOR *, VECTOR *, DBL *)); static int spherical_bounds_check PARAMS((RAY *, VECTOR *, DBL)); ! static int intersect_bicubic_patch0 PARAMS((RAY *, BICUBIC_PATCH *, DBL *)); ! static int intersect_bicubic_patch1 PARAMS((RAY *, BICUBIC_PATCH *, DBL *)); static DBL point_plane_distance PARAMS((VECTOR *, VECTOR *, DBL *)); static DBL determine_subpatch_flatness PARAMS((VECTOR (*)[4][4])); --- 52,56 ---- static void find_average PARAMS((int, VECTOR *, VECTOR *, DBL *)); static int spherical_bounds_check PARAMS((RAY *, VECTOR *, DBL)); ! static int intersect_bicubic_patch0 PARAMS((RAY *, BICUBIC_PATCH *, ISTACK *)); static DBL point_plane_distance PARAMS((VECTOR *, VECTOR *, DBL *)); static DBL determine_subpatch_flatness PARAMS((VECTOR (*)[4][4])); *************** *** 58,64 **** static int flat_enough PARAMS((BICUBIC_PATCH *, VECTOR (*)[4][4])); static void bezier_bounding_sphere PARAMS((VECTOR (*)[4][4], VECTOR *,DBL *)); ! static void bezier_subpatch_intersect PARAMS((RAY *, BICUBIC_PATCH *, VECTOR (*)[4][4], DBL, DBL, DBL, DBL, ! int *, DBL *)); static void bezier_split_left_right PARAMS((VECTOR (*)[4][4],VECTOR (*)[4][4], VECTOR (*)[4][4])); --- 57,63 ---- static int flat_enough PARAMS((BICUBIC_PATCH *, VECTOR (*)[4][4])); static void bezier_bounding_sphere PARAMS((VECTOR (*)[4][4], VECTOR *,DBL *)); ! static int bezier_subpatch_intersect PARAMS((RAY *, BICUBIC_PATCH *, VECTOR (*)[4][4], DBL, DBL, DBL, DBL, ! ISTACK *)); static void bezier_split_left_right PARAMS((VECTOR (*)[4][4],VECTOR (*)[4][4], VECTOR (*)[4][4])); *************** *** 65,70 **** static void bezier_split_up_down PARAMS((VECTOR (*)[4][4], VECTOR (*)[4][4], VECTOR (*)[4][4])); ! static void bezier_subdivider PARAMS((RAY *, BICUBIC_PATCH *,VECTOR (*)[4][4], ! DBL, DBL, DBL, DBL, int, int *, DBL *)); static void bezier_tree_deleter PARAMS((BEZIER_NODE *Node)); static BEZIER_NODE *bezier_tree_builder PARAMS((BICUBIC_PATCH *Object, --- 64,69 ---- static void bezier_split_up_down PARAMS((VECTOR (*)[4][4], VECTOR (*)[4][4], VECTOR (*)[4][4])); ! static int bezier_subdivider PARAMS((RAY *, BICUBIC_PATCH *,VECTOR (*)[4][4], ! DBL, DBL, DBL, DBL, int, ISTACK *)); static void bezier_tree_deleter PARAMS((BEZIER_NODE *Node)); static BEZIER_NODE *bezier_tree_builder PARAMS((BICUBIC_PATCH *Object, *************** *** 71,76 **** VECTOR(*Patch)[4][4], DBL u0, DBL u1, DBL v0, DBL v1, int depth)); ! static void bezier_tree_walker PARAMS((RAY *, BICUBIC_PATCH *, BEZIER_NODE *, ! int, int *, DBL *)); static BEZIER_NODE *create_new_bezier_node PARAMS((void)); static BEZIER_VERTICES *create_bezier_vertex_block PARAMS((void)); --- 70,75 ---- VECTOR(*Patch)[4][4], DBL u0, DBL u1, DBL v0, DBL v1, int depth)); ! static int bezier_tree_walker PARAMS((RAY *, BICUBIC_PATCH *, BEZIER_NODE *, ! ISTACK *)); static BEZIER_NODE *create_new_bezier_node PARAMS((void)); static BEZIER_VERTICES *create_bezier_vertex_block PARAMS((void)); *************** *** 551,557 **** } ! static void ! bezier_subpatch_intersect(ray, Shape, Patch, u0, u1, v0, v1, ! depth_count, Depths) RAY *ray; BICUBIC_PATCH *Shape; --- 550,555 ---- } ! static int ! bezier_subpatch_intersect(ray, Shape, Patch, u0, u1, v0, v1, Depth_Stack) RAY *ray; BICUBIC_PATCH *Shape; *************** *** 558,565 **** VECTOR (*Patch)[4][4]; DBL u0, u1, v0, v1; ! int *depth_count; ! DBL *Depths; { ! int tcnt = Shape->Intersection_Count; VECTOR V[3]; DBL u, v, Depth, uu[3], vv[3]; --- 556,562 ---- VECTOR (*Patch)[4][4]; DBL u0, u1, v0, v1; ! ISTACK *Depth_Stack; { ! int cnt = 0; VECTOR V[3]; DBL u, v, Depth, uu[3], vv[3]; *************** *** 566,573 **** VECTOR P, N; - if (tcnt + *depth_count >= MAX_BICUBIC_INTERSECTIONS) return; V[0] = (*Patch)[0][0]; V[1] = (*Patch)[0][3]; ! V[2] = (*Patch)[3][0]; uu[0] = u0; uu[1] = u0; uu[2] = u1; --- 563,569 ---- VECTOR P, N; V[0] = (*Patch)[0][0]; V[1] = (*Patch)[0][3]; ! V[2] = (*Patch)[3][3]; uu[0] = u0; uu[1] = u0; uu[2] = u1; *************** *** 576,587 **** if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! Shape->IPoint[tcnt + *depth_count] = P; ! Shape->Normal_Vector[tcnt + *depth_count] = N; ! Depths[*depth_count] = Depth; ! *depth_count += 1; } - if (tcnt + *depth_count >= MAX_BICUBIC_INTERSECTIONS) return; - V[1] = V[2]; V[2] = (*Patch)[3][0]; --- 572,579 ---- if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack); ! cnt++; } V[1] = V[2]; V[2] = (*Patch)[3][0]; *************** *** 591,599 **** if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! Shape->IPoint[tcnt + *depth_count] = P; ! Shape->Normal_Vector[tcnt + *depth_count] = N; ! Depths[*depth_count] = Depth; ! *depth_count += 1; } } --- 583,591 ---- if (intersect_subpatch(Shape, ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack); ! cnt++; } + + return cnt; } *************** *** 749,754 **** } ! static void bezier_subdivider(Ray, Object, Patch, u0, u1, v0, v1, ! recursion_depth, depth_count, Depths) RAY *Ray; BICUBIC_PATCH *Object; --- 741,746 ---- } ! static int bezier_subdivider(Ray, Object, Patch, u0, u1, v0, v1, ! recursion_depth, Depth_Stack) RAY *Ray; BICUBIC_PATCH *Object; *************** *** 755,760 **** VECTOR (*Patch)[4][4]; DBL u0, u1, v0, v1; ! int recursion_depth, *depth_count; ! DBL *Depths; { VECTOR Lower_Left[4][4], Lower_Right[4][4]; --- 747,752 ---- VECTOR (*Patch)[4][4]; DBL u0, u1, v0, v1; ! int recursion_depth; ! ISTACK *Depth_Stack; { VECTOR Lower_Left[4][4], Lower_Right[4][4]; *************** *** 762,769 **** VECTOR center; DBL ut, vt, radius; ! int tcnt = Object->Intersection_Count; ! ! /* Don't waste time if there are already too many intersections */ ! if (tcnt >= MAX_BICUBIC_INTERSECTIONS) return; /* Make sure the ray passes through a sphere bounding the control points of --- 754,758 ---- VECTOR center; DBL ut, vt, radius; ! int cnt = 0; /* Make sure the ray passes through a sphere bounding the control points of *************** *** 771,775 **** bezier_bounding_sphere(Patch, ¢er, &radius); if (!spherical_bounds_check(Ray, ¢er, radius)) ! return; /* If the patch is close to being flat, then just perform a ray-plane --- 760,764 ---- bezier_bounding_sphere(Patch, ¢er, &radius); if (!spherical_bounds_check(Ray, ¢er, radius)) ! return 0; /* If the patch is close to being flat, then just perform a ray-plane *************** *** 776,786 **** intersection test. */ if (flat_enough(Object, Patch)) ! bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1, ! depth_count, Depths); if (recursion_depth >= Object->U_Steps) if (recursion_depth >= Object->V_Steps) ! bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1, ! depth_count, Depths); else { --- 765,775 ---- intersection test. */ if (flat_enough(Object, Patch)) ! return bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1, ! Depth_Stack); if (recursion_depth >= Object->U_Steps) if (recursion_depth >= Object->V_Steps) ! return bezier_subpatch_intersect(Ray, Object, Patch, u0, u1, v0, v1, ! Depth_Stack); else { *************** *** 788,797 **** (VECTOR (*)[4][4])Upper_Left); vt = (v1 - v0) / 2.0; ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, u1, v0, vt, ! recursion_depth+1, depth_count, Depths); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left, ! u0, u1, vt, v1, ! recursion_depth+1, depth_count, Depths); } else if (recursion_depth >= Object->V_Steps) --- 777,784 ---- (VECTOR (*)[4][4])Upper_Left); vt = (v1 - v0) / 2.0; ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, u1, v0, vt, recursion_depth+1, Depth_Stack); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left, ! u0, u1, vt, v1, recursion_depth+1, Depth_Stack); } else if (recursion_depth >= Object->V_Steps) *************** *** 800,809 **** (VECTOR (*)[4][4])Lower_Right); ut = (u1 - u0) / 2.0; ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, ut, v0, v1, ! recursion_depth+1, depth_count, Depths); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right, ! ut, u1, v0, v1, ! recursion_depth+1, depth_count, Depths); } else --- 787,794 ---- (VECTOR (*)[4][4])Lower_Right); ut = (u1 - u0) / 2.0; ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, ut, v0, v1, recursion_depth+1, Depth_Stack); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right, ! ut, u1, v0, v1, recursion_depth+1, Depth_Stack); } else *************** *** 812,835 **** vt = (v1 - v0) / 2.0; bezier_split_left_right(Patch, (VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Lower_Right); bezier_split_up_down((VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Upper_Left); bezier_split_up_down((VECTOR (*)[4][4])Lower_Right, ! (VECTOR (*)[4][4])Lower_Right, ! (VECTOR (*)[4][4])Upper_Right); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, ut, v0, vt, ! recursion_depth+1, depth_count, Depths); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left, ! u0, ut, vt, v1, ! recursion_depth+1, depth_count, Depths); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right, ! ut, u1, v0, vt, ! recursion_depth+1, depth_count, Depths); ! bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Right, ! ut, u1, vt, v1, ! recursion_depth+1, depth_count, Depths); } } --- 797,817 ---- vt = (v1 - v0) / 2.0; bezier_split_left_right(Patch, (VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Lower_Right); bezier_split_up_down((VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Lower_Left, ! (VECTOR (*)[4][4])Upper_Left) ; bezier_split_up_down((VECTOR (*)[4][4])Lower_Right, ! (VECTOR (*)[4][4])Lower_Right, ! (VECTOR (*)[4][4])Upper_Right); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Left, ! u0, ut, v0, vt, recursion_depth+1, Depth_Stack); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Left, ! u0, ut, vt, v1, recursion_depth+1, Depth_Stack); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Lower_Right, ! ut, u1, v0, vt, recursion_depth+1, Depth_Stack); ! cnt += bezier_subdivider(Ray, Object, (VECTOR (*)[4][4])Upper_Right, ! ut, u1, vt, v1, recursion_depth+1, Depth_Stack); } + return cnt; } *************** *** 857,866 **** } ! static void bezier_tree_walker(Ray, Shape, Node, depth, depth_count, Depths) RAY *Ray; BICUBIC_PATCH *Shape; BEZIER_NODE *Node; ! int depth, *depth_count; ! DBL *Depths; { BEZIER_CHILDREN *Children; --- 839,847 ---- } ! static int bezier_tree_walker(Ray, Shape, Node, Depth_Stack) RAY *Ray; BICUBIC_PATCH *Shape; BEZIER_NODE *Node; ! ISTACK *Depth_Stack; { BEZIER_CHILDREN *Children; *************** *** 868,880 **** VECTOR N, P, V[3]; DBL Depth, u, v, uu[3], vv[3]; ! int i, tcnt = Shape->Intersection_Count; - /* Don't waste time if there are already too many intersections */ - if (tcnt >= MAX_BICUBIC_INTERSECTIONS) return; - /* Make sure the ray passes through a sphere bounding the control points of the patch */ if (!spherical_bounds_check(Ray, &(Node->Center), Node->Radius_Squared)) ! return; /* If this is an interior node then continue the descent, else --- 849,858 ---- VECTOR N, P, V[3]; DBL Depth, u, v, uu[3], vv[3]; ! int i, cnt = 0; /* Make sure the ray passes through a sphere bounding the control points of the patch */ if (!spherical_bounds_check(Ray, &(Node->Center), Node->Radius_Squared)) ! return 0; /* If this is an interior node then continue the descent, else *************** *** 884,889 **** Children = (BEZIER_CHILDREN *)Node->Data_Ptr; for (i=0;iCount;i++) ! bezier_tree_walker(Ray, Shape, Children->Children[i], ! depth+1, depth_count, Depths); } else if (Node->Node_Type == BEZIER_LEAF_NODE) --- 862,866 ---- Children = (BEZIER_CHILDREN *)Node->Data_Ptr; for (i=0;iCount;i++) ! cnt += bezier_tree_walker(Ray, Shape, Children->Children[i], Depth_Stack); } else if (Node->Node_Type == BEZIER_LEAF_NODE) *************** *** 902,914 **** /* Triangulate this subpatch, then check for intersections in ! the triangles. */ ! if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) ! { ! Shape->IPoint[tcnt + *depth_count] = P; ! Shape->Normal_Vector[tcnt + *depth_count] = N; ! Depths[*depth_count] = Depth; ! *depth_count += 1; } - if (*depth_count + tcnt >= MAX_BICUBIC_INTERSECTIONS) return; V[1] = V[2]; --- 879,887 ---- /* Triangulate this subpatch, then check for intersections in ! the triangles. */ ! if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack); ! cnt++; } V[1] = V[2]; *************** *** 917,926 **** vv[1] = vv[2]; vv[2] = Vertices->uvbnds[2]; ! if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) ! { ! Shape->IPoint[tcnt + *depth_count] = P; ! Shape->Normal_Vector[tcnt + *depth_count] = N; ! Depths[*depth_count] = Depth; ! *depth_count += 1; } } --- 890,896 ---- vv[1] = vv[2]; vv[2] = Vertices->uvbnds[2]; ! if (intersect_subpatch(Shape, Ray, V, uu, vv, &Depth, &P, &N, &u, &v)) { ! push_normal_entry(Depth, P, N, (OBJECT *)Shape, Depth_Stack); ! cnt++; } } *************** *** 927,955 **** else { ! printf("Bad Node type at depth %d\n", depth); } - } - - static int intersect_bicubic_patch0(Ray, Shape, Depths) - RAY *Ray; - BICUBIC_PATCH *Shape; - DBL *Depths; - { - int cnt = 0; - VECTOR (*Patch)[4][4] = (VECTOR (*)[4][4]) Shape->Control_Points; - - bezier_subdivider(Ray, Shape, Patch, 0.0, 1.0, 0.0, 1.0, - 0, &cnt, Depths); return cnt; } ! static int intersect_bicubic_patch1(Ray, Shape, Depths) RAY *Ray; BICUBIC_PATCH *Shape; ! DBL *Depths; { ! int cnt = 0; ! bezier_tree_walker(Ray, Shape, Shape->Node_Tree, 0, &cnt, Depths); ! return cnt; } --- 897,914 ---- else { ! /* This should be a fatal error */ ! printf("Bad Node type\n"); } return cnt; } ! static int intersect_bicubic_patch0(Ray, Shape, Depth_Stack) RAY *Ray; BICUBIC_PATCH *Shape; ! ISTACK *Depth_Stack; { ! VECTOR (*Patch)[4][4] = (VECTOR (*)[4][4]) Shape->Control_Points; ! return bezier_subdivider(Ray, Shape, Patch, 0.0, 1.0, 0.0, 1.0, 0, ! Depth_Stack); } *************** *** 959,965 **** ISTACK *Depth_Stack; { ! DBL Depths[MAX_BICUBIC_INTERSECTIONS]; ! VECTOR IPoint; ! int cnt, tcnt, i, Found; Found = FALSE; --- 918,922 ---- ISTACK *Depth_Stack; { ! int Found, cnt = 0; Found = FALSE; *************** *** 966,999 **** Ray_Bicubic_Tests++; - if (Ray == CM_Ray) - ((BICUBIC_PATCH *)Object)->Intersection_Count = 0; - - tcnt = ((BICUBIC_PATCH *)Object)->Intersection_Count; - switch (((BICUBIC_PATCH *)Object)->Patch_Type) { case 0: ! cnt = intersect_bicubic_patch0(Ray, ((BICUBIC_PATCH *)Object), &Depths[0]); break; case 1: ! cnt = intersect_bicubic_patch1(Ray, ((BICUBIC_PATCH *)Object), &Depths[0]); break; ! default: Error("Bad patch type\n"); } ! if (cnt > 0) Ray_Bicubic_Tests_Succeeded++; ! for (i=0;iIntersection_Count++; ! IPoint = ((BICUBIC_PATCH *)Object)->IPoint[tcnt + i]; ! if (Point_In_Clip(&IPoint,Object->Clip)) ! { ! push_entry(Depths[i], IPoint, Object, Depth_Stack); ! Found = TRUE; ! } ! } ! return (Found); } --- 923,945 ---- Ray_Bicubic_Tests++; switch (((BICUBIC_PATCH *)Object)->Patch_Type) { case 0: ! cnt = intersect_bicubic_patch0(Ray, ((BICUBIC_PATCH *)Object), Depth_Stack); break; case 1: ! cnt = bezier_tree_walker(Ray, (BICUBIC_PATCH *)Object, ! ((BICUBIC_PATCH *)Object)->Node_Tree, Depth_Stack); break; ! default: Error("Bad patch type\n"); } ! if (cnt > 0) { ! Ray_Bicubic_Tests_Succeeded++; ! Found = TRUE; ! } ! ! return Found; } *************** *** 1010,1033 **** VECTOR *Result, *IPoint; { ! BICUBIC_PATCH *Patch = (BICUBIC_PATCH *)Object; ! int i; ! ! /* If all is going well, the normal was computed at the time the intersection ! was computed. Look on the list of associated intersection points and normals */ ! for (i=0;iIntersection_Count;i++) ! if (IPoint->x == Patch->IPoint[i].x && ! IPoint->y == Patch->IPoint[i].y && ! IPoint->z == Patch->IPoint[i].z) ! { ! Result->x = Patch->Normal_Vector[i].x; ! Result->y = Patch->Normal_Vector[i].y; ! Result->z = Patch->Normal_Vector[i].z; ! return; ! } ! if (Options & DEBUGGING) ! { ! printf("Bicubic patch normal for unknown intersection point\n"); ! fflush(stdout); ! } Result->x = 1.0; Result->y = 0.0; --- 956,960 ---- VECTOR *Result, *IPoint; { ! /* Should never get here! */ Result->x = 1.0; Result->y = 0.0; *************** *** 1085,1092 **** INIT_OBJECT_FIELDS(New,BICUBIC_PATCH_OBJECT,&Bicubic_Patch_Methods) ! New->Patch_Type = -1; New->U_Steps = 0; New->V_Steps = 0; - New->Intersection_Count = 0; New->Flatness_Value = 0.0; New->Node_Tree = NULL; --- 1012,1018 ---- INIT_OBJECT_FIELDS(New,BICUBIC_PATCH_OBJECT,&Bicubic_Patch_Methods) ! New->Patch_Type = -1; New->U_Steps = 0; New->V_Steps = 0; New->Flatness_Value = 0.0; New->Node_Tree = NULL; *************** *** 1118,1122 **** New->Flatness_Value = ((BICUBIC_PATCH *)Object)->Flatness_Value; - New->Intersection_Count = ((BICUBIC_PATCH *)Object)->Intersection_Count; Precompute_Patch_Values(New); --- 1044,1047 ---- diff -c2 -r ./source/bound.c \povray2/source/bound.c *** ./source/bound.c Sun Aug 22 14:12:06 1993 --- \povray2/source/bound.c Wed Nov 3 13:27:06 1993 *************** *** 70,73 **** --- 70,75 ---- static void PriorityQueueDelete PARAMS((Qelem *Queue, unsigned *Qsize, DBL *key, OBJECT **obj)); + /* QSORT_FUNCT_RET compslabs PARAMS((QSORT_FUNCT_PARAM in_a, + QSORT_FUNCT_PARAM in_b)); */ /* Should move these out of here... */ *************** *** 77,81 **** unsigned long nEnqueued = 0; ! unsigned MAXQUEUE = 256; METHODS Composite_Methods = --- 79,83 ---- unsigned long nEnqueued = 0; ! unsigned MAXQUEUE = 512; METHODS Composite_Methods = *************** *** 163,169 **** } ! int CDECL compslabs(in_a, in_b) ! void *in_a; ! void *in_b; { --- 165,171 ---- } ! QSORT_FUNCT_RET compslabs(in_a, in_b) ! QSORT_FUNCT_PARAM in_a; ! QSORT_FUNCT_PARAM in_b; { diff -c2 -r ./source/boxes.c \povray2/source/boxes.c *** ./source/boxes.c Wed Jul 28 16:54:28 1993 --- \povray2/source/boxes.c Wed Oct 13 20:50:10 1993 *************** *** 338,350 **** VECTOR *Vector; { TRANSFORM Trans; if (((BOX *)Object)->Trans == NULL) { ! VEvaluateEq(((BOX *)Object)->bounds[0], *Vector); ! VEvaluateEq(((BOX *)Object)->bounds[1], *Vector); ! Object->Bounds.Lower_Left = ((BOX *)Object)->bounds[0]; ! VSub(Object->Bounds.Lengths, ((BOX *)Object)->bounds[1], ! ((BOX *)Object)->bounds[0]); } else --- 338,366 ---- VECTOR *Vector; { + BOX *Box = (BOX *)Object; TRANSFORM Trans; + DBL temp; if (((BOX *)Object)->Trans == NULL) { ! VEvaluateEq(Box->bounds[0], *Vector); ! VEvaluateEq(Box->bounds[1], *Vector); ! if (Box->bounds[0].x > Box->bounds[1].x) { ! temp = Box->bounds[0].x; ! Box->bounds[0].x = Box->bounds[1].x; ! Box->bounds[1].x = temp; ! } ! if (Box->bounds[0].y > Box->bounds[1].y) { ! temp = Box->bounds[0].y; ! Box->bounds[0].y = Box->bounds[1].y; ! Box->bounds[1].y = temp; ! } ! if (Box->bounds[0].z > Box->bounds[1].z) { ! temp = Box->bounds[0].z; ! Box->bounds[0].z = Box->bounds[1].z; ! Box->bounds[1].z = temp; ! } ! Box->Bounds.Lower_Left = Box->bounds[0]; ! VSub(Object->Bounds.Lengths, Box->bounds[1], Box->bounds[0]); } else diff -c2 -r ./source/csg.c \povray2/source/csg.c *** ./source/csg.c Sun Aug 15 12:58:42 1993 --- \povray2/source/csg.c Thu Oct 28 13:28:32 1993 *************** *** 53,58 **** }; - extern RAY *VP_Ray; - int All_CSG_Union_Intersections (Object, Ray, Depth_Stack) OBJECT *Object; --- 53,56 ---- *************** *** 392,394 **** VSub(Object->Bounds.Lengths, maxs, mins); } - --- 390,391 ---- diff -c2 -r ./source/frame.h \povray2/source/frame.h *** ./source/frame.h Thu Sep 30 13:00:00 1993 --- \povray2/source/frame.h Mon Nov 29 13:47:34 1993 *************** *** 34,38 **** /* These are used by POVRAY.C and the machine specific modules */ ! #define POV_RAY_VERSION "2.0" /* This message is for the personal distribution release. */ --- 34,38 ---- /* These are used by POVRAY.C and the machine specific modules */ ! #define POV_RAY_VERSION "2.1" /* This message is for the personal distribution release. */ *************** *** 41,45 **** #define DISTRIBUTION_MESSAGE_3 "The POV-Ray Team is not responsible for supporting this version." - #ifndef READ_ENV_VAR_BEFORE #define READ_ENV_VAR_BEFORE --- 41,44 ---- *************** *** 236,239 **** --- 235,254 ---- #endif + #ifndef QSORT_FUNCT_RET + #define QSORT_FUNCT_RET int CDECL + #endif + + #ifndef QSORT_FUNCT_PARAM + #define QSORT_FUNCT_PARAM void * + #endif + + #ifndef MAIN_RETURN_TYPE + #define MAIN_RETURN_TYPE void + #endif + + #ifndef MAIN_RETURN_STATEMENT + #define MAIN_RETURN_STATEMENT + #endif + /* These values determine the minumum and maximum distances that qualify as ray-object intersections */ *************** *** 515,518 **** --- 530,535 ---- #define SMOOTH_OK_OBJECT 128 /* SMOOTH legal */ #define IS_CHILD_OBJECT 256 /* Object is inside a COMPOUND */ + #define DOUBLE_ILLUMINATE 512 /* Illuminate both sides of surface to + avoid normal purturb bug */ #define COMPOSITE_OBJECT (BOUNDING_OBJECT) *************** *** 525,530 **** #define HEIGHT_FIELD_OBJECT (BASIC_OBJECT+WATER_LEVEL_OK_OBJECT+SMOOTH_OK_OBJECT) #define TRIANGLE_OBJECT (PATCH_OBJECT) ! #define SMOOTH_TRIANGLE_OBJECT (PATCH_OBJECT) ! #define BICUBIC_PATCH_OBJECT (PATCH_OBJECT) #define UNION_OBJECT (COMPOUND_OBJECT) #define MERGE_OBJECT (COMPOUND_OBJECT) --- 542,547 ---- #define HEIGHT_FIELD_OBJECT (BASIC_OBJECT+WATER_LEVEL_OK_OBJECT+SMOOTH_OK_OBJECT) #define TRIANGLE_OBJECT (PATCH_OBJECT) ! #define SMOOTH_TRIANGLE_OBJECT (PATCH_OBJECT+DOUBLE_ILLUMINATE) ! #define BICUBIC_PATCH_OBJECT (PATCH_OBJECT+DOUBLE_ILLUMINATE) #define UNION_OBJECT (COMPOUND_OBJECT) #define MERGE_OBJECT (COMPOUND_OBJECT) *************** *** 605,609 **** #define INIT_OBJECT_FIELDS(o,t,m)\ ! o->Type=t;o->Methods=m;o->Sibling=NULL;o->Texture=NULL;\ o->Bound=NULL;o->Clip=NULL;o->No_Shadow_Flag=FALSE;\ Make_Vector(&o->Bounds.Lower_Left, -BOUND_HUGE/2, -BOUND_HUGE/2, -BOUND_HUGE/2)\ --- 622,626 ---- #define INIT_OBJECT_FIELDS(o,t,m)\ ! o->Type=t;o->Methods= m;o->Sibling=NULL;o->Texture=NULL;\ o->Bound=NULL;o->Clip=NULL;o->No_Shadow_Flag=FALSE;\ Make_Vector(&o->Bounds.Lower_Left, -BOUND_HUGE/2, -BOUND_HUGE/2, -BOUND_HUGE/2)\ *************** *** 782,786 **** #define BEZIER_INTERIOR_NODE 0 #define BEZIER_LEAF_NODE 1 - #define MAX_BICUBIC_INTERSECTIONS 32 #define MAX_PATCH_TYPE 4 --- 799,802 ---- *************** *** 794,802 **** DBL Bounding_Sphere_Radius; DBL Flatness_Value; - int Intersection_Count; - VECTOR Normal_Vector[MAX_BICUBIC_INTERSECTIONS]; - VECTOR IPoint[MAX_BICUBIC_INTERSECTIONS]; - VECTOR **Interpolated_Grid, **Interpolated_Normals, **Smooth_Normals; - DBL **Interpolated_D; BEZIER_NODE *Node_Tree; }; --- 810,813 ---- *************** *** 920,923 **** --- 931,936 ---- DBL Depth; VECTOR IPoint; + VECTOR INormal; + int NFlag; OBJECT *Object; }; *************** *** 932,937 **** #define itop(i) i->istack[i->top_entry] #define push_entry(d,v,o,i) itop(i).Depth=d; itop(i).IPoint=v; \ ! itop(i).Object=o; incstack(i); ! #define push_copy(i,e) itop(i)=*e; incstack(i); #define pop_entry(i) (i->top_entry > 0)?&(i->istack[--i->top_entry]):NULL --- 945,952 ---- #define itop(i) i->istack[i->top_entry] #define push_entry(d,v,o,i) itop(i).Depth=d; itop(i).IPoint=v; \ ! itop(i).NFlag=0; itop(i).Object=o; incstack(i); ! #define push_normal_entry(d,v,n,o,i) itop(i).Depth=d; itop(i).IPoint=v; \ ! itop(i).INormal=n; itop(i).NFlag=1; itop(i).Object=o; incstack(i); ! #define push_copy(i,e) itop(i)= *e; incstack(i); #define pop_entry(i) (i->top_entry > 0)?&(i->istack[--i->top_entry]):NULL diff -c2 -r ./source/hfield.c \povray2/source/hfield.c *** ./source/hfield.c Tue Sep 21 15:55:34 1993 --- \povray2/source/hfield.c Mon Nov 29 13:40:40 1993 *************** *** 1297,1301 **** break; case TGA_FILE: ! if (Image->data.rgb_lines != NULL) { temp1 = Image->data.rgb_lines[max_z - z - 1].red[x]; --- 1297,1301 ---- break; case TGA_FILE: ! if (Image->Colour_Map == NULL) { temp1 = Image->data.rgb_lines[max_z - z - 1].red[x]; *************** *** 1340,1344 **** free(Image->data.map_lines[max_z - z - 1]); break; case TGA_FILE: ! if (Image->data.rgb_lines != NULL) { free(Image->data.rgb_lines[max_z - z - 1].blue); --- 1340,1344 ---- free(Image->data.map_lines[max_z - z - 1]); break; case TGA_FILE: ! if (Image->Colour_Map == NULL) { free(Image->data.rgb_lines[max_z - z - 1].blue); diff -c2 -r ./source/lighting.c \povray2/source/lighting.c *** ./source/lighting.c Sun Oct 3 10:24:28 1993 --- \povray2/source/lighting.c Fri Oct 29 12:12:52 1993 *************** *** 298,302 **** IPoint, &Dummy_Colour); ! Sample_Colour[i]=*Light_Colour; Block_Point_Light (Light_Source, Light_Source_Depth, --- 298,302 ---- IPoint, &Dummy_Colour); ! Sample_Colour[i]= *Light_Colour; Block_Point_Light (Light_Source, Light_Source_Depth, *************** *** 352,356 **** IPoint, &Dummy_Colour); ! Sample_Colour[i]=*Light_Colour; Block_Area_Light (Light_Source, Light_Source_Depth, --- 352,356 ---- IPoint, &Dummy_Colour); ! Sample_Colour[i]= *Light_Colour; Block_Area_Light (Light_Source, Light_Source_Depth, *************** *** 761,765 **** } ! void Diffuse (Finish, IPoint, Eye, Layer_Normal, Layer_Pigment_Colour, Colour, Attenuation) FINISH *Finish; VECTOR *IPoint, *Layer_Normal; --- 761,765 ---- } ! void Diffuse (Finish, IPoint, Eye, Layer_Normal, Layer_Pigment_Colour, Colour, Attenuation, Object) FINISH *Finish; VECTOR *IPoint, *Layer_Normal; *************** *** 768,771 **** --- 768,772 ---- RAY *Eye; DBL Attenuation; + OBJECT *Object; { DBL Light_Source_Depth, Cos_Shadow_Angle; *************** *** 802,809 **** /* See if light on far side of surface from camera. */ - VDot(Cos_Shadow_Angle,*Layer_Normal,Light_Source_Ray.Direction); ! if (Cos_Shadow_Angle < 0.0) ! continue; /* If light source was not blocked by any intervening object, then --- 803,813 ---- /* See if light on far side of surface from camera. */ ! if (!(Object->Type & DOUBLE_ILLUMINATE)) ! { ! VDot(Cos_Shadow_Angle,*Layer_Normal,Light_Source_Ray.Direction); ! if (Cos_Shadow_Angle < 0.0) ! continue; ! } /* If light source was not blocked by any intervening object, then *************** *** 1054,1059 **** } ! Diffuse (Finish, &Ray_Intersection ->IPoint, Ray, ! Layer_Normal, Layer_Pigment_Colour, &Emitted_Colour, Attenuation); Colour->Red += Emitted_Colour.Red; --- 1058,1064 ---- } ! Diffuse (Finish, &Ray_Intersection->IPoint, Ray, ! Layer_Normal, Layer_Pigment_Colour, &Emitted_Colour, Attenuation, ! Ray_Intersection->Object); Colour->Red += Emitted_Colour.Red; *************** *** 1083,1087 **** #define QColour Texture->Pigment->Quick_Colour ! Normal (&Raw_Normal, Ray_Intersection->Object, &Ray_Intersection->IPoint); /* Now, we perform the lighting calculations. */ --- 1088,1097 ---- #define QColour Texture->Pigment->Quick_Colour ! /* Get the normal to the surface */ ! if (Ray_Intersection->NFlag) ! Raw_Normal = Ray_Intersection->INormal; ! else ! Normal (&Raw_Normal, Ray_Intersection->Object, &Ray_Intersection->IPoint); ! /* Now, we perform the lighting calculations. */ *************** *** 1246,1248 **** } - --- 1256,1257 ---- diff -c2 -r ./source/objects.c \povray2/source/objects.c *** ./source/objects.c Wed Jul 28 17:53:20 1993 --- \povray2/source/objects.c Thu Oct 28 13:13:26 1993 *************** *** 26,30 **** #include "povproto.h" - extern RAY *VP_Ray; extern long Bounding_Region_Tests, Bounding_Region_Tests_Succeeded; extern long Clipping_Region_Tests, Clipping_Region_Tests_Succeeded; --- 26,29 ---- *************** *** 143,154 **** New = Copy (Old); ! /* This is redundant if Copy did *New = *Old but we cannot assume it did. It is safe for Copy to do *New = *Old but it should not otherwise ! touch OBJECT_FIELDS. ! ! Because New and Old are type OBJECT, only OBJECT_FIELDS are affected ! by the next statement. */ ! *New = *Old; New->Sibling = NULL; /* Important */ --- 142,158 ---- New = Copy (Old); ! /* The following copying of OBJECT_FIELDS is redundant if Copy ! did *New = *Old but we cannot assume it did. It is safe for Copy to do *New = *Old but it should not otherwise ! touch OBJECT_FIELDS. */ ! New->Methods = Old->Methods; ! New->Type = Old->Type; ! New->Sibling = Old->Sibling; ! New->Texture = Old->Texture; ! New->Bound = Old->Bound; ! New->Clip = Old->Clip; ! New->Bounds = Old->Bounds; ! New->No_Shadow_Flag = Old->No_Shadow_Flag; New->Sibling = NULL; /* Important */ diff -c2 -r ./source/parse.c \povray2/source/parse.c *** ./source/parse.c Sun Sep 26 17:02:40 1993 --- \povray2/source/parse.c Tue Nov 9 14:35:14 1993 *************** *** 1012,1027 **** EXIT END_CASE ! OTHERWISE /* Look for [pnf_texture] */ UNGET - Texture = Copy_Textures (Default_Texture); ! ! EXPECT /* Look for [tpnf_ids] */ ! CASE (TEXTURE_ID_TOKEN) ! Destroy_Textures(Texture); ! Texture = Copy_Textures((TEXTURE *) Token.Constant_Data); ! END_CASE ! CASE (PIGMENT_ID_TOKEN) Destroy_Pigment(Texture->Pigment); --- 1012,1032 ---- EXIT END_CASE + + CASE (TEXTURE_ID_TOKEN) + Texture = Copy_Textures((TEXTURE *) Token.Constant_Data); + EXIT + END_CASE ! OTHERWISE UNGET Texture = Copy_Textures (Default_Texture); ! EXIT ! END_CASE ! END_EXPECT ! ! /* Look for [pnf_texture] */ ! if (Texture->Type == PNF_TEXTURE) ! { ! EXPECT /* Look for [pnf_ids] */ CASE (PIGMENT_ID_TOKEN) Destroy_Pigment(Texture->Pigment); *************** *** 1408,1415 **** Parse_Error(PIGMENT_ID_TOKEN); ! EXIT ! END_CASE /* End of pnf texture */ ! ! END_EXPECT /* End of texture_body */ EXPECT /* Look for texture_mods */ --- 1413,1417 ---- Parse_Error(PIGMENT_ID_TOKEN); ! } EXPECT /* Look for texture_mods */ *************** *** 1510,1514 **** --- 1512,1519 ---- VECTOR Local_Vector; TEXTURE *Local_Texture; + OBJECT *Temp1_Object; + OBJECT *Temp2_Object; COLOUR Local_Colour; + DBL Temp_Water_Level; EXPECT *************** *** 1548,1555 **** Parse_Begin (); if (Object->Bound != NULL) ! Error ("Cannot have more than one BOUNDED_BY {} per object"); EXPECT CASE (CLIPPED_BY_TOKEN) Object->Bound = Object->Clip; EXIT --- 1553,1563 ---- Parse_Begin (); if (Object->Bound != NULL) ! if (Object->Clip == Object->Bound) ! Error ("Cannot add bounds after linking bounds and clips"); EXPECT CASE (CLIPPED_BY_TOKEN) + if (Object->Bound != NULL) + Error ("Cannot link clips with previous bounds"); Object->Bound = Object->Clip; EXIT *************** *** 1558,1562 **** OTHERWISE UNGET ! Object->Bound = Parse_Bound_Clip (); EXIT END_CASE --- 1566,1574 ---- OTHERWISE UNGET ! Temp1_Object = Temp2_Object = Parse_Bound_Clip (); ! while (Temp2_Object->Sibling != NULL) ! Temp2_Object = Temp2_Object->Sibling; ! Temp2_Object->Sibling = Object->Bound; ! Object->Bound = Temp1_Object; EXIT END_CASE *************** *** 1569,1576 **** Parse_Begin (); if (Object->Clip != NULL) ! Error ("Cannot have more than one CLIPPED_BY {} per object"); EXPECT CASE (BOUNDED_BY_TOKEN) Object->Clip = Object->Bound; EXIT --- 1581,1591 ---- Parse_Begin (); if (Object->Clip != NULL) ! if (Object->Clip == Object->Bound) ! Error ("Cannot add clips after linking bounds and clips"); EXPECT CASE (BOUNDED_BY_TOKEN) + if (Object->Clip != NULL) + Error ("Cannot link bounds with previous clips"); Object->Clip = Object->Bound; EXIT *************** *** 1579,1583 **** OTHERWISE UNGET ! Object->Clip = Parse_Bound_Clip (); EXIT END_CASE --- 1594,1602 ---- OTHERWISE UNGET ! Temp1_Object = Temp2_Object = Parse_Bound_Clip (); ! while (Temp2_Object->Sibling != NULL) ! Temp2_Object = Temp2_Object->Sibling; ! Temp2_Object->Sibling = Object->Clip; ! Object->Clip = Temp1_Object; EXIT END_CASE *************** *** 1636,1640 **** if (!(Object->Type & WATER_LEVEL_OK_OBJECT)) Error ("Cannot use WATER_LEVEL here"); ! ((HEIGHT_FIELD *) Object)->bounding_box->bounds[0].y = 65536.0 * Parse_Float(); END_CASE --- 1655,1662 ---- if (!(Object->Type & WATER_LEVEL_OK_OBJECT)) Error ("Cannot use WATER_LEVEL here"); ! Temp_Water_Level = Parse_Float(); ! if (Language_Version < 2.0) ! Temp_Water_Level /=256.0; ! ((HEIGHT_FIELD *) Object)->bounding_box->bounds[0].y = 65536.0 * Temp_Water_Level; END_CASE *************** *** 1643,1646 **** --- 1665,1669 ---- Error ("Cannot use SMOOTH here"); ((HEIGHT_FIELD *) Object)->Smoothed = TRUE; + Object->Type |= DOUBLE_ILLUMINATE; END_CASE *************** *** 1873,1876 **** --- 1896,1900 ---- { BOX *Object; + DBL temp; Parse_Begin (); *************** *** 1883,1888 **** Parse_Vector(&(Object->bounds[0])); Parse_Comma(); Parse_Vector(&(Object->bounds[1])); ! ! Object->Bounds.Lower_Left=Object->bounds[0]; VSub(Object->Bounds.Lengths, Object->bounds[1],Object->bounds[0]); --- 1907,1928 ---- Parse_Vector(&(Object->bounds[0])); Parse_Comma(); Parse_Vector(&(Object->bounds[1])); ! ! if (Object->bounds[0].x > Object->bounds[1].x) { ! temp = Object->bounds[0].x; ! Object->bounds[0].x = Object->bounds[1].x; ! Object->bounds[1].x = temp; ! } ! if (Object->bounds[0].y > Object->bounds[1].y) { ! temp = Object->bounds[0].y; ! Object->bounds[0].y = Object->bounds[1].y; ! Object->bounds[1].y = temp; ! } ! if (Object->bounds[0].z > Object->bounds[1].z) { ! temp = Object->bounds[0].z; ! Object->bounds[0].z = Object->bounds[1].z; ! Object->bounds[1].z = temp; ! } ! ! Object->Bounds.Lower_Left = Object->bounds[0]; VSub(Object->Bounds.Lengths, Object->bounds[1],Object->bounds[0]); *************** *** 1892,1895 **** --- 1932,1937 ---- } + + static OBJECT *Parse_Disc () *************** *** 3164,3169 **** } else ! if (Object->Texture == NULL) ! Object->Texture = Copy_Textures(Default_Texture); Post_Textures (Object->Texture); if ((Object->Type & WATER_LEVEL_OK_OBJECT) && --- 3206,3216 ---- } else ! { ! if (Object->Texture == NULL) ! Object->Texture = Copy_Textures(Default_Texture); ! if (Object->Texture->Type == PNF_TEXTURE) ! if (Object->Texture->Tnormal != NULL) ! Object->Type |= DOUBLE_ILLUMINATE; ! } Post_Textures (Object->Texture); if ((Object->Type & WATER_LEVEL_OK_OBJECT) && diff -c2 -r ./source/povproto.h \povray2/source/povproto.h *** ./source/povproto.h Fri Jul 16 16:43:56 1993 --- \povray2/source/povproto.h Tue Oct 12 14:21:46 1993 *************** *** 283,287 **** void Add_Pigment PARAMS((COLOUR *Colour, PIGMENT *Pigment, VECTOR *IPoint)); void Perturb_Normal PARAMS((VECTOR *Layer_Normal, TNORMAL *Tnormal, VECTOR *IPoint)); ! void Diffuse PARAMS((FINISH *Finish, VECTOR *IPoint, RAY *Eye, VECTOR *Layer_Normal, COLOUR *Layer_Colour, COLOUR *Colour,DBL Attenuation)); void Reflect PARAMS((DBL Reflection, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour)); void Refract PARAMS((TEXTURE *Texture, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour)); --- 283,288 ---- void Add_Pigment PARAMS((COLOUR *Colour, PIGMENT *Pigment, VECTOR *IPoint)); void Perturb_Normal PARAMS((VECTOR *Layer_Normal, TNORMAL *Tnormal, VECTOR *IPoint)); ! void Diffuse PARAMS((FINISH *Finish, VECTOR *IPoint, RAY *Eye, VECTOR *Layer_Normal, ! COLOUR *Layer_Colour, COLOUR *Colour,DBL Attenuation, OBJECT *Object)); void Reflect PARAMS((DBL Reflection, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour)); void Refract PARAMS((TEXTURE *Texture, VECTOR *IPoint, RAY *Ray, VECTOR *Layer_Normal, COLOUR *Colour)); diff -c2 -r ./source/povray.c \povray2/source/povray.c *** ./source/povray.c Sun Oct 3 10:21:50 1993 --- \povray2/source/povray.c Thu Oct 28 13:13:30 1993 *************** *** 105,117 **** #ifdef NOCMDLINE /* a main() by any other name... */ #ifdef ALTMAIN ! void alt_main() #else ! void main() #endif #else #ifdef ALTMAIN ! void alt_main(argc, argv) #else ! void main(argc, argv) #endif int argc; --- 105,117 ---- #ifdef NOCMDLINE /* a main() by any other name... */ #ifdef ALTMAIN ! MAIN_RETURN_TYPE alt_main() #else ! MAIN_RETURN_TYPE main() #endif #else #ifdef ALTMAIN ! MAIN_RETURN_TYPE alt_main(argc, argv) #else ! MAIN_RETURN_TYPE main(argc, argv) #endif int argc; *************** *** 157,161 **** if (Last_Column == -1) ! Last_Column = Frame.Screen_Width-1; if (Options & DISKWRITE) --- 157,161 ---- if (Last_Column == -1) ! Last_Column = Frame.Screen_Width; if (Options & DISKWRITE) *************** *** 374,380 **** Last_Column = -1; ! First_Line_Temp = (DBL) First_Line; Last_Line_Temp = (DBL) Last_Line; ! First_Column_Temp = (DBL) First_Column ; Last_Column_Temp = (DBL) Last_Column; --- 374,380 ---- Last_Column = -1; ! First_Line_Temp = (DBL) First_Line+1; Last_Line_Temp = (DBL) Last_Line; ! First_Column_Temp = (DBL) First_Column+1; Last_Column_Temp = (DBL) Last_Column; *************** *** 706,710 **** First_Column = (int) (Frame.Screen_Width * First_Column_Temp); else ! First_Column = (int) First_Column_Temp; if(First_Line_Temp > 0.0 && First_Line_Temp < 1.0) --- 706,710 ---- First_Column = (int) (Frame.Screen_Width * First_Column_Temp); else ! First_Column = (int) First_Column_Temp-1; if(First_Line_Temp > 0.0 && First_Line_Temp < 1.0) *************** *** 711,715 **** First_Line = (int) (Frame.Screen_Height * First_Line_Temp); else ! First_Line = (int) First_Line_Temp; if (First_Column < 0) --- 711,715 ---- First_Line = (int) (Frame.Screen_Height * First_Line_Temp); else ! First_Line = (int) First_Line_Temp-1; if (First_Column < 0) *************** *** 750,755 **** Last_Line = (int) Last_Line_Temp; ! if (Last_Column < 0 || Last_Column >= Frame.Screen_Width) ! Last_Column = Frame.Screen_Width - 1; if (Last_Line > Frame.Screen_Height) --- 750,755 ---- Last_Line = (int) Last_Line_Temp; ! if (Last_Column < 0 || Last_Column > Frame.Screen_Width) ! Last_Column = Frame.Screen_Width; if (Last_Line > Frame.Screen_Height) *************** *** 772,776 **** case 'b': /* Min Bounded */ case 'B': ! if (sscanf (&Option_String[2], "%d", &bounds_thresh) != EOF) Bounds_Threshold=bounds_thresh; Use_Slabs = Add_Option; --- 772,776 ---- case 'b': /* Min Bounded */ case 'B': ! if (sscanf (&Option_String[2], "%ld", &bounds_thresh) != EOF) Bounds_Threshold=bounds_thresh; Use_Slabs = Add_Option; *************** *** 865,869 **** fprintf (stdout,"-q%d -w%d -h%d -s%d -e%d\n",Quality, ! Frame.Screen_Width, Frame.Screen_Height, First_Line, Last_Line); fprintf (stdout, "-k%.3f -mv%.1f -i%s ", Clock_Value, Language_Version, --- 865,869 ---- fprintf (stdout,"-q%d -w%d -h%d -s%d -e%d\n",Quality, ! Frame.Screen_Width, Frame.Screen_Height, First_Line+1, Last_Line); fprintf (stdout, "-k%.3f -mv%.1f -i%s ", Clock_Value, Language_Version, diff -c2 -r ./source/render.c \povray2/source/render.c *** ./source/render.c Thu Aug 26 15:41:18 1993 --- \povray2/source/render.c Thu Oct 28 13:13:32 1993 *************** *** 153,157 **** check_stats(y); ! for (x = First_Column ; x <= Last_Column ; x++) { --- 153,157 ---- check_stats(y); ! for (x = First_Column ; x < Last_Column ; x++) { *************** *** 209,213 **** printf ("POV-Ray rendering %s to %s",Input_File_Name,Output_File_Name); if((First_Line != 0) || (Last_Line != Frame.Screen_Height)) ! printf(" from %4d to %4d:\n",First_Line, Last_Line); else printf (":\n"); --- 209,213 ---- printf ("POV-Ray rendering %s to %s",Input_File_Name,Output_File_Name); if((First_Line != 0) || (Last_Line != Frame.Screen_Height)) ! printf(" from %4d to %4d:\n",First_Line+1, Last_Line); else printf (":\n"); *************** *** 481,486 **** JScale = 1.0/(DBL)(AntialiasDepth*AntialiasDepth); /* LSK */ ! for (i=-JRange;i<=JRange;i+=JSteps) ! for (j=-JRange;j<=JRange;j+=JSteps) { if (Options & JITTER) --- 481,486 ---- JScale = 1.0/(DBL)(AntialiasDepth*AntialiasDepth); /* LSK */ ! for (i= -JRange;i<=JRange;i+=JSteps) ! for (j= -JRange;j<=JRange;j+=JSteps) { if (Options & JITTER) *************** *** 530,533 **** } - --- 530,532 ---- diff -c2 -r ./source/texture.c \povray2/source/texture.c *** ./source/texture.c Sun Oct 3 10:25:12 1993 --- \povray2/source/texture.c Sat Oct 9 12:47:56 1993 *************** *** 695,698 **** --- 695,699 ---- ((MATERIAL *)New)->Materials = Copy_Materials (((MATERIAL *)Layer)->Materials); ((MATERIAL *)New)->Trans = Copy_Transform (((MATERIAL *)Layer)->Trans); + ((MATERIAL *)New)->Image = Copy_Image (((MATERIAL *)Layer)->Image); ((MATERIAL *)New)->Num_Of_Mats = (((MATERIAL *)Layer)->Num_Of_Mats); break; diff -c2 -r ./source/tokenize.c \povray2/source/tokenize.c *** ./source/tokenize.c Mon Sep 20 17:50:58 1993 --- \povray2/source/tokenize.c Thu Oct 28 13:13:36 1993 *************** *** 35,39 **** char String[MAX_STRING_INDEX]; int String_Index; - extern char Library_Path[]; extern int Stop_Flag; static int pov_stricmp PARAMS ((char *s1,char *s2)); --- 35,38 ---- diff -c2 -r ./source/triangle.c \povray2/source/triangle.c *** ./source/triangle.c Thu Jul 29 16:47:44 1993 --- \povray2/source/triangle.c Mon Oct 25 18:59:20 1993 *************** *** 375,378 **** --- 375,380 ---- VECTOR Translation; + if(Triangle->Degenerate_Flag) return; + VEvaluate (Translation, Triangle->Normal_Vector, *Vector); Triangle->Distance -= Translation.x + Translation.y + Translation.z; *************** *** 391,394 **** --- 393,398 ---- TRANSFORM Trans; + if(((TRIANGLE *)Object)->Degenerate_Flag) return; + Compute_Rotation_Transform (&Trans, Vector); Transform_Triangle (Object, &Trans); *************** *** 402,405 **** --- 406,411 ---- DBL Length,T1,T2,T3; + if(Triangle->Degenerate_Flag) return; + Triangle->Normal_Vector.x = Triangle->Normal_Vector.x / Vector->x; Triangle->Normal_Vector.y = Triangle->Normal_Vector.y / Vector->y; *************** *** 439,442 **** --- 445,450 ---- TRIANGLE *Triangle = (TRIANGLE *) Object; + if(Triangle->Degenerate_Flag) return; + MTransPoint (&Triangle->Normal_Vector, &Triangle->Normal_Vector, Trans); *************** *** 582,585 **** --- 590,595 ---- VECTOR Translation; + if(Triangle->Degenerate_Flag) return; + VEvaluate (Translation, Triangle->Normal_Vector, *Vector); Triangle->Distance -= Translation.x + Translation.y + Translation.z; *************** *** 596,599 **** --- 606,611 ---- TRANSFORM Trans; + if(((SMOOTH_TRIANGLE *)Object)->Degenerate_Flag) return; + Compute_Rotation_Transform (&Trans, Vector); Transform_Smooth_Triangle (Object, &Trans); *************** *** 607,610 **** --- 619,624 ---- DBL Length; + if(Triangle->Degenerate_Flag) return; + Triangle->Normal_Vector.x = Triangle->Normal_Vector.x / Vector->x; Triangle->Normal_Vector.y = Triangle->Normal_Vector.y / Vector->y; *************** *** 626,629 **** --- 640,645 ---- { SMOOTH_TRIANGLE *Triangle = (SMOOTH_TRIANGLE *) Object; + + if(Triangle->Degenerate_Flag) return; MTransPoint (&Triangle->Normal_Vector, diff -c2 -r ./whatsnew.doc \povray2/whatsnew.doc *** ./whatsnew.doc Wed Sep 29 21:15:34 1993 --- \povray2/whatsnew.doc Mon Nov 29 13:48:54 1993 *************** *** 1,2 **** --- 1,25 ---- + What's New in POV-Ray 2.1 + -------------------------- + + This bug-fix release adds no new features but fixes the following + bugs from version 2.0. + + - Fixed problem in OBJECTS.C that caused problem on some Unix compilers + - Fixed problem with declared material_maps or declared objects with + material_maps + - Fixed IBM.C problems for Zortech compiler + - Created temporary fix for problems with normals, smooth triangles + beziers and height fields which created unsightly black spots + - Allows scale <-1,1,1> to work with boxes + - Cleared up inconsistency with -sr, -sc, -er, -ec numbering. Upper + left pixel is 1,1. Fixed -ec bug. + - Fixed three bezier patch bugs which caused lock-ups, missing reflection, + and triangle dropouts. + - Eliminated some restrictions on multiple clipped_by and bounded_by + - Fixed compiler problems on VMS/VAX + - Fixed scaling bug on degenerate triangles + - Fixed problem with water_level when using +MV1.0 + - Fixed problem with color maped TGA height fields + What's New in POV-Ray 2.0 ------------------------- *************** *** 67,71 **** Should support: 1024 x 768 x 256 color palette 800 x 600 x 15 bit high color ! 640x4 480 x 24 bit true color - Diamond 24X 15 and 24 bit mode support added. - Preview reduced to fit selected video screen size if necessary. --- 90,94 ---- Should support: 1024 x 768 x 256 color palette 800 x 600 x 15 bit high color ! 640 x 480 x 24 bit true color - Diamond 24X 15 and 24 bit mode support added. - Preview reduced to fit selected video screen size if necessary.