Tag Info

New answers tagged

3

You could just make a function which decides your end colour: colour1[n_] := With[{end = {x[s], y[s], z[s]} /. First@CourbeMagnetique[n] /. s :> Smin[n]}, If[Norm@end < 1, RGBColor[0, 0, 1], RGBColor[1, 1, 1]]] colour3[n_] := With[{end = {x[s], y[s], z[s]} /. First@CourbeMagnetique[n] /. s :> Smax[n]}, If[Norm@end < 1, RGBColor[1, 0, ...


1

Is ColorFunction what you want? (The input is automatically rescaled from 0 to 1, so Rescale is unnecessary; see also ColorFunctionScaling.) GrapheMagnetique[n_] := ParametricPlot3D[ Evaluate[{x[s], y[s], z[s]} /. CourbeMagnetique[n]], {s, Smin[n], Smax[n]}, PlotStyle -> {Directive[AbsoluteThickness[1]](*,Blue*)}, ColorFunction -> ...


4

The arguments for ColorFunction in ParametricPlot3D are (from the docs): ParametricPlot3D x, y, z, u or x, y, z, u, v so you need #4, which is t. As for the ColorFunctionScaling, I suggest you to read the docs and experiment a little. But just as a hint, you may eliminate both the ColorFunction -> False option AND the Rescale thing in your ...



Top 50 recent answers are included