# How to write PostScript commands for "calculation" and "intersection" in the following problem?

This is my code.

\documentclass[pstricks]{standalone}
\usepackage{pst-intersect}
\usepackage{auto-pst-pdf}
\begin{document}
\multido{\ry=0.3+0.1}{13}{%
\begin{pspicture}[showgrid,algebraic](-5,-5)(5,5)
\psset{PointName=none,PointSymbol=none}
\def\a{1}
\def\xo{\ry}
\def\func{\a*x^2}
\def\derivative{\a*2*x}
\def\derivativexo{\pscalculate{\xo*\a*2}}
\def\yo{\pscalculate{\a*\xo^2}}
\pnodes(\xo,\yo){A}(5,0){B}(0,0){O}
\pssavepath[linestyle=none]{pathA}{\psplot{-2}{2}{\derivativexo*(x-\xo)+\yo}} %% y=f'(x0)(x-x0)+y0
\pssavepath[linestyle=none]{pathB}{\psline(0,0)(5,0)}
\psintersect[name=C]{pathA}{pathB}
\pstBissectBAC[linestyle=none]{B}{C1}{A}{A'}
\pstRotation[RotAngle=90]{A}{C1}[N]
\pstInterLL{A}{N}{C1}{A'}{E}
\pstProjection{O}{B}{E}[K]
\pscustom[fillstyle=solid,fillcolor=gray!50!orange,linestyle=none]{%
\psplot{\xo}{0}{\func}
\psline(0,0)(K)
\pstArcnOAB[linestyle=none]{E}{K}{A}
\closepath}
\psplot{-2}{2}{\func}
\psline{->}(-2,0)(4,0)
\psline{->}(0,-2)(0,4.25)
\rput(0.75,2.5){$y=ax^2$}
\end{pspicture}
}
\end{document}


Note: You can reproduce my code if you want to say several new things!

Given is the point P0(x0,y0) on the parabola. The slope is given by the derivation. The slope of the line P0-Mcircle is the negative inverse: -1/(2ax0).

\documentclass[pstricks]{standalone}
\usepackage{pstricks-add,xfp}% xfp is the same as pst-calculate
\usepackage{auto-pst-pdf}
\begin{document}
\def\a{1}
\def\func{\a*x^2}
\multido{\rx=0.3+0.1}{15}{%
\begin{pspicture}[showgrid,algebraic](-1,-1)(7.5,7.5)
\psplot{-1}{3}{\func}%
\pscustom[fillstyle=solid,fillcolor=gray!50!orange,linestyle=none,opacity=0.6]{%
\psline(0,0)
\psplot{0}{\rx}{\func}
}%
\psline{->}(-1,0)(7,0)
\psline{->}(0,-1)(0,7.25)
\rput(0.75,2.5){$y=ax^2$}
\end{pspicture}%
}
\end{document}


• Many thanks for your explanation and illustration ...
– user197952
Oct 5, 2019 at 16:11