midpoint algorithm for parabola
- From: "Justin Archie" <jtarchie@xxxxxxxxx>
- Date: 13 Feb 2006 21:18:02 -0800
I have for the past few days been trying to work on the derivation of a
Bresenham algorithm on a parabola. yet it just seems that everything I
come up yields me a straight line.
int x = 0, y = 0, d = 0;
for(x=0,y=0; x<100; x++) {
setPixel(x,y);
d+=2*x+1;
if(d>=0) {
y++;
d--;
}
}
This code always yields a straight line, and I cannot figure out why. I
have even look at other derivations of a parabola. I was wondering what
I could be doing wrong? Anyone have any suggestions or insights. I
would write more, but the derivation can be found at multiple
locations, but if someone has some working code that I could view that
would be even better.
.
- Follow-Ups:
- Re: midpoint algorithm for parabola
- From: Greg M Lee
- Re: midpoint algorithm for parabola
- From: Just d' FAQs
- Re: midpoint algorithm for parabola
- Prev by Date: Re: Monte Carlo ray tracing and partial sums
- Next by Date: Re: Intersections of quadratic Bezier curves with equal begin- and end point
- Previous by thread: hey guys some new algs...
- Next by thread: Re: midpoint algorithm for parabola
- Index(es):
Relevant Pages
|
Loading