Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!uw-beaver!ubc-vision!alberta!cdshaw From: cdshaw@alberta.UUCP (Chris Shaw) Newsgroups: comp.graphics Subject: Re: AmigaWorld Ray-Tracing Article: Algrothm complexity Message-ID: <312@pembina.UUCP> Date: Sun, 26-Apr-87 16:22:58 EDT Article-I.D.: pembina.312 Posted: Sun Apr 26 16:22:58 1987 Date-Received: Tue, 28-Apr-87 00:42:07 EDT References: <1514@sphinx.uchicago.edu> <804@elrond.CalComp.COM> Reply-To: cdshaw@pembina.UUCP (Chris Shaw) Organization: U. of Alberta, Edmonton, AB Lines: 39 In article <804@elrond.CalComp.COM> amamaral(Alan Amaral) writes: >In article <1514@sphinx.uchicago.edu>, (david lee griffith) writes: >> With 50 - 100 spheres in the universe, and 320x400 pixels >> (or however many there are) that is a whole bunch of comparisons. >> If each comparison requires two floating-point multiplications and >> a subtraction, no wonder the program takes so long! > >Yes! It may be slow, but it's so very elegent and simple to program and >maintain that way. That's one of the big reasons raytracing is SO >attractive in the first place! Ok, I guess that since bubble sort is so simple & elegant, I should use it to sort random lists of things, no matter how long the list is, and how out of order the list is. We wouldn't want to quicksort, a much better algorithm for big (unsorted) lists, simply due to its complexity. Or something. >I'll just about guarantee that my ray tracer >that will render a correct picture 99.999% of the time, and look as >good or better than just about ANY "conventional" renderer, [ ^^^^^ whatever that means] >AND do it with easily 1/10 to 1/50 of the code. So what. There are two separate issues here, one is code correctness, the other is running time. Correct pictures ~= correct code, fast pictures ~= better algorithm. The problem with computer graphics is that there is no really objective measure of performance, if people are interested in performance at all. Any number of NP Complete problems can be coded up and made to work, but the obvious problem is the exponential running time. So leave off with this claim that "simple code is necessarily better, never mind the run time". >> ...ihnp4!gargoyle!sphinx!drco Dave Griffith >uucp: ...decvax!elrond!amamaral -- Chris Shaw cdshaw@alberta University of Alberta CatchPhrase: Bogus as HELL !