[comp.graphics] I need some depth arrangement/sorting info

slandrum@ntg.uucp (Stephen Landrum) (03/07/91)

Could someone point me to good references for depth arrangement/sorting
of objects and surfaces?

Thanks.-- 
Stephen H. Landrum                                        VOICE: (415) 813-8909
                    UUCP: ...apple!ntg!slandrum
 USNAIL: New Technologies Group Inc. 2468 Embarcardero Way, Palo Alto CA 94303

ra2@doc.ic.ac.uk (Roger Attrill) (03/08/91)

In article <14@goblin.ntg.uucp> slandrum@ntg.uucp (Stephen Landrum) writes:
>
>Could someone point me to good references for depth arrangement/sorting
>of objects and surfaces?
>

 I was writing a solids modeller a year or two ago and needed a good
routine to sort surfaces into depth order. I was concerned with about
20,000 triangular patches.
 I eventually came up with what I suppose is a very efficient quicksort routine
which took 4.7 seconds on my 8MHz machine to sort 100,000 numbers.
 It appears to be of order nlogn for all cases - random, sorted, and reverse
sorted, The latter two cases of which are faster than the first -
unlike standard quicksort.
 It the fastest sort I've come across, better even than the shell-Metzner sort!
Mail me if you are interested.

Ciao,

 Rog.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|   Roger C. Attrill   | I don't always think therefore I'm not necessarily. |
|   ra2@doc.ic.ac.uk   |                                                     |
|   Imperial College   |          and other variations on a theme.           |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-