<div dir="ltr"><div dir="ltr"><div><br></div><div>
<span class="gmail-tlid-translation gmail-translation" lang="en"><span title="">I would like to use some libraries du ipe to be able to draw simple functions.</span> <span title="" class="gmail-">in order to do this, you need to implement the TIKZ package with the calc library.</span><br><span title="" class="gmail-">Using Textstudio I can write this, getting a certain result (you can compile to verify).</span></span></div><div><b>\documentclass{article}<br>\usepackage{tikz}<br>\usetikzlibrary{calc}<br>\usetikzlibrary{backgrounds}<br><br>\begin{document}<br> \begin{tikzpicture}[scale=1.5,<br>velocity/.style= {thick,blue!15!black},<br>terr/.style= {thick,gray!60}]<br>]<br>\fill[terr] (-2,0) rectangle (3,-0.5);<br>\draw [thick, black,->] (-2,0)--(3,0) node[right, below] {$x$};<br>\draw [thick,black,->] (0,0)--(0,3.5) node[above, left] {$z$};<br>\draw [very thick,black] (-1.5,0)--(-1.5,2.7) node[above, above] {};<br>\fill[terr] (2.25,0) rectangle (2.15,3.5);<br>\draw [very thick,black] (2.15,0)--(2.15,3.5) node[above, above] {};<br><br>\draw[thick,velocity] plot[domain=0:15] ({ 0},{ (.2*\x)});<br>\foreach \i in {1,2,...,14}<br>{<br> \draw[velocity,-latex] ($(-1.5,0) + {.2*(\i-0.5)}*(0,1)$) --++ (1,0);<br>}<br><br>\draw[-] plot[domain=0:15] ({ 0},{ (0.2*\x)});<br>\foreach \i in {1,2,...,35}<br>{<br> \draw[rotate = 0,velocity,-] ($(2.15,0) + {.1*(\i-0.5)}*(0,1)$) --++ (0.1,0);<br>}<br></b></div><div><b><br></b></div><div><b>\draw[thick,velocity] plot[domain=0:15] ( {(2*(1-exp(-\x/2)))*cos(5) + (0.1*\x)*(sin(5))},<br> {-0*tan(5) + (-2*(1-exp(-\x/2)))*sin(5) + (.2*\x)*cos(5)});<br>\foreach \i in {1,2,...,14}<br>{<br> \draw[velocity,-latex] (${-sin(5)*1*(\i-0.5)}*(0.01,0) + {cos(5)*.2*(\i-0.5)}*(0,1)$) --<br> ++ (${2.1*(1-exp(-(\i-0.5)/2))*cos(5)}*(1,0)$);<br>}<br>%%-----------Altro modo rettangolo<br>% \begin{scope}[on background layer]<br>% \path[fill=gray!60] plot[smooth,domain=0:4] (2.3,3.5) coordinate (1,1)-- (2.15,3.5)|- (2.3,0);<br>% \end{scope}<br>%%--------------------------------<br><br>% \node[] at (-1,2.9) {$U_\infty$};<br>% \node[draw=black,fill=white] at (1.1,2.1) {$\bar{u}$};<br>% %\node[] at (0.2,-0.15) {$0$};<br> \end{tikzpicture}<br>\end{document}</b><br><span class="gmail-tlid-translation gmail-translation" lang="en"></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-"><br></span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">When I implement this on IPE (using the ipelet tikz) I can't get the function to draw, because the calc library is essential.</span> <span title="">how should it be implemented in the preamble?</span> <span title="" class="gmail-">or in the sty file?</span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-"><br></span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">Thanks<br></span></span>
</div></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Mail priva di virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>                 </td>
        </tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>