Artificial intelligent assistant

failproof way of converting an implicit equation of a line to a parametric one I think I am overlooking the obvious but still, what am I overlooking? Suppose I have an line $ Ax +By + C = 0 $ And I want to rewrite it to: $ x = D(t) + E $ and $ y = F(t) + G $ With the snag that A or B (but not both) can be $0$, also other values can be zero ( so dividing by anything just not possible) I just failed to do it (without the snag it is easy) or is it just not possible?

You can convert the _standard form_ $Ax+By=C$ into _normal form_ by dividing both sides by $\sqrt {A^2+B^2}$. You can do this since not both $A$ and $B$ are zero. You then get

$$ax+by=r$$

where $a^2+b^2=1$. Then a point on the line, in fact the point that is closest to the origin, is $(ar, br)$. If you substitute this point into the normal form equation, you get

$$a \cdot ar + b \cdot br = (a^2+b^2) \cdot r = 1 \cdot r = r$$

So you can use these parametric equations, which have the advantage that changing $t$ by $1$ also changes the _distance_ of $(x,y)$ by $1$:

$$x(t) = ar + bt$$ $$y(t) = br - at$$

If you really want to use the original $A$, $B$, and $C$, and lose the distance property above, you could use

$$x(t) = {AC \over A^2+B^2} + Bt$$ $$y(t) = {BC \over A^2+B^2} - At$$

Note that $C$ in my equations is not exactly the same as your $C$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 87a6b9dc4f5de5e5e2daa05bd1c3c4dd