#Stretching Turbo C
2 messages in this thread
Kent –
I bought your book 'Stretching Turbo C' primarily to get the Bezier
curve subroutine. I am having a problem ! Sometimes the gravity effect is
centered around the 0,0 coord. pts. . This problem only seems to occur
using larger point sets (six +).
1. Are there limitations on the points enter into these functions.
If so what are they.
2. If not, do you have any idea on what might cause the Bezier function to
drift towards the 0,0 pt. When I say drift I really mean the curve starts
at the beg pt. then it goes directly to the 0,0 and from there to the end
pt. Sometimes is does a small loop near the 0,0 pt. before finishing up.
I am using a Atari 520 upgraded to 1 meg. The only change I have made
to your code is the function lineto(), which I have changed to put_pixel()
(sets screen bits to plot points on screen). I have checked the set of
points going in and they were correct. The points coming out of the
function, however reflect the problem.
Any ideas on this problem are appreciated.
Aaron
First, it's my sad duty to point out that Kent passed away last
June. I finished his book on Stretching Turbo Pascal, which
should be out in late February. I did some work on the Bezier
function, but it's been a while (and I don't have my copy of
Stretching TC with me). If I remember correctly, lineto() relies
on a BGI function that draws the line between two intermediate points.
From that vantage point, I'd say that put_pixel() is
suspect.
Theoretically, there's no such limitation in the Bezier function.
Kent, however, uses a virtual coordinate system that may not
directly translate to the Atari. I'll look into it more when I get
back to the office (next week).
— MF