|
![](/i/fill.gif) |
So I have the following program which I wrote to calculate the boundary of a
gosper island, which it does quite admirably. However, according to my logic,
all resultant points should have an x coordinate -length/2 <= x </ length/2 but
I consistantly get a couple coordinates outside that area for values of epsilon
smaller than ~0.17
The only thing I can think of is that, below that length, the normalized vector
gets flipped, but I can't think of any reason this should be happening if the
sign of both x coordinates is the same, and since the left coordinate is always
p0, the vector p1 - p0 should always point toward the positive x.
unless I'm missing something very subtle, or there's an elephant in the code and
I'm just not seeing it.
Maybe another set of eyes will see what mine don't.
Regards,
A.D.B.
Post a reply to this message
Attachments:
Download 'gosper.cpp.txt' (5 KB)
|
![](/i/fill.gif) |