Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 362983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:17:57+00:00 2026-05-12T13:17:57+00:00

I need to find good approximations of the points where an undefined function intersect

  • 0

I need to find good approximations of the points where an undefined function intersect a threshold value. I’m stepping through my space and whenever I find that two subsequent steps are on different sides of the threshold, I add a point somewhere in between:

ActualSituation

(source: ning.com)

My first approach was to just pick the mid-point, but this is obviously a terrible solution:

Midpoint

(source: ning.com)

I’m now using linear interpolation which gives a reasonable result, but the underlying function will practically never be linear. Thus, this only works well if my stepsize is small enough:

LinearInterpolation

(source: ning.com)

Sampling the base function can be quite expensive, but adding one or two additional samples in order to get a much better approximation is something I’d like to try. Is it possible to use Cubic interpolation here? Like so:

CubicInterpolation
(source: ning.com)

Or are there better ways?

Much obliged,
David Rutten

ps. I’m writing in C#, but this is a language agnostic problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:17:57+00:00Added an answer on May 12, 2026 at 1:17 pm

    Your last picture shows only three points, which only suffice to define a quadratic polynomial, not cubic. For cubic interpolation, you’ll need four points. A cubic polynomial can be fitted in different ways; here are two.

    The most straightforward way is to simply let the (unique) polynomial pass through all four points.

    Another way is to use tangents. Again, we need four points. Let the left two points define a slope. Have the polynomial pass through the second point (in general, it doesn’t pass through the first point), and match the computed slope in that point. And same on the right side for the fourth and third point.

    By the way, any higher-order polynomial is probably a bad idea, because they tend to become very unstable in the presence of even a little bit of input noise.

    If you give some more details about your problem domain, I might be able to give a more specific answer. For example, where do your data points come from, what kind of curve can you generally expect, and can you go back and sample more if required? I can provide equations and pseudo-code too, if needed.

    Update: silly me left a sentence referring to two ways without typing them out. Typed them out now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 183k
  • Answers 183k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This: \d{1,3}(,\d{3})*(\.\d\d)?|\.\d\d matches all of the following numbers: 1 12… May 12, 2026 at 4:37 pm
  • Editorial Team
    Editorial Team added an answer You'll have to use dynamic SQL for that, since ALTER… May 12, 2026 at 4:37 pm
  • Editorial Team
    Editorial Team added an answer You can specify height and width in settings to set… May 12, 2026 at 4:37 pm

Related Questions

(This is no homework and no work issue. It's just my personal interest/occupation and
I have an array of numbers that potentially have up to 8 decimal places
As someone who is fairly new to iPhone development, I've been trying to find
I'm using a database as a kind of cache - the purpose is to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.