ritter@versatc.versatec.COM (Jack Ritter) (04/12/90)
In most image synthesizers, you have the freedom to pick the overall scale of your world coordinates. (The image-space to screen-space transformation compensates.) Most raytracers I've seen use a span of about -10.0 to 10.0 for each world dimension. This makes sense because it uses all of the accuracy bits (where a span of, say, -.1 to .1, throws away 1 decimal digit of accuracy). It also allows more elbow room for intermediate calculations as far as over/under flow. Assume you're using doubles. If your're careful about over/under flow, you dont need all those exponent bits. What if you define your world space span as: -10000 to 10000, for example? Does this convert surplus exponent bits into additional accuracy bits, or does it just make the holes in floating-point-space bigger? -- Versatec, Inc. Jack Ritter, M.S. 1-7 2710 Walsh Ave. P.O. Box 58091 Santa Clara, CA 95052-8091 (408)982-4332, or (408)988-2800 X 5743 UUCP: {ames,apple,sun,pyramid}!versatc!ritter --( / __ - .. (( / / / -- ) . \ \ // . ( / ** ) // _*_ // * .. ) (( . \ / . * ) //
kassover@jupiter.crd.ge.com (David Kassover) (04/12/90)
In article <20582@versatc.versatec.COM> ritter@versatc.versatec.COM (Jack Ritter) writes: ... >If your're careful about over/under flow, you dont >need all those exponent bits. What if you define >your world space span as: -10000 to 10000, for >example? Does this convert surplus exponent bits >into additional accuracy bits, or does it just >make the holes in floating-point-space bigger? you'd want to know more about your underlying architecture... Your mileage will vary from place to place: binary machine, 56 bit mantissa 8 bit exponent 54 bit mantissa 10 bit exponent 63 bit mantissa 9 bit exponent hexadecimal machine 56 bit mantissa 8 bit exponent will all give you slightly different results. Not to mention one architecture I know of which uses a 56 bit integer, so the float hardware can be used for strictly integer calculations. Or you can write your program in Ada and design your own arithmetic. Watch out for performance hits if you do something to outre wrt the actual hardware... -- =================================================== David Kassover kassover@ra.crd.ge.com kassover@crd.ge.com
ritter@versatc.versatec.COM (Jack Ritter) (04/14/90)
In article <20582@versatc.versatec.COM>, ritter@versatc.versatec.COM (Jack Ritter) writes: > If your're careful about over/under flow, you dont > need all those exponent bits. What if you define > your world space span as: -10000 to 10000, for > example? Does this convert surplus exponent bits > into additional accuracy bits, or does it just > make the holes in floating-point-space bigger? > -- From the responses I got, I should clarify what I mean. I'm talking about standard floating point arithmetic (whether HW or SW). By 'accuracy bits' I mean the fixed length mantissa, so the 'conversion' I refer to is only EFFECTIVE conversion. Anyway, before anyone waists any more time on this, I remember from school that accuracy is accuracy, whether or not you use the exponent's higher bits; the problem is mixing very tiny numbers with very large ones, which usually dousnt happen in image synthesis because most scenes have a 'reasonable' span of scale. (Of course certain calculation can always blow up if you're not careful, like root finding). -- Versatec, Inc. Jack Ritter, M.S. 1-7 2710 Walsh Ave. P.O. Box 58091 Santa Clara, CA 95052-8091 (408)982-4332, or (408)988-2800 X 5743 UUCP: {ames,apple,sun,pyramid}!versatc!ritter --( / __ - .. (( / / / -- ) . \ \ // . ( / ** ) // _*_ // * .. ) (( . \ / . * ) //