Here's an applet that builds on @Shenghui Yang's example. It finds all the tangents with a given slope. I also used an exact solver instead of a numerical one, for variety's sake. I'm quite familiar with Wolfram Language, and I apologize if some of the functions I used are a little further along your personal learning curve for WL.
f[x_, y_] := x^2 + x*Sin[4*y] + 3 y^2 - 7 + Cos[3*x];
(* there are powerful algorithms for solving transcendental equations
over bounded domains, so we'll help Solve[] out with the following *)
boundsArray = RegionBounds[ImplicitRegion[f[x, y] == 0, {x, y}]];
boundsArray = boundsArray /. x_Real :> Sign[x] Ceiling[Abs[x] + 0.01, 1/128]; (* pad bounds a bit *)
boundsIneqs = Replace[boundsArray,
{{x1_, x2_}, {y1_, y2_}} :> x1 < x < x2 && y1 < y < y2];
(* pre-compute plot to speed up Manipulate[] *)
curvePlot = Replace[boundsArray,
{{x1_, x2_}, {y1_, y2_}} :> ContourPlot[f[x, y] == 0, {x, x1, x2}, {y, y1, y2}]];
(* Find all tangents of a given slope *)
Manipulate[
With[{sols = Solve[(* Solve or NSolve *)
{f[x, y] == 0, slope == ImplicitD[f[x, y] == 0, y, x],
boundsIneqs},
{x, y}]},
Show[curvePlot,
Graphics[{
Replace[sols, sol_ :> InfiniteLine[{x, y} /. sol, {1, slope}], 1]
}],
PlotRange -> Max@Abs@boundsArray
]
],
{{slope, 0}, -5, 5, 1/128}]