Edit and compile if you like:

% File name: directional-angles.tex
% Description: 
% The directional angles of a vector are geometrically represented.
% Date of creation: August, 29th, 2021.
% Date of last modification: October, 9th, 2022.
% Author: Efraín Soto Apolinar.
% Source: page 36 of the 
% Glosario Ilustrado de Matem\'aticas Escolares.
% Terms of use:
% According to
% Your commitment to the terms of use is greatly appreciated.
	% Components of the vector field
	\tikzmath{function equis(\x,\y) {return (\y*\y-0.25*\x);};}
	\tikzmath{function ye(\x,\y) {return \x*\x-\y;};}
	\tikzmath{function zeta(\x,\y) {return \x+\y;};}	
	\tikzmath{function magnitud(\x,\y) {return sqrt(\x*\x+\y*\y);};} % magnitude of the vector at (x, y, z)	
	\pgfmathsetmacro{\dominio}{3.0}	% domain for computation 
	\pgfmathsetmacro{\step}{\dominio/10.0} % step size
	% length of coordinate axis
	% Coordinate axis
	\draw[thick,->] (\xi-0.25,0) -- (\xf+0.5,0) node[right] {$x$}; % Eje x
	\draw[thick] (0,\yi-0.25,0) -- (0,\yf+0.5) node[above] {$y$}; % Eje y
	\draw[help lines] (\xi,\yi) grid (\xf,\yf);
	\foreach \x in {-1,1}
		\draw[thick] (\x,2pt) -- (\x,-2pt) node [below] {$\x$};
	\foreach \y in {-1,1}
		\draw[thick] (2pt,\y) -- (-2pt,\y) node [below] {$\y$};
	% The vector field
	\foreach \x in {\xi,\xs,...,\xf}{
		\foreach \y in {\yi,\ys,...,\yf}{
			% Components of the vector at (\x,\y)
			\draw[red,thick,->] (\x,\y) -- (\x+\vx,\y+\vy);
	\node[red,above,shift={(-1,5pt)}] at (\xf,\yf) {$\vec{F}(x,y) = M\,\hat{\imath} + N\,\hat{\jmath}$};

Click to download: vector-field.texvector-field.pdf
Open in Overleaf:
See more on the author page of Efraín Soto Apolinar.

Leave a Reply

Your email address will not be published.