# Oscillating Colors in ParametricPlot

I am trying to draw some curves with colors oscillating between red and blue (as a function of arc length along the curve). To make things easier, I am using circle arcs so that the curves are easily parameterized by arc length. I want to compare multiple curves of the same family, and the family parameter is a, which is the distance from the x-axis to the center of the circle (which is at the point (0,-a)). I am only plotting the portion of the circle which lies above the x-axis.

Anyway, here is my code:

g[a_,t_]:={Sqrt[a^2+1]Cos[t],Sqrt[a^2+1]Sin[t]-a};

cf[a_,t_]:=Blend[{Blue,Red},(Sin[100t Sqrt[a^2+1] ]+1)/2];

curve[a_]:=ParametricPlot[
g[a,t],
{t,ArcCos[1/Sqrt[a^2+1]],Pi-ArcCos[1/Sqrt[a^2+1]]},
ColorFunction->Function[{x,y,t},cf[a,t]],
PlotStyle->Thickness[0.01],
ColorFunctionScaling->True,
ImageSize->1200,
Axes->False
];

Show[curve[1],curve[2],curve[3]]


And here is my output:

As you can see, the oscillating works OK for some values of a, but it looks terrible for others. I have tried some other curves as well, and there always seems to be some issue. Before, I thought it was because I wasn't parameterizing the curve by arc length, so Mathematica was sampling the points in the domain for the color function at strange times. But now these curves are parameterized by arc length, and so I have no idea what's going on.

By the way, I am using Wolfram Cloud for this. Any advice would be appreciated, thank you!

Edit: Here is the output with ColorFunctionScaling->False:

• Use ColorFunctionScaling -> False Jan 17 at 20:53
• I just updated the question with this option; it still looks bad but in a different way... Jan 17 at 21:19

I figured out a solution: I needed to set the Mesh option to be higher. In this case, Mesh->100 worked fine.
• After reading the documentation, it seems like Mesh is an option that is used for showing the mesh, rather than setting the mesh size. But I've got no idea how to set the mesh size properly now... Jan 17 at 22:28
• After doing even more experimenting, it seems like whether or not setting Mesh->100 actually shows the mesh or not is up to random chance. I've run the same code twice and gotten different results. I'm willing to conclude at this point that this is a bug, unless someone wants to correct me. Jan 17 at 22:34