Dimple
Make the local shape of a closed curve react to a nearby point.
Define a circle\index{circle} and two
points\index{point} on the circle. Call one
of these points the reference and the other the interactor.
Draw a radius of the circle from the reference point to the
circle's centre. Place the result, a parametric point on
this line, that moves toward the center if the interactor
gets *too close* to it. The trick is to use a
condition that sets the parameter of the result point to
some value (here $0.4$) if the
distance between the interactor and the reference (which is
measured by the modular distance between their parameters)
becomes less than a value $d$
(explained later), otherwise sets it to another value (here
$0.2$). This distance condition can
be defined as follows:
function modular01Distance (double t0, double t1)
{
object result = t0-t1;
return
result > 0.5 ?
1 - result :
result >= 0 ?
result :
result > -0.5 ?
Abs(result) :
result + 1.0;
}

The parameter $d$ here can be a number less than or equal
to $0.5$ and greater than or equal to half of the
distance between each two references. The latter condition is needed so that the
test is always true for at least one point. With $count$ reference objects equally distributed by
parametric distance, a minimal value for $d$ is $d\; =\; 1\; /\; (2\; *\; \backslash afVar\{count\})$.
After replicating the reference, create a closed curve\index{curve}
interpolating the result points. This curve will look like a
circle deformed by the interactor.
\begin{bodyNote}
\pbOneCol
{\input{\GCFigsPath/Patterns/ReactorDimpleExplain0.tex}}
\end{bodyNote}
Click to download ReacCircle.gct