11

I would like to draw an arrow (ray of light) overlayed with perpendicular double headed arrows and circles (to show both s & p polarisation), but I am struggling with decoration commands. I have included what I have so far, can you help me get further?

What I currently have:

What I currently have

(Nasty mockup of) what I would like:

what I would like

\documentclass{article}
\usepackage{tikz, pgfplots}
\usetikzlibrary{shapes,arrows,positioning,decorations.markings}

\begin{document}
\begin{tikzpicture}[scale=0.7]

    \draw [red, line width=1mm, <-]  (0,0) -- (150:5.2)
        [postaction={decorate,decoration={markings,
        mark=between positions 0.2 and 0.9 step 0.2 with {\arrow[red, line width=1mm]{|};}
        }}]
        [postaction={decorate,decoration={markings,
        mark=between positions 0.3 and 0.9 step 0.2 with {\circle{8};}
        }}]
        ;       

\end{tikzpicture}
\end{document}
16

The markings have a local coordinate system with x direction along the tangent and y direction along the normal so you can draw things using that coord system.

\documentclass[tikz]{standalone}

\usetikzlibrary{shapes,arrows,positioning,decorations.markings}

\begin{document}
\begin{tikzpicture}[scale=0.7]
    \draw [red, line width=1mm, <-, 
        postaction={decorate,decoration={markings,
        mark=between positions 0.2 and 0.9 step 0.2 with {\draw [<->,red,thin] (0,-2mm) -- (0,2mm);}
        }}
        ,postaction={decorate,decoration={markings,
        mark=between positions 0.3 and 0.9 step 0.2 with {\draw[thin,blue] circle (3pt);}
        }}]
         (0,0) -- (150:5.2);       

\end{tikzpicture}
\end{document}

enter image description here

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.