Osculating Circle


Edit and compile if you like:

% File name: truncated-cylinder.tex
% Description: 
% A geometric representation of a truncated cylinder is shown.
% Date of creation: September, 19th, 2021.
% Date of last modification: October, 9th, 2022.
% Author: Efraín Soto Apolinar.
% https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/
% Source: page 48 of the 
% Glosario Ilustrado de Matem\'aticas Escolares.
% https://tinyurl.com/5udm2ufy
% Terms of use:
% According to TikZ.net
% https://creativecommons.org/licenses/by-nc-sa/4.0/
% Your commitment to the terms of use is greatly appreciated.
	% Components of the vector function
	\tikzmath{function equis(\t) {return cos((\t) r);};}
	\tikzmath{function ye(\t) {return sin((\t) r);};}
	\tikzmath{function zeta(\t) {return 0.5+0.25*sqrt(\t);};}
	% Components of the derivative f the vector function
	\tikzmath{function dequis(\t) {return -sin((\t) r);};}
	\tikzmath{function dye(\t) {return cos((\t) r);};}
	\tikzmath{function dzeta(\t) {return 0.125/sqrt(\t);};}
	% Components of the normal vector (second derivative of $\vec{r}(t)$
	\tikzmath{function ddequis(\t) {return -cos((\t) r);};}
	\tikzmath{function ddye(\t) {return -sin((\t) r);};}
	\tikzmath{function ddzeta(\t) {return -0.0625/(\t)^(1.5);};}
	% Evaluate everything at the point \tcero
	\pgfmathsetmacro{\ti}{0.25} % initial value for the plot
	\pgfmathsetmacro{\tf}{2.0*pi} % final value for the plot
	\pgfmathsetmacro{\n}{100}	% number of points
	\pgfmathsetmacro{\r}{2.0}	% auxiliary distance 
	% Position of the node $\vec{r}(t)$
	% Components of the tangent vector to $\vec{r}(t)$ at $t = \tcero$
	% Components of the normal vector to $\vec{r}(t)$ at $t = \tcero$
	% Components of the unit tangent vector $\hat{T}$
	% Componentes of the unit normal vector $\hat{N}$
	% Compute the curvature
	%\pgfmathsetmacro{\k}{\Nmag/\Tmag} % Not needed
	% Radius of curvature
	% Coordinates of the center of the osculating circle
	% Negative part of the coordinate axis
	\draw[thick,->] (-1.25,0,0) -- (\r+0.5,0,0) node[below left] {$x$}; % $x$ axis
	\foreach \x in {-1,1}
		\draw[thick] (\x,0,0.05) -- (\x,0,-0.05) node [below] {$\x$};
	\draw[thick,->] (0,-1.25,0) -- (0,\r,0) node[right] {$y$}; % $y$ axis
	\foreach \y in {-1,1}
		\draw[thick] (0,\y,0.05) -- (0,\y,-0.05) node [below] {$\y$};
	\draw[thick] (0,0,-0.25) -- (0,0,1.0); % $z$ axis (first part)
	% Point P
	\fill[red] (\Px,\Py,\Pz) circle (1.5pt);
	% Tangent vector $\hat{T}$
	\draw[blue,thick,->,shift={(\Px,\Py,\Pz)}] (0,0,0) -- (\Tx,\Ty,\Tz) node[midway,sloped,above] {$\hat{T}$};	
	% Normal vector $\hat{N}$
	\draw[blue,thick,->,shift={(\Px,\Py,\Pz)}] (0,0,0) -- (\Nx,\Ny,\Nz) node[midway,sloped,below] {$\hat{N}$};	
	% Graph of the vector function $\vec{r(t)}$
	\draw[cyan,thick,->] plot[domain=\ti:\tf,smooth,variable=\t,samples=\n] ({\r*equis(\t)},{\r*ye(\t)},{\r*zeta(\t)});
	\node[cyan,above,->] at (\xf,\yf,\zf) {$\vec{r}(t)$};
	% Last part of the $z$ axis
	\draw[thick,->] (0,0,1.0) -- (0,0,\r+1.0) node[above] {$z$}; % Eje z
	\foreach \z/\posicion in {1/left}
		\draw[thick] (0,0.05,\z) -- (0,-0.05,\z) node [\posicion] {$\z$};
	% The osculating circle
		plot[domain=0:2*pi,smooth,variable=\t,samples=100] ({\rk*cos(\t r)},{\rk*sin(\t r)},{-\rk*\drz*sin(\t r)});

Click to download: osculating-circle.texosculating-circle.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.