[futurebasic] Re: [FB] Re: [XFB] Recursive FN Questions

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2003 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Thu, 24 Apr 2003 16:11:46 -0400
On Thursday, April 24, 2003, at 01:59  PM, Dick trudell wrote:

> RC, Larry, Peter, Ken, Jay and Alain have all commented on RC's  
> question to the list.  Here are my comments and yet another code  
> snippet:
>>

Thanks to all, and  for the new snippet.


>> My aims are simply to approximate the curve created by mousedrawn and  
>> scanned points. The curve need -not- pass through all the points, in  
>> fact the whole reason I am using a curve is to smooth sampling error.  
>> Thus it may be said that my points are "noisy".
>
> This is analogous to the situation in ship/boat design where the  
> designer wants his curves "faired' and smooth. In practice a set of  
> X,Y points are penciled onto paper and a mechanical spline (usually  
> wooden) is bent to 'fit' the various points. Being made of a  
> homogenous material will generally result in the spline not hitting  
> every point. The Naval Architect then 'fairs' the curve by moving  
> those points not intersecting the spline to then intersect the spline.  
> If we fit a cubic spline to the same points, it will pass through each  
> point and be a smooth curve but not exactly 'fair' as described above.  
> Thus your search is in fact my search and I'd be most interested in  
> what you find.


Ah, nice to be not alone. :)


>> This Gems source can be found at <  
>> ftp://ftp-graphics.stanford.edu/pub/Graphics/GraphicsGems/Gems/ 
>> gems.zip > and the pertinant headers are GGVecLib.c and  
>> GraphicsGems.h, the file being of course, FitCurves.c
>
> I have also tried to convert this GEM, even using your post to the  
> mailing list as a guide. I've had no success and have given up to this  
> point. Perhaps this group could work out a solution for all of us. As  
> stated above it would be most useful in my efforts.

Again, nice to not be alone.

What might work is if I post a FN from that as I convert it...the FB  
from the C. Maybe then, any errors will be seen. I just ran Mr.  
Klusken's CToFB3 program onFitCurves.c, and -wow-, what an improvement  
he has made in that thing!  Almost miracle science. :)


>> Say you are using points 0-17 for this curve fit attempt and you  
>> split at 9...you make the 2 recursive calls like so... yet say you  
>> find that you have to split those again at 5 now you have 2 more  
>> calls... for the split of 0-5 and 5-9...does the thing remember to  
>> get back to 9-17! That's my wonderment.
>>
>> <Snip>
>
> Below is a recursive Bezier curve fitting routine which I converted  
> from 'C'. It may help you in your recursive function investigation.
>
> Dick
>

Interesting, thank you.

Robert