2

I need to get a plot with a trajectory of particle through system of magnets.

So I know the coordinate and angle of particle on the edge of each magnet (like y=0,5 alpha=0.3rad) so how can I draw a smooth trajectory line (like Bezier curve)? Here is an actual system:

3
  • 1
    Yes you can. But can you sketch what you want? – percusse Sep 3 '15 at 8:15
  • Just added ( there is x on upper half, and y on lower) – RomanSun Sep 3 '15 at 8:25
  • The simplest way to make a line plot look smooth in pgfplots is with \addplot+[smooth] coordinates {...}; – Davislor Sep 3 '15 at 8:41
1

I wrote some examples of plotting paramaterized paths in pgfplots yesterday: Drawing Functions on Spheres. If you have a closed-form parametric solution, you should be able to plot it and the magnets the same way. You might want to look at quiver plots for the field lines.

If you’re saying you want to calculate a Bezier curve from control points and plot that, Matlab and Octave can solve that and export the plot in TikZ format (I give an example of exporting from those programs at the link above). If you want to try something like that in pgfplots, the example on page 352 of the pgfplots manual might be helpful.

(On second look, your illustration shows I’m overcomplicating things.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.