1

Is every point of the graph evaluated numerically then graphed or are interpolations used?

I would really appreciate getting comments and answers to a question I have been asking myself for while and for which I couldn't find an answer.

user25406
  • 1,048
  • 1
  • 9
  • 16
  • 1
    For any continuous functions, then using say 200 or so tiny points on the graph would look identical to a graph. As far as graphing functions go on computers, you don't need interpolation at all. – Jamie Alizadeh Sep 23 '22 at 21:04
  • 1
    Are you asking about sketching a graph, or about how graphing software accomplishes the task? The latter is down to the programmer, but for general $f:\mathbb R\to \mathbb R$ the number of points would be uncountable so you can't plot every point in finite time. If a function is smooth enough plotting enough finite sized points will give the illusion of completeness. – Mark Bennet Sep 23 '22 at 21:05
  • @MarkBennet, I asked a general question about sketching a graph. I have no idea how the software does thing ( I can't code ). – user25406 Sep 23 '22 at 22:13

1 Answers1

1

When graphing a continuous function or curve that follows a particular formula you will need to use some form of interpolation to "fill in" the values between the ones you explicitly evaluate.

There are a number of ways to do this but two common ones are:

  1. Linear Interpolation -- fit a line segment between adjacent points.
  2. Splines -- generalizes interpolation to nonlinear interpolants (also called spline interpolation)

You can try these two out in Excel -- it uses both linear and "smooth" interpolations.

Annika
  • 6,873
  • 1
  • 9
  • 20
  • I am familiar with interpolations, splines...so I understand what they do and I suspected they were used. But I had no idea how many points will be considered to get a decent enough graph. – user25406 Sep 23 '22 at 22:17
  • 1
    @user25406 Since you understand splines you’ll appreciate that the number of knots needed depends on how “wiggly” the function is and the measure of “decent”. It’s partly subjective and context dependent so hard to address your question exactly. At a minimum I’d want a few more than the number ofof local extrema. – Annika Sep 23 '22 at 22:38