1
$\begingroup$

So, I got this assignment I'm working on and one of the questions sounds like this:

What do we mean by 1. and 2. order difference and what can this be used for when making lines and shapes?

I think I understand the question, but not really sure how to answer it. For instance, I know that algorithms for displaying straight lines are based on the Cartesian slope-intercept equation:

y = mx + b

..and so fourth.

Could that be a part of the answer?

1 Answers 1

1

I'll take your word for the fact that you understand the definitions of first- and second-order differences. The key result for "making lines and shapes" is that if you have a sequence $\langle y_0, y_1, y_2, \dots, y_n\rangle$ where the sequence of first-order differences is constant, say $\langle m, m,\dots, m\rangle$, then this tells you almost all you need to know to establish that $y_k = mk + b$ for some suitable value of $b$. In short your intuition was pointing you in the right direction.

It gets even better, though. Suppose that for a sequence $\langle y_0, y_1, y_2, \dots, y_n\rangle$ the sequences of first-order differences wasn't constant, but the sequence of second-order differences was. You should (with a bit of algebra) be able to say what form $y_k$ is in that case, as well. The graph will no longer be a straight line, but it will turn out to have a shape that I'm sure you've seen many times.

Since you're asking here, I presume you're allowed to consult online sources. As often happens, Wikipedia is a good place to start.