How do I equidistantly discretize a continuous function? Let's say I have a piecewise function that's continuous in an interval [1,7]:
$f(x) = \left\{
     \begin{array}{lr}
       -5x + 6 & : x \in [1,2)\\
       -4x + 14 & : x \in [2,3)\\
       -0.25x + 2.75 & : x \in [3,7]
     \end{array}
   \right.$



*

*How would I get a discretization of that function that consists of 10 equidistant points? [I'm interested in method(s), not calculations for that example.]

*More generally, how would I discretize functions with any number of parameters to get n equidistant points (e.g., to represent the surface of a sphere with 100 equidistant points)?
 A: You can just guess what the stepsize will be and "swing a compass" from the starting point to find the next, "swing the compass" again, and see whether you end at the end.  It is a one-dimensional root find to get the distance.  If any of your segments are too vertical, there may be more than one point of intersection, which you will have to deal with.  The function $(\text{end }x)=f($step size$)$ may be discontinuous as the points move across the corners in your input function, so it may not work, but I would try bisection.
A: In one dimension, you could try to parametrize the curve $C(t)=\{x(t),y(t)\}$ in such a way that the "velocity" is constant, and then quantize the paramenter $t$ - that is feasible, but that would lead you to equidistant points along the curve, and that's not apparently what you are after.
Elsewhere, the problems seems awkard, only tractable by some iterative algorithm.
In more dimensions, it's worse, it even becomes bad defined:  what would "n equidistant points" mean?
There are many iterative algorithms, some related to vector quantization or clustering, some inspired by physical systems. For example, you could throw N random initial points over your domain, and move them according to some "energy" function, that increases at short distances: in that way, the points would try to go as far as the others as they can, and that "low energy" configuraton would correspond -more or less, conceptually- to the "equidistant points" you are envisioning.
If you, additionally, want to impose some organization/ordering/topology to the points (for example, in 2D you could want them to conform some distorted mesh, with each points having four -north-east-south-west 'neighbours') then you should take a look at Self Organizing Maps (Kohonen).
