From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: <38637BBF DOT CC5A0C04 AT maths DOT unine DOT ch> Subject: Re: 3D Problem Lines: 30 Organization: Pin Eight Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: X-Trace: /ba9QeN/M5ty9nfxBiKPR/m3XA0354y44GuVThBSGqRIzslPy0QqB7lCWLphmuNhTsTp4uV8w+ZY!aQhgusOpKIpaaLTbFbWxuWfJLqnHxWYLxLXFn8Q7HS+fKNPfOP+t++kFt5DSRUa9Y+k= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sat, 25 Dec 1999 16:58:30 GMT Distribution: world Date: Sat, 25 Dec 1999 16:58:30 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Snowman" wrote: > After that I use qsort() and sort the QUAD's in the FACE array. > Then,with quad3d(..) i put everything to a bitmap and then to screen. > First I was just checking the z-coordinate but it worked just partly. :( > So I tried to calculate the distance from the (0,0,0) coordinate to the > points (using simply Pythagoras formula) > But it was also bad. :(((. No sorting technique is perfect, but a straight z-coordinate sort followed by a "Painter's" pass is nearly so. Look for Painter's algorithm on Google. -- Damian Yerrick http://yerricde.tripod.com/ View full .sig: http://www.rose-hulman.edu/~yerricde/sig.html and now you must pay...