3

I am going through one of the most basic line drawing algorithms and stuck with the following mathematical explanations. The implicit function of line equation is:

f(x,y) = ax + by + c

The Book(Computer Graphics , Principles and practice) mentions that

f(x,y) = 0 , when any point m is on line
f(x,y) < 0, when any point m is above the line, and 
f(x,y) > 0, when any point m is below the line.

It would be great to have some explanation of the claim above. I tried to figure out the first one with the following example:

3x + 2y = 1
=> 3x + 2y -1 = 0, where a = 3, b = 2 and c = -1

All I figure out that I need to plug in a (x,y) coordinate so that 3x + 2y - 1 = 0. I am not sure how to choose this coordinate value .

And I am clueless about the next two cases. An example demonstrating all the three cases would be fantastic !

Thanks

sajis997
  • 1,279
  • 1
  • 10
  • 15
  • 1
    I am unsure what you are asking here. What you posted as quote from the book is just the definition of a line, your title sounds unrelated. Are you asking how to find point on a line of which you have an implicit form like the one you posted? – cifz May 30 '16 at 21:59
  • The midpoint algorithm uses the implicit equation of the line and I am looking forward to some proofs of the three cases mentioned in my initial post. – sajis997 May 30 '16 at 23:51
  • This question should be on Math StackExchange. –  May 31 '16 at 04:51

1 Answers1

1

enter image description here

(I know i marked the coordinates of the second point wrong)

Let $ax + by + c$ be any line such that $b > 0$.

Now pick point $(\alpha,\beta)$ on the line.

Thus $\alpha *a + \beta*b + c = 0$

Now pick a point $(\alpha, \gamma)$ such that $\gamma$ > $\beta$

Thus $\alpha * a + \gamma * b + c$ > 0

Thus any point satisfying $ax+by +c$ > 0 line above the line.

your results can be deduced from the converse of the proof.