What I want:

where the yellow line is the path to be transformed. The points inside the yelow line are the nodes after processing.
The only way I found to do this is the intersection between a path and itself. But it is an expensive solution in terms of processing and time. The code to generate the above image is here:
\documentclass[tikz]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\clip (-2.1, -1.1) rectangle (2.1, 1.1);
\draw [yellow, ultra thick, name path = curve 1] (-2,-1) .. controls (8,-1) and (-8,1) .. (2,1);
\path [name intersections = {%
of = curve 1 and curve 1
, name = i
, total=\t
, sort by = curve 1
}] node {\xdef\totalone{\t}};
\foreach \k in {1, ..., \totalone}
{
\node [
circle
, fill
, inner sep = 0.25pt
, minimum size = 0pt
] at (i-\k) {};
}
\end{tikzpicture}
\end{document}
Someone suggests another way of doing this?


\draw [dotteddecoration = black, yellow, ultra thick][postaction={draw,black,thin}] (-2,-1) .. controls (8,-1) and (-8,1) .. (2,1);I am not quite sure, I know what your “big” goal is. – Qrrbrbirlbel Oct 05 '12 at 06:42