# VB6 interpolating for a curve

Hi Folks.
Ok -  I have a machine that can trace around a polygram and produce 400 points from it. These points are represented  as a radius for each 1.11 degree round the circle.

I have another machine that requires the information presented as 1000 points or every 0.36 of a degree. Likewise the value will be the radius.

So.. What I need to do is to tkae the original 400 points and expand them out to 1000 points by (insert proces X here)  and generating the values of the missing radius's

Sorry - I don;t know much maths so I am stuck both on what the progress is called when one generates additional points on a existing curve,  and also what the formule is.

Many thanks for any help
Dave

LVL 1
###### Who is Participating?

Commented:
You might consider using a cubic spline interpolation of the missing points. Here is an Excel workbook that does the cubic spline interpolation using a VBA function. Porting to VB6 should be simple.
Numerical-Methods.xls
0

Application Development ManagerCommented:
Are you asking how to Draw the new points using code or how to output a list of the radii that are missing ?
0

Author Commented:
Hi Byundt
Many thanks for that. I think I can work it to fit my needs.
If I first create an array of 400 x 2, with the first field being the degree's and the second being the known radius.
Then create a second array of 1000 x 2, with the first field being the degree's and the seond populated with the none points taken from the first array.
Then all I should need to do is to feed in the midding value's degree;'s and I wil have it.

Many many thanks
Dave
0

Commented:
Dave,
You shouldn't need to populate the second array with the known points. The interpolation routine ought to return those values to you automatically.