From: ivan (ivan@svgalib.org)
Date: Tue 30 Nov 1999 - 15:40:09 IST
<SNIPPAGE> > >I'm sure you get the picture. > >For semi-circles facing other directions, you will need to use gl_line() >and two seperate y values. > >But, tra la, it's time for me to go to work. Perhaps IVAN will be so kind >as to edify us on that one... ;P hehehe > >Have a good one & HTH, > >-Jay Link > > >p.s. No hard feelings, Ivan. > > hmmmm ... have you tested these routines with all possible radii ? without testing them myself, i suspect that there will be certain values for r (radius) that result in a less than perfectly filled circle or semi-circle. this being because of the rounding errors in the math functions and the line algorithm. nothing can be done about that except to be aware that these things happen :) afaik (please - somebody correct me if i'm wrong), the only way to get 100% fill for all cases is some form of boundary detection and fill in the middle bits with a boring plot pixel function. refer my earlier post for details. fyi, MR LINK, *I* did post a solution as soon as i realised that yours wasn't quite what was asked - you did give a *very* good answer though if somebody wants to know how to draw a hollow semi-circle :) ivan. no offence taken, no offence meant ======================================================================== This random collection of pixels proudly presented by ... _____ __ __ _____ _ |_ _| | \/ | | __ \ | | | |_ ____ _ _ __ | \ / | ___| | | | ___ _ __ __ _ __ _| |__ | \ \ / / _` | '_ \ | |\/| |/ __| | | |/ _ \| '_ \ / _` |/ _` | '_ \ _| |\ V / (_| | | | | | | | | (__| |__| | (_) | | | | (_| | (_| | | | | |_____\_/ \__,_|_| |_| |_| |_|\___|_____/ \___/|_| |_|\__,_|\__, |_| |_| My daily exercise consists of stretching friendships __/ | jumping to conclusions and running away from problems |___/ =========================================================================
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST