VB6  interpolating  for a curve

Posted on 2011-10-14
Last Modified: 2012-05-12
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

Question by:marcwolf
    LVL 14

    Expert Comment

    Are you asking how to Draw the new points using code or how to output a list of the radii that are missing ?
    LVL 80

    Accepted Solution

    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.
    LVL 1

    Author Closing Comment

    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
    LVL 80

    Expert Comment

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now