Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!uudell!bigtex!natinst!rpp386!woody From: woody@rpp386.cactus.org (Woodrow Baker) Newsgroups: comp.lang.postscript Subject: Re: Splines Underli Summary: yup Message-ID: <17833@rpp386.cactus.org> Date: 1 Feb 90 05:17:53 GMT References: <7897@shlump.nac.dec.com> <17811@rpp386.cactus.org> <1990Jan31.213001.11641@intercon.com> Organization: River Parishes Programming, Plano, TX Lines: 33 In article <1990Jan31.213001.11641@intercon.com>, amanda@mermaid.intercon.com (Amanda Walker) writes: > In article <17811@rpp386.cactus.org>, woody@rpp386.cactus.org (Woodrow Baker) > writes: > > The little spline routine that was sent to me, was much appreciated. > > Now, a followup question. Given the resulting array of points, > > created by the subdivision of the spline, is is possible to reverse the > > proceedure, and work back to the original set of corrdinates. If so, > It should be possible, since four points will uniquely define a cubic > curve. It's been a while since I took Analytic Geometry :-), but you > should be able to take four points on the curve, spaced as equally as > possible to assure maximum accuracy, and write four equations in four > unknowns (one for each point, with the unknowns being the coefficients > of the cubic), which you can then solve using Gaussian elimination or I have been working on this problem for a while. I have arrived at using a Gauss-Jordan elimination. I still have not got it implemented. I recieved a snippet of 'C' code, that took 2 endpoints and 2 control points and by subdividing the spline recursively until an arbitrary tolerance limit was reached, resulted in an array of coordinates that when plotted draws the spline. My question concernes taking that array, and working it backward through the mirror of the subdivision, and coming to the original points. The subdivision code was implemented by shifting in order to divide by 2. Can a mirror function be readily created such that when passed the array of points, (always a multiple of 2 long), you can reconstruct the original 4 sets of points? I am not sure that a Gauss Jordan curve fitter would be the most effecient way to do this. Any ideas anyone? p PS, thanks for the post... Cheers Woody > > "Many of the truths we cling to depend greatly upon our own point of view." > --Obi-Wan Kenobi in "Return of the Jedi"