I have been trying to reproduce the following example
\documentclass[tikz,margin=3pt]{standalone} \usepackage{tikz,pgfplots} \usetikzlibrary{pgfplots.polar,intersections} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{polaraxis}[samples=50,smooth,thick,axis lines=none] \begin{scope} % Everything inside this scope is clipped % frame \path[clip,draw] plot[domain=44.9:135] (axis cs: \x, {(4/sin(\x))/(1+0.01*(4/sin(\x))^2)}) --plot[domain=135:225] (axis cs: \x, {(-4/cos(\x))/(1+0.01*(-4/cos(\x))^2)}) --plot[domain=225:315] (axis cs: \x, {(-4/sin(\x))/(1+0.01*(-4/sin(\x))^2)}) --plot[domain=-45:45] (axis cs: \x, {(4/cos(\x))/(1+0.01*(4/cos(\x))^2)}) --cycle; % Clipped plot: \addplot[dotted,domain=30:150]{(3/sin(x))/(1+0.01*(3/sin(x))^2)}; \end{scope} % Scope ended, so this is not clipped: \addplot[red,dotted,domain=20:160]{(2/sin(x))/(1+0.01*(2/sin(x))^2)}; \end{polaraxis} \end{tikzpicture} \end{document} from this answer. Unfortunately, the region I want to create involves functions that can't be properly plotted using tikz's plotting capability. I can plot them using pgfplots' \addplot, but I have no idea how to extract a path and join them to other points and paths. My overall aim is to plot a contour filled region (also from pgfplot). I would appreciate any direction or help.
Edit: I want to connect the point (-0.66,2) to the path
\addplot[domain=-0.66:0, clip = true] {-2*x*(x^2 + sqrt(1+ x^4))}; this path to
\addplot[domain=0:2] {2*x*(-x^2 + sqrt(1+ x^4))}; then, this path to (2,2) and cycle to (-0.66,2) and then use this region within a scope to clip a contour filled.

\addplotconstruct if this is the only way you get it working.