0

How to draw the convex hull of a circle and a line in a grid. The picture is attached. enter image description here

6-0
  • 217
  • What exactly is the problem? The shading? – campa Nov 25 '23 at 17:17
  • @campa No. Shading is not that important. I do not know how to bring the graph into grid lines. Also, I do not know how to use convex hull for a circle and a line. I have just found some examples for convex hull when it is just points. – 6-0 Nov 25 '23 at 17:20

1 Answers1

2

The question is somewhat vague but here a starting point

\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture} \drawlightgray,step=.5grid(4.5,2.5); \draw->--(0,3); \draw->--(5,0); \draw(2,0)circle(1.5); \pgfmathsetmacro\x{180-acos(.25)}% cos(angle) = (radius)/(distance point-centre) = (1.5)/(2-(-4)) = .25 \draw(2,0)++(\x:1.5)--(-4,0) ; \draw(2,0)++(-\x:1.5)--(-4,0) ; \end{tikzpicture}

\end{document}

campa
  • 31,130