home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume23
/
rayshade
/
patch02
< prev
next >
Wrap
Text File
|
1991-10-19
|
33KB
|
1,126 lines
Newsgroups: comp.sources.misc
From: Craig Kolb <rayshade-request@cs.princeton.edu>
Subject: v23i076: rayshade - A raytracing package for UNIX, Patch02
Message-ID: <1991Oct19.024427.13846@sparky.imd.sterling.com>
X-Md4-Signature: 4db8ab9ca39acf91c502a974708a9228
Date: Sat, 19 Oct 1991 02:44:27 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: Craig Kolb <rayshade-request@cs.princeton.edu>
Posting-number: Volume 23, Issue 76
Archive-name: rayshade/patch02
Environment: UNIX
Patch-To: rayshade: Volume 21, Issue 3-22
System: rayshade version 4.0
Patch #: 2
Priority: HIGH
Description:
See patch #1.
Fix: From rn, say "| patch -p -N -d DIR", where DIR is your rayshade source
directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
If you don't have the patch program, apply the following by hand,
or get patch (version 2.0, latest patchlevel).
After patching:
Configure -d
make depend
make
If patch indicates that patchlevel is the wrong version, you may need
to apply one or more previous patches, or the patch may already
have been applied. See the patchlevel.h file to find out what has or
has not been applied. In any event, don't continue with the patch.
If you are missing previous patches (hah!), they can be obtained
through anonymous ftp from weedeater.math.yale.edu. Questions
and problems should be addressed to:
rayshade-request@cs.princeton.edu
Index: patchlevel.h
Prereq: 1
1c1
< #define PATCHLEVEL 1
---
> #define PATCHLEVEL 2
Index: libshade/options.h
Prereq: 4.0
*** libshade/options.h.old 1991/07/17 14:46:54
--- libshade/options.h 1991/09/29 15:51:17
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: options.h,v 4.0 91/07/17 14:46:54 kolb Exp Locker: kolb $
*
* $Log: options.h,v $
* Revision 4.0 91/07/17 14:46:54 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: options.h,v 4.0.1.1 91/09/29 15:51:17 cek Exp Locker: cek $
*
* $Log: options.h,v $
+ * Revision 4.0.1.1 91/09/29 15:51:17 cek
+ * patch1: Added window and crop options.
+ *
* Revision 4.0 91/07/17 14:46:54 kolb
* Initial version.
*
***************
*** 49,55 ****
samples_set, /* samples overridden ... */
cutoff_set, /* cutoff ... */
maxdepth_set, /* adaptive depth ... */
! window_set, /* window ... */
freq_set, /* report frequency ... */
jitter_set, /* use jittering */
eyesep_set, /* eye separation ... */
--- 52,59 ----
samples_set, /* samples overridden ... */
cutoff_set, /* cutoff ... */
maxdepth_set, /* adaptive depth ... */
! window_set, /* subwindow ... */
! crop_set, /* crop window ... */
freq_set, /* report frequency ... */
jitter_set, /* use jittering */
eyesep_set, /* eye separation ... */
***************
*** 68,74 ****
#endif
Float eyesep, /* Eye separation (for Stereo mode) */
gamma, /* Gamma value (0 == no correction) */
- xmin, xmax, ymin, ymax, /* Window range */
starttime, /* Think about it ... */
shutterspeed, /* time shutter is open */
framestart, /* start time of the current frame */
--- 72,77 ----
***************
*** 82,87 ****
--- 85,92 ----
*imgname, /* Name of output image file */
*inputname, /* Name of input file, NULL == stdin */
*cppargs; /* arguments to pass to cpp */
+ int window[2][2]; /* Subwindow corners */
+ Float crop[2][2]; /* Crop window, lo/hi normalized */
#ifdef LINDA
int workers, /* # of worker processes */
workernum, /* worker #, 0 == supervisor */
Index: libray/libcommon/xform.c
*** libray/libcommon/xform.c.old 1991/10/04 15:51:48
--- libray/libcommon/xform.c 1991/10/04 15:51:53
***************
*** 0 ****
--- 1,76 ----
+ /*
+ * xform.c
+ *
+ * Copyright (C) 1989, 1991, Craig E. Kolb
+ * All rights reserved.
+ *
+ * This software may be freely copied, modified, and redistributed
+ * provided that this copyright notice is preserved on all copies.
+ *
+ * You may not distribute this software, in whole or in part, as part of
+ * any commercial product without the express consent of the authors.
+ *
+ * There is no warranty or other guarantee of fitness of this software
+ * for any purpose. It is provided solely "as is".
+ *
+ * $Id: xform.c,v 4.0.1.1 91/10/04 15:51:53 cek Exp Locker: cek $
+ *
+ * $Log: xform.c,v $
+ * Revision 4.0.1.1 91/10/04 15:51:53 cek
+ * patch1: Initial revision.
+ *
+ * Revision 4.0 1991/09/29 15:34:31 cek
+ * Initial version.
+ *
+ */
+ #include "common.h"
+ #include "xform.h"
+
+ TransMethods *iXformMethods;
+
+ /*
+ * Create and return reference to an Xform structure.
+ * In this case, we return a NULL pointer, as the Xform
+ * structure does not hold any data.
+ */
+ Xform *
+ XformCreate()
+ {
+ return (Xform *)NULL;
+ }
+
+ /*
+ * Return a pointer to collection of methods for the
+ * Xform transformation.
+ */
+ TransMethods *
+ XformMethods()
+ {
+ if (iXformMethods == (TransMethods *)NULL) {
+ iXformMethods = (TransMethods *)Malloc(sizeof(TransMethods));
+ iXformMethods->create = (TransCreateFunc *)XformCreate;
+ iXformMethods->propagate = XformPropagate;
+ }
+ return iXformMethods;
+ }
+
+ /*
+ * Given an Xform structure and forward and inverse transformations,
+ * propagate the information in the Xform structure to the
+ * transformations.
+ * In this case, the information "in" the Xform structure is
+ * actually stored in the forward transformation; the Xform
+ * points to NULL.
+ */
+ void
+ XformPropagate(xform, trans, itrans)
+ Xform *xform;
+ RSMatrix *trans, *itrans;
+ {
+ /*
+ * The Xform methods change the forward trans
+ * directly, so it's already all set.
+ * Build the inverse...
+ */
+ MatrixInvert(trans, itrans);
+ }
Index: Doc/Guide/objects.tex
*** Doc/Guide/objects.tex.old 1991/07/17 16:24:14
--- Doc/Guide/objects.tex 1991/09/29 15:55:38
***************
*** 29,35 ****
a matter of defining a special aggregate object, the World object,
which is a list of the objects in the scene. When writing a \rayshade
input file, all objects that are instantiated outside of object-definition
! blocks are added to the World object; you need not (not should you)
define the World object explicitly in the input file.
\section{Primitives}
--- 29,35 ----
a matter of defining a special aggregate object, the World object,
which is a list of the objects in the scene. When writing a \rayshade
input file, all objects that are instantiated outside of object-definition
! blocks are added to the World object; you need not (nor should you)
define the World object explicitly in the input file.
\section{Primitives}
***************
*** 140,152 ****
punts and equate $u$ with the $x$ coordinate of the point of intersection,
and $v$ with the $y$ coordinate.
! \begin{defprim}{hf}{{\em file}}
Creates a height field defined by the altitude data stored
in the named {\em file}. The height field is based upon
perturbations of the unit square in the $z=0$ plane, and is
rendered as a surface tessellated by right isosceles triangles.
\end{defprim}
! See Appendix B for a discussion of the format of a height field file.
Height field inverse mapping is straight-forward: $u$ is the
$x$ coordinate of the point of intersection, $v$ the $y$ coordinate.
--- 140,152 ----
punts and equate $u$ with the $x$ coordinate of the point of intersection,
and $v$ with the $y$ coordinate.
! \begin{defprim}{heightfield}{{\em file}}
Creates a height field defined by the altitude data stored
in the named {\em file}. The height field is based upon
perturbations of the unit square in the $z=0$ plane, and is
rendered as a surface tessellated by right isosceles triangles.
\end{defprim}
! See Appendix C for a discussion of the format of a height field file.
Height field inverse mapping is straight-forward: $u$ is the
$x$ coordinate of the point of intersection, $v$ the $y$ coordinate.
Index: libray/libcommon/xform.h
*** libray/libcommon/xform.h.old 1991/10/04 15:51:23
--- libray/libcommon/xform.h 1991/10/04 15:51:33
***************
*** 0 ****
--- 1,50 ----
+ /*
+ * xform.h
+ *
+ * Copyright (C) 1989, 1991, Craig E. Kolb
+ * All rights reserved.
+ *
+ * This software may be freely copied, modified, and redistributed
+ * provided that this copyright notice is preserved on all copies.
+ *
+ * You may not distribute this software, in whole or in part, as part of
+ * any commercial product without the express consent of the authors.
+ *
+ * There is no warranty or other guarantee of fitness of this software
+ * for any purpose. It is provided solely "as is".
+ *
+ * $Id: xform.h,v 4.0.1.1 91/10/04 15:51:33 cek Exp Locker: cek $
+ *
+ * $Log: xform.h,v $
+ * Revision 4.0.1.1 91/10/04 15:51:33 cek
+ * patch1: Initial revision.
+ *
+ * Revision 4.0 1991/09/29 15:33:56 cek
+ * Initial version.
+ *
+ */
+ #ifndef XFORM_H
+ #define XFORM_H
+
+ #define TransXformCreate() TransCreate((TransRef)XformCreate(), XformMethods())
+
+ #define TransXformSetX0(t, v) TransAssoc(t, &t->trans.matrix[0][0], v)
+ #define TransXformSetY0(t, v) TransAssoc(t, &t->trans.matrix[0][1], v)
+ #define TransXformSetZ0(t, v) TransAssoc(t, &t->trans.matrix[0][2], v)
+ #define TransXformSetX1(t, v) TransAssoc(t, &t->trans.matrix[1][0], v)
+ #define TransXformSetY1(t, v) TransAssoc(t, &t->trans.matrix[1][1], v)
+ #define TransXformSetZ1(t, v) TransAssoc(t, &t->trans.matrix[1][2], v)
+ #define TransXformSetX2(t, v) TransAssoc(t, &t->trans.matrix[2][0], v)
+ #define TransXformSetY2(t, v) TransAssoc(t, &t->trans.matrix[2][1], v)
+ #define TransXformSetZ2(t, v) TransAssoc(t, &t->trans.matrix[2][2], v)
+ #define TransXformSetXt(t, v) TransAssoc(t, &t->trans.translate.x, v)
+ #define TransXformSetYt(t, v) TransAssoc(t, &t->trans.translate.y, v)
+ #define TransXformSetZt(t, v) TransAssoc(t, &t->trans.translate.z, v)
+
+ typedef char Xform; /* Dummy; Xform has no private data. */
+
+ extern Xform *XformCreate();
+ extern TransMethods *XformMethods();
+ extern void XformPropagate();
+
+ #endif /* XFORM_H */
Index: Doc/Guide/animate.tex
*** Doc/Guide/animate.tex.old 1991/07/17 15:53:07
--- Doc/Guide/animate.tex 1991/09/29 15:54:45
***************
*** 27,33 ****
computations are performed.
The starting time of the current frame is computed using the
! length of each frame
the current frame number, and the starting time of the first frame.
\begin{defkey}{shutter}{{\em t}}
--- 27,33 ----
computations are performed.
The starting time of the current frame is computed using the
! lenth of each frame
the current frame number, and the starting time of the first frame.
\begin{defkey}{shutter}{{\em t}}
***************
*** 73,79 ****
The second animated variable, {\tt frame}, is equal to the current
frame number. Unlike the {\tt time} variable, {\tt frame} takes on
a single value for the duration of each frame. Thus, transforms
! animated through the use of the {\tt frame} variable will not exhibit
motion blurring.
Also supported is the {\tt linear} function. This function uses
--- 73,79 ----
The second animated variable, {\tt frame}, is equal to the current
frame number. Unlike the {\tt time} variable, {\tt frame} takes on
a single value for the duration of each frame. Thus, transforms
! animated through the use of the {\tt time} variable will not exhibit
motion blurring.
Also supported is the {\tt linear} function. This function uses
***************
*** 81,87 ****
\begin{defkey}{linear}{{\tt (} {\em Stime, Sval, Etime, Eval} {\tt )}}
Linearly interpolate between {\em Sval} at time
! {\em Stime} and {\em Eval} at time {\em Etime}.
If the current time is less than {\em Stime}, the function
returns {\em Sval}. If the current time is greater than
{\em Etime}, {\em Eval} is returned.
--- 81,87 ----
\begin{defkey}{linear}{{\tt (} {\em Stime, Sval, Etime, Eval} {\tt )}}
Linearly interpolate between {\em Sval} at time
! {\em Stime} and {\em Etime} at time {\em Eval}.
If the current time is less than {\em Stime}, the function
returns {\em Sval}. If the current time is greater than
{\em Etime}, {\em Eval} is returned.
Index: libray/libobj/hf.c
Prereq: 4.0
*** libray/libobj/hf.c.old 1991/07/17 14:38:15
--- libray/libobj/hf.c 1991/09/29 15:44:53
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: hf.c,v 4.0 91/07/17 14:38:15 kolb Exp Locker: kolb $
*
* $Log: hf.c,v $
* Revision 4.0 91/07/17 14:38:15 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: hf.c,v 4.0.1.1 91/09/29 15:44:53 cek Exp Locker: cek $
*
* $Log: hf.c,v $
+ * Revision 4.0.1.1 91/09/29 15:44:53 cek
+ * patch1: Error messages missing newline.
+ *
* Revision 4.0 91/07/17 14:38:15 kolb
* Initial version.
*
***************
*** 54,60 ****
fp = fopen(filename, "r");
if (fp == (FILE *)NULL) {
! RLerror(RL_ABORT, "Cannot open heightfield file \"%s\".",
filename);
return (Hf *)NULL;
}
--- 57,63 ----
fp = fopen(filename, "r");
if (fp == (FILE *)NULL) {
! RLerror(RL_ABORT, "Cannot open heightfield file \"%s\".\n",
filename);
return (Hf *)NULL;
}
***************
*** 72,78 ****
* Get HF size.
*/
if (fread((char *)&hf->size, sizeof(int), 1, fp) == 0) {
! RLerror(RL_ABORT, "Cannot read height field size.");
return (Hf *)NULL;
}
--- 75,81 ----
* Get HF size.
*/
if (fread((char *)&hf->size, sizeof(int), 1, fp) == 0) {
! RLerror(RL_ABORT, "Cannot read height field size.\n");
return (Hf *)NULL;
}
***************
*** 84,90 ****
*/
if (fread((char *)hf->data[i],sizeof(float),hf->size,fp)
!= hf->size) {
! RLerror(RL_ABORT, "Not enough heightfield data.");
return (Hf *)NULL;
}
for (j = 0; j < hf->size; j++) {
--- 87,93 ----
*/
if (fread((char *)hf->data[i],sizeof(float),hf->size,fp)
!= hf->size) {
! RLerror(RL_ABORT, "Not enough heightfield data.\n");
return (Hf *)NULL;
}
for (j = 0; j < hf->size; j++) {
Index: libshade/setup.c
Prereq: 4.0
*** libshade/setup.c.old 1991/07/17 14:47:24
--- libshade/setup.c 1991/09/29 15:52:20
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: setup.c,v 4.0 91/07/17 14:47:24 kolb Exp Locker: kolb $
*
* $Log: setup.c,v $
* Revision 4.0 91/07/17 14:47:24 kolb
* Initial version.
*
--- 13,25 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: setup.c,v 4.0.1.1 91/09/29 15:52:20 cek Exp Locker: cek $
*
* $Log: setup.c,v $
+ * Revision 4.0.1.1 91/09/29 15:52:20 cek
+ * patch1: Added crop window initialization.
+ * patch1: Moved RSViewing call to appropriate location.
+ *
* Revision 4.0 91/07/17 14:47:24 kolb
* Initial version.
*
***************
*** 92,99 ****
Options.cutoff.r = UNSET;
Options.cache = TRUE;
Options.shadowtransp = TRUE;
! Options.xmin = Options.ymin = 0.;
! Options.xmax = Options.ymax = 1.;
Stats.fstats = stderr;
Options.pictfile = stdout;
#ifdef URT
--- 96,103 ----
Options.cutoff.r = UNSET;
Options.cache = TRUE;
Options.shadowtransp = TRUE;
! Options.crop[LOW][X] = Options.crop[LOW][Y] = 0.;
! Options.crop[HIGH][X] = Options.crop[HIGH][Y] = 1.;
Stats.fstats = stderr;
Options.pictfile = stdout;
#ifdef URT
***************
*** 200,207 ****
Options.framenum);
/*
* Set up viewing parameters.
*/
! RSViewing();
/*
* Initialize world
*/
--- 204,214 ----
Options.framenum);
/*
* Set up viewing parameters.
+ * Can't animate camera yet; when possible, this will
+ * need to be much smarter.
+ * RSViewing();
*/
!
/*
* Initialize world
*/
***************
*** 243,246 ****
--- 250,257 ----
*/
SamplingSetOptions(Options.samples, Options.gaussian,
Options.filterwidth);
+ /*
+ * Camera is currently static; initialize it here.
+ */
+ RSViewing();
}
Index: libray/libobj/triangle.c
Prereq: 4.0
*** libray/libobj/triangle.c.old 1991/07/17 14:39:38
--- libray/libobj/triangle.c 1991/09/29 15:47:11
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: triangle.c,v 4.0 91/07/17 14:39:38 kolb Exp Locker: kolb $
*
* $Log: triangle.c,v $
* Revision 4.0 91/07/17 14:39:38 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: triangle.c,v 4.0.1.1 91/09/29 15:47:11 cek Exp Locker: cek $
*
* $Log: triangle.c,v $
+ * Revision 4.0.1.1 91/09/29 15:47:11 cek
+ * patch1: Potential roundoff problem in dPdU code.
+ *
* Revision 4.0 91/07/17 14:39:38 kolb
* Initial version.
*
***************
*** 399,405 ****
hi = 0; mid = 1; lo = 2;
}
}
! if (t[hi].u - t[lo].u == 0.) {
/* degenerate axis */
dpdv->x = dpdv->y = dpdv->z = 0.;
} else {
--- 402,408 ----
hi = 0; mid = 1; lo = 2;
}
}
! if (fabs(t[hi].u - t[lo].u) < EPSILON) {
/* degenerate axis */
dpdv->x = dpdv->y = dpdv->z = 0.;
} else {
***************
*** 439,445 ****
hi = 0; mid = 1; lo = 2;
}
}
! if (t[hi].v - t[lo].v == 0.) {
/* degenerate axis */
dpdu->x = dpdu->y = dpdu->z = 0.;
} else {
--- 442,448 ----
hi = 0; mid = 1; lo = 2;
}
}
! if (fabs(t[hi].v - t[lo].v) < EPSILON) {
/* degenerate axis */
dpdu->x = dpdu->y = dpdu->z = 0.;
} else {
Index: libray/libcommon/transform.c
Prereq: 4.0
*** libray/libcommon/transform.c.old 1991/07/17 14:32:25
--- libray/libcommon/transform.c 1991/09/29 15:37:06
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: transform.c,v 4.0 91/07/17 14:32:25 kolb Exp Locker: kolb $
*
* $Log: transform.c,v $
* Revision 4.0 91/07/17 14:32:25 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: transform.c,v 4.0.1.1 91/09/29 15:37:06 cek Exp Locker: cek $
*
* $Log: transform.c,v $
+ * Revision 4.0.1.1 91/09/29 15:37:06 cek
+ * patch1: CoordSysTransform did not detect up-Z == -1.
+ *
* Revision 4.0 91/07/17 14:32:25 kolb
* Initial version.
*
***************
*** 132,137 ****
--- 135,141 ----
* have unit length. This is useful for transforming a general
* form of a primitive into a canonical, Z-axis aligned, unit size
* primitive, facilitating intersection testing.
+ * Assumes that "up" is normalized.
*/
void
CoordSysTransform(origin, up, r, len, trans)
***************
*** 143,149 ****
Vector atmp;
ScaleMatrix(r, r, len, &trans->trans);
! if (fabs(up->z) == 1.) {
atmp.x = 1.;
atmp.y = atmp.z = 0.;
} else {
--- 147,153 ----
Vector atmp;
ScaleMatrix(r, r, len, &trans->trans);
! if (1. - fabs(up->z) < EPSILON) {
atmp.x = 1.;
atmp.y = atmp.z = 0.;
} else {
Index: libshade/lex.l
Prereq: 4.0
*** libshade/lex.l.old 1991/07/17 14:46:15
--- libshade/lex.l 1991/10/08 20:25:59
***************
*** 11,17 ****
/* There is no warranty or other guarantee of fitness of this software */
/* for any purpose. It is provided solely "as is". */
/* */
! /* $Id: lex.l,v 4.0 91/07/17 14:46:15 kolb Exp Locker: kolb $ */
%{
#include "config.h"
#include "rayshade.h"
--- 11,17 ----
/* There is no warranty or other guarantee of fitness of this software */
/* for any purpose. It is provided solely "as is". */
/* */
! /* $Id: lex.l,v 4.0.1.2 91/10/08 20:25:59 cek Exp Locker: cek $ */
%{
#include "config.h"
#include "rayshade.h"
***************
*** 36,42 ****
string {alpha}({alpha}|{digit}|{special})*
filename "/"?"/"?(("."|".."|{string})"/")*{string}
%p 9400
! %e 1200
%n 600
%%
[ \t\n] ;
--- 36,42 ----
string {alpha}({alpha}|{digit}|{special})*
filename "/"?"/"?(("."|".."|{string})"/")*{string}
%p 9400
! %e 1500
%n 600
%%
[ \t\n] ;
***************
*** 58,63 ****
--- 58,64 ----
cone return tCONE;
component return tCOMPONENT;
contrast return tCONTRAST;
+ crop return tCROP;
cursurf return tCURSURF;
cutoff return tCUTOFF;
cylinder return tCYL;
***************
*** 146,151 ****
--- 147,153 ----
up return tUP;
uv return tUV;
verbose return tVERBOSE;
+ window return tWINDOW;
windy return tWINDY;
wood return tWOOD;
{digit}+ |
Index: libray/libobj/geom.c
Prereq: 4.0
*** libray/libobj/geom.c.old 1991/07/17 14:37:47
--- libray/libobj/geom.c 1991/09/29 15:43:15
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: geom.c,v 4.0 91/07/17 14:37:47 kolb Exp Locker: kolb $
*
* $Log: geom.c,v $
* Revision 4.0 91/07/17 14:37:47 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: geom.c,v 4.0.1.1 91/09/29 15:43:15 cek Exp Locker: cek $
*
* $Log: geom.c,v $
+ * Revision 4.0.1.1 91/09/29 15:43:15 cek
+ * patch1: GeomBounds now inflates bounds by EPSILON.
+ *
* Revision 4.0 91/07/17 14:37:47 kolb
* Initial version.
*
***************
*** 238,243 ****
--- 241,252 ----
RLerror(RL_ABORT, "Can't compute bounds of \"%s\".\n",
GeomName(obj));
(*obj->methods->bounds) (obj->obj, bounds);
+ bounds[LOW][X] -= EPSILON;
+ bounds[LOW][Y] -= EPSILON;
+ bounds[LOW][Z] -= EPSILON;
+ bounds[HIGH][X] += EPSILON;
+ bounds[HIGH][Y] += EPSILON;
+ bounds[HIGH][Z] += EPSILON;
if (obj->trans) {
for (trans = obj->trans; trans; trans = trans->next)
BoundsTransform(&trans->trans, bounds);
Index: Configure
Prereq: 2.0.1.5
*** Configure.old 1991/09/29 16:02:47
--- Configure 1991/10/10 18:39:55
***************
*** 16,22 ****
# my version which slightly differs from the original written by
# Larry Wall.)
! # $Id: Head.U,v 2.0.1.5 91/01/25 10:19:15 ram Exp $
: save PATH defined by user
user_path=$PATH
--- 16,22 ----
# my version which slightly differs from the original written by
# Larry Wall.)
! # $Id: Configure,v 4.0.1.1 91/10/10 18:39:55 cek Exp Locker: cek $
: save PATH defined by user
user_path=$PATH
***************
*** 369,375 ****
Much effort has been expended to ensure that this shell script will run on
any Unix system. If despite that it blows up on you, your best bet is to edit
! Configure and run it again. Also, let me (rayshade@weedeater.math.yale.edu)
know how I blew it. If you can't run Configure for some reason, you'll have
to generate a config.sh file by hand.
--- 369,375 ----
Much effort has been expended to ensure that this shell script will run on
any Unix system. If despite that it blows up on you, your best bet is to edit
! Configure and run it again. Also, let me (rayshade-request@cs.princeton.edu)
know how I blew it. If you can't run Configure for some reason, you'll have
to generate a config.sh file by hand.
Index: libshade/funcdefs.h
Prereq: 4.0
*** libshade/funcdefs.h.old 1991/07/17 14:46:11
--- libshade/funcdefs.h 1991/09/29 15:50:07
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: funcdefs.h,v 4.0 91/07/17 14:46:11 kolb Exp Locker: kolb $
*
* $Log: funcdefs.h,v $
* Revision 4.0 91/07/17 14:46:11 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: funcdefs.h,v 4.0.1.1 91/09/29 15:50:07 cek Exp Locker: cek $
*
* $Log: funcdefs.h,v $
+ * Revision 4.0.1.1 91/09/29 15:50:07 cek
+ * patch1: Don't declare free or exit void if stdlib.h is used.
+ *
* Revision 4.0 91/07/17 14:46:11 kolb
* Initial version.
*
***************
*** 32,38 ****
/*
* Misc. routines.
*/
! extern void free(), exit(), get_cpu_time(),
! read_input_file();
#endif /* FUNCDEFS_H */
--- 35,44 ----
/*
* Misc. routines.
*/
! #ifndef I_STDLIB
! extern void free(), exit();
! #endif
!
! extern void get_cpu_time(), read_input_file();
#endif /* FUNCDEFS_H */
Index: libray/liblight/shadow.c
Prereq: 4.0
*** libray/liblight/shadow.c.old 1991/07/17 14:35:34
--- libray/liblight/shadow.c 1991/09/29 15:40:57
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: shadow.c,v 4.0 91/07/17 14:35:34 kolb Exp Locker: kolb $
*
* $Log: shadow.c,v $
* Revision 4.0 91/07/17 14:35:34 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: shadow.c,v 4.0.1.1 91/09/29 15:40:57 cek Exp Locker: cek $
*
* $Log: shadow.c,v $
+ * Revision 4.0.1.1 91/09/29 15:40:57 cek
+ * patch1: ShadowOptions was incorrectly externed.
+ *
* Revision 4.0 91/07/17 14:35:34 kolb
* Initial version.
*
***************
*** 236,241 ****
--- 239,245 ----
void
ShadowSetOptions(options)
+ long options;
{
ShadowOptions = options;
}
***************
*** 247,253 ****
{
HitNode *np;
int i, n;
! extern int ShadowOptions;
i = 0;
--- 251,257 ----
{
HitNode *np;
int i, n;
! extern long ShadowOptions;
i = 0;
Index: libray/libcommon/vecmath.c
Prereq: 4.0
*** libray/libcommon/vecmath.c.old 1991/07/17 14:33:02
--- libray/libcommon/vecmath.c 1991/09/29 15:38:41
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: vecmath.c,v 4.0 91/07/17 14:33:02 kolb Exp Locker: kolb $
*
* $Log: vecmath.c,v $
* Revision 4.0 91/07/17 14:33:02 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: vecmath.c,v 4.0.1.1 91/09/29 15:38:41 cek Exp Locker: cek $
*
* $Log: vecmath.c,v $
+ * Revision 4.0.1.1 91/09/29 15:38:41 cek
+ * patch1: Fixed floating-point compare in normalization code.
+ *
* Revision 4.0 91/07/17 14:33:02 kolb
* Initial version.
*
***************
*** 32,38 ****
Float d;
d = sqrt(a->x*a->x + a->y*a->y + a->z*a->z);
! if(d == 0.)
return 0.;
a->x /= d;
a->y /= d;
--- 35,41 ----
Float d;
d = sqrt(a->x*a->x + a->y*a->y + a->z*a->z);
! if (equal(d, 0.))
return 0.;
a->x /= d;
a->y /= d;
Index: libray/libcommon/color.h
Prereq: 4.0
*** libray/libcommon/color.h.old 1991/07/17 14:30:08
--- libray/libcommon/color.h 1991/09/29 15:32:09
***************
*** 13,21 ****
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: color.h,v 4.0 91/07/17 14:30:08 kolb Exp Locker: kolb $
*
* $Log: color.h,v $
* Revision 4.0 91/07/17 14:30:08 kolb
* Initial version.
*
--- 13,24 ----
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
! * $Id: color.h,v 4.0.1.1 91/09/29 15:32:09 cek Exp Locker: cek $
*
* $Log: color.h,v $
+ * Revision 4.0.1.1 91/09/29 15:32:09 cek
+ * patch1: Fixed #endif typo.
+ *
* Revision 4.0 91/07/17 14:30:08 kolb
* Initial version.
*
***************
*** 44,47 ****
#define ColorAdd(x,y,a) (a)->r = (x).r+(y).r, \
(a)->g = (x).g+(y).g, \
(a)->b = (x).b+(y).b
! #endif COLOR_H
--- 47,50 ----
#define ColorAdd(x,y,a) (a)->r = (x).r+(y).r, \
(a)->g = (x).g+(y).g, \
(a)->b = (x).b+(y).b
! #endif /* COLOR_H */
Index: Doc/Guide/texture.tex
*** Doc/Guide/texture.tex.old 1991/07/17 14:24:45
--- Doc/Guide/texture.tex 1991/09/29 15:57:34
***************
*** 251,258 ****
\end{defkey}
The inverse mapping method for each primitive is described in Chapter 5.
! \begin{defkey}{map}{{\tt linear} [\evec{origin} \evec{vaxis} \evec{uaxis}]}
! Use a linear mapping method. The 2D texture is transformed
so that its $u$ axis is given by \evec{uaxis} and its $v$
axis by $vaxis$. The texture is projected along the vector
defined by the cross product of the $u$ and $v$ axes, with
--- 251,258 ----
\end{defkey}
The inverse mapping method for each primitive is described in Chapter 5.
! \begin{defkey}{map}{{\tt planar} [\evec{origin} \evec{vaxis} \evec{uaxis}]}
! Use a planar mapping method. The 2D texture is transformed
so that its $u$ axis is given by \evec{uaxis} and its $v$
axis by $vaxis$. The texture is projected along the vector
defined by the cross product of the $u$ and $v$ axes, with
Index: Doc/Guide/surfaces.tex
*** Doc/Guide/surfaces.tex.old 1991/07/17 14:24:41
--- Doc/Guide/surfaces.tex 1991/09/29 15:57:02
***************
*** 221,228 ****
/*
* Mirrored ball and cylinder sitting on 'default' plane.
*/
! surface mirror .01 .01 .01 diffuse .05 .05 .05
! specular .8 .8 .8 speccoef 20 reflect 0.95
plane 0 0 0 0 0 1
applysurf mirror
sphere 1 0 0 0
--- 221,229 ----
/*
* Mirrored ball and cylinder sitting on 'default' plane.
*/
! surface mirror ambient .01 .01 .01
! diffuse .05 .05 .05
! specular .8 .8 .8 specpow 20 reflect 0.95
plane 0 0 0 0 0 1
applysurf mirror
sphere 1 0 0 0
Index: Doc/Guide/options.tex
*** Doc/Guide/options.tex.old 1991/07/17 14:24:30
--- Doc/Guide/options.tex 1991/09/29 15:56:29
***************
*** 132,145 ****
in the input file. By default, \rayshade traces shadow
rays through non-opaque objects.
- \begin{defkey}{-P}{{\em depth}}
- Use adaptive supersampling with the given
- maximum depth.
- \end{defkey}
- This option overrides the {\tt jittered} keyword and the
- value associated the
- {\tt adaptive} keyword given in the input file, if any.
-
\begin{defkey}{-P}{}
Specify the options that should be passed to the C
preprocessor.
--- 132,137 ----
Index: libray/libcommon/Makefile.SH
*** libray/libcommon/Makefile.SH.old 1991/07/17 14:29:58
--- libray/libcommon/Makefile.SH 1991/09/29 15:39:27
***************
*** 35,41 ****
CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
SHELL = /bin/sh
! CFILES = memory.c expr.c transform.c rotate.c sampling.c scale.c translate.c vecmath.c
OFILES = $(CFILES:.c=.o)
$(LIB): $(OFILES)
--- 35,42 ----
CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
SHELL = /bin/sh
! CFILES = memory.c expr.c transform.c rotate.c sampling.c scale.c translate.c \
! vecmath.c xform.c
OFILES = $(CFILES:.c=.o)
$(LIB): $(OFILES)
Index: Makefile
Prereq: 4.0
*** Makefile.old 1991/07/17 14:27:06
--- Makefile 1991/10/10 18:33:14
***************
*** 2,9 ****
# Makefile for rayshade distribution
# C. Kolb 1/91
#
! # $Id: Makefile,v 4.0 91/07/17 14:27:06 kolb Exp Locker: kolb $
#
STUFF = libray libshade rayshade etc
SHELL = /bin/sh
--- 2,11 ----
# Makefile for rayshade distribution
# C. Kolb 1/91
#
! # $Id: Makefile,v 4.0.1.1 91/10/10 18:33:14 cek Exp Locker: cek $
#
+
+ MAKE = make -$(MAKEFLAGS)
STUFF = libray libshade rayshade etc
SHELL = /bin/sh
Index: libray/Makefile
Prereq: 4.0
*** libray/Makefile.old 1991/07/17 14:29:47
--- libray/Makefile 1991/10/10 18:33:41
***************
*** 2,9 ****
# Makefile for libray
# C. Kolb 1/91
#
! # $Id: Makefile,v 4.0 91/07/17 14:29:47 kolb Exp Locker: kolb $
#
STUFF = libcommon libobj libimage liblight libsurf libtext
SHELL = /bin/sh
--- 2,10 ----
# Makefile for libray
# C. Kolb 1/91
#
! # $Id: Makefile,v 4.0.1.1 91/10/10 18:33:41 cek Exp Locker: cek $
#
+ MAKE = make -$(MAKEFLAGS)
STUFF = libcommon libobj libimage liblight libsurf libtext
SHELL = /bin/sh
*** End of Patch 2 ***
exit 0 # Just in case...
--
Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD UUCP: uunet!sparky!kent
Phone: (402) 291-8300 FAX: (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.