Does there exist a differentiable function from $\mathbb R^3$ to $\mathbb R$ whose zeros are a line? Suppose we are given a line in $\mathbb R^3$.  Is there a differentiable function, $f$, from $\mathbb R^3$ to $\mathbb R$ such that the solutions to $f(\vec{x})=0$ are precisely the points on the line?
I would like to be able to describe a line using the zeros of a single function rather than using a parametrization.
EDIT: I deleted a false claim about not being able to use a polynomial.

Consider $f(x,y,z) = x^2 + y^2$. The solutions of $f(x,y,z)=0$ are the $z$ axis. Then just compose with an affine transformation that sends your line to the $z$ axis and you're done.
