I have searched aimlessly for a prototype of my work but to no avail. Please, I would need help in plotting this. Can anyone please, help me out? Thanks.
Remark: There would be a thick line between M and M1, denoted by \Delta s.
I have searched aimlessly for a prototype of my work but to no avail. Please, I would need help in plotting this. Can anyone please, help me out? Thanks.
Remark: There would be a thick line between M and M1, denoted by \Delta s.
The tangents come from this answer and the thick stretch is achieved via dash pattern.
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.markings,calc,angles,quotes,bending}
\begin{document}
\begin{tikzpicture}[tangent/.style={% from https://tex.stackexchange.com/a/25940/121799
decoration={
markings,% switch on markings
mark=
at position #1
with
{
\coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
\coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
\coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
}
},
postaction=decorate
},
use tangent/.style={
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
},
use tangent/.default=1,declare function={t1=0.34;t2=0.5;}]
\draw[stealth-stealth] (0,6) node[left]{$y$} |- (6,0) coordinate(X) node[below]{$x$};
\draw [preaction={decorate,decoration={markings,mark=at position 0 with
{\pgfmathsetmacro{\myoff}{t1*\pgfdecoratedpathlength}
\pgfmathsetmacro{\myon}{(t2-t1)*\pgfdecoratedpathlength}
\xdef\myoff{\myoff}\xdef\myon{\myon}}}},
tangent=t1,
tangent=t2,
postaction={draw,very thick,dash pattern=on 0pt off \myoff pt on \myon pt
off 3cm}] (2,t2)
to [out=70,in=-190] node[pos=t1,below right] {$M$}
node[pos=t2,below right] {$M_1$}(6,4);
\path [use tangent] (-3,0) coordinate (t11) -- (3,0) coordinate (t12);
\path [use tangent=2] (-3,0) coordinate (t21) -- (3,0) coordinate (t22);
\path (intersection cs:first line={(0,0)--(6,0)},second line={(t11)--(t12)})
coordinate (i1)
(intersection cs:first line={(0,0)--(6,0)},second line={(t21)--(t22)})
coordinate (i2)
(intersection cs:first line={(t11)--(t12)},second line={(t21)--(t22)})
coordinate (i3);
\draw[thin,blue] (i1) -- (t12);
\draw[thin,red] (i2) -- (t22);
\draw[>=latex] let \p1=($(t12)-(t11)$),\p2=($(t22)-(t21)$),
\n1={(atan2(\y1,\x1)+atan2(\y2,\x2))/2} in
pic["$\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i2--t22}
pic["$\alpha+\Delta\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i1--t12}
pic["$\Delta\alpha$" {anchor=east,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=i2--i3--i1}
pic["$\Delta\alpha$" {anchor=west,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=t22--i3--t12};
\end{tikzpicture}
\end{document}
Of course, the tangent positions t1 and t2 can be adjusted at will.
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.markings,calc,angles,quotes,bending}
\tikzset{tangent/.style={% from https://tex.stackexchange.com/a/25940/121799
decoration={
markings,% switch on markings
mark=
at position #1
with
{
\coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
\coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
\coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
}
},
postaction=decorate
},
use tangent/.style={
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
},
use tangent/.default=1}
\begin{document}
\foreach \X in {0.48,0.49,...,0.56,0.55,0.54,...,0.49}
{\begin{tikzpicture}[declare function={t1=0.34;t2=\X;}]
\draw[stealth-stealth] (0,6) node[left]{$y$} |- (6,0) coordinate(X) node[below]{$x$};
\draw [preaction={decorate,decoration={markings,mark=at position 0 with
{\pgfmathsetmacro{\myoff}{t1*\pgfdecoratedpathlength}
\pgfmathsetmacro{\myon}{(t2-t1)*\pgfdecoratedpathlength}
\xdef\myoff{\myoff}\xdef\myon{\myon}}}},
tangent=t1,
tangent=t2,
postaction={draw,very thick,dash pattern=on 0pt off \myoff pt on \myon pt
off 3cm}] (2,t2)
to [out=70,in=-190] node[pos=t1,below right] {$M$}
node[pos=t2,below right] {$M_1$}(6,4);
\path [use tangent] (-3,0) coordinate (t11) -- (3,0) coordinate (t12);
\path [use tangent=2] (-3,0) coordinate (t21) -- (3,0) coordinate (t22);
\path (intersection cs:first line={(0,0)--(6,0)},second line={(t11)--(t12)})
coordinate (i1)
(intersection cs:first line={(0,0)--(6,0)},second line={(t21)--(t22)})
coordinate (i2)
(intersection cs:first line={(t11)--(t12)},second line={(t21)--(t22)})
coordinate (i3);
\draw[thin,blue] (i1) -- (t12);
\draw[thin,red] (i2) -- (t22);
\draw[>=latex] let \p1=($(t12)-(t11)$),\p2=($(t22)-(t21)$),
\n1={(atan2(\y1,\x1)+atan2(\y2,\x2))/2} in
pic["$\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i2--t22}
pic["$\alpha+\Delta\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i1--t12}
pic["$\Delta\alpha$" {anchor=east,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=i2--i3--i1}
pic["$\Delta\alpha$" {anchor=west,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=t22--i3--t12};
\end{tikzpicture}}
\end{document}
You can embed this in any LaTeX document.
\documentclass[11pt,article]{elsarticle}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,calc,angles,quotes,bending}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[tangent/.style={% from https://tex.stackexchange.com/a/25940/121799
decoration={
markings,% switch on markings
mark=
at position #1
with
{
\coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
\coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
\coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
}
},
postaction=decorate
},
use tangent/.style={
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
},
use tangent/.default=1,declare function={t1=0.34;t2=0.5;}]
\draw[stealth-stealth] (0,6) node[left]{$y$} |- (6,0) coordinate(X) node[below]{$x$};
\draw [preaction={decorate,decoration={markings,mark=at position 0 with
{\pgfmathsetmacro{\myoff}{t1*\pgfdecoratedpathlength}
\pgfmathsetmacro{\myon}{(t2-t1)*\pgfdecoratedpathlength}
\xdef\myoff{\myoff}\xdef\myon{\myon}}}},
tangent=t1,
tangent=t2,
postaction={draw,very thick,dash pattern=on 0pt off \myoff pt on \myon pt
off 3cm}] (2,t2)
to [out=70,in=-190] node[pos=t1,below right] {$M$}
node[pos=t2,below right] {$M_1$}(6,4);
\path [use tangent] (-3,0) coordinate (t11) -- (3,0) coordinate (t12);
\path [use tangent=2] (-3,0) coordinate (t21) -- (3,0) coordinate (t22);
\path (intersection cs:first line={(0,0)--(6,0)},second line={(t11)--(t12)})
coordinate (i1)
(intersection cs:first line={(0,0)--(6,0)},second line={(t21)--(t22)})
coordinate (i2)
(intersection cs:first line={(t11)--(t12)},second line={(t21)--(t22)})
coordinate (i3);
\draw[thin,blue] (i1) -- (t12);
\draw[thin,red] (i2) -- (t22);
\draw[>=latex] let \p1=($(t12)-(t11)$),\p2=($(t22)-(t21)$),
\n1={(atan2(\y1,\x1)+atan2(\y2,\x2))/2} in
pic["$\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i2--t22}
pic["$\alpha+\Delta\alpha$" anchor=west, draw,->, angle eccentricity=1,angle radius=4mm] {angle=X--i1--t12}
pic["$\Delta\alpha$" {anchor=east,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=i2--i3--i1}
pic["$\Delta\alpha$" {anchor=west,rotate=\n1}, draw,->, angle eccentricity=1,angle
radius=18mm] {angle=t22--i3--t12};
\end{tikzpicture}
\caption{Tangents and curvature from the change of slopes.}
\end{figure}
\end{document}
node[pos={(t1+t2)/2},below right] {$\Delta s$} before (6,4) (and after node[pos=t2,below right] {$M_1$}).
–
May 28 '19 at 15:45
convert -density 300 -delay 24 -loop 0 -alpha remove <file.pdf> <file.gif>.
–
May 28 '19 at 18:00