If anyone would know this code in latex, please share with me, that would be helpful.
Asked
Active
Viewed 71 times
-2
Black Mild
- 17,569
Sandro
- 7
-
3Welcome to TeX.SX! Do you have some code to start with? What did you try so far? You may want to have a look around this site for similar drawings which you can use as a starting point. It is always better on this site to ask for concrete problems you have with your code rather than for the full code for some specific output. – Jasper Habicht Oct 19 '22 at 20:59
-
3This does not show any of your effort. In fact, there is a math underlying the figure: normal vectors of a cyclic path. Please have a look here https://tex.stackexchange.com/questions/25928/how-to-draw-tangent-line-of-an-arbitrary-point-on-a-path-in-tikz/514500#514500 and https://tex.stackexchange.com/questions/159465/arrows-tangent-and-normal-on-a-smooth-cycle-with-tikz – Black Mild Oct 19 '22 at 21:01
-
Please choose a title which will help future users with the same problem to find it. "get this shape" is not a very specific title and unlikely to help anybody. – samcarter_is_at_topanswers.xyz Oct 19 '22 at 21:02
-
Apart from the unspecific title, it is actually unclear to me which shape exactly you want to reproduce. The one on the right side? – Jasper Habicht Oct 19 '22 at 21:08
-
1I edited a descriptive title, added a tag, and provided a possible answer ^^ Hope this help! – Black Mild Oct 19 '22 at 21:54
1 Answers
1
For inward normal vectors, Asymptote seems to be a good way to go. From a user-chosen set of points, we make a cyclic path; then with a user-chosen times along that path, and finally draw their inward normal vectors.
% https://www.overleaf.com/read/fxbmsmmdfthx
\documentclass{article}
\usepackage{asymptote}
\title{Inward normal vectors}
\begin{document}
\begin{asy}
// can Run on http://asymptote.ualberta.ca/
unitsize(2cm);
pair[] P={(0,0),(-1,1),(-.5,1.75),(0,1.5),(2.5,1.75),(2,0),(1,.25),(1.5,-2),(0,-2.25),(-.5,-2)};
guide g=operator..(...P)..cycle;
filldraw(g,cyan+opacity(.3),deepcyan+1pt);
label("$\theta\equiv 0$",(1.8,1));
real[] times=new real[] {.2,2.7,3.3,4,4.5,5.3,6,6.4,7.5,8.6,9.5};
for (real t : times) {
pair M=point(g,t);
pair Mt=.4*dir(g,t);
pair Mn=rotate(-90)*Mt;
draw("$\vec{n}$",M--M+Mn,Arrow);
}
\end{asy}
\end{document}
Black Mild
- 17,569

