Clear[NegativePedalPlot]
NegativePedalPlot::usage =
"NegativePedalPlot[{xf,yf}, {min,max,step}, {x0,y0}]
draws the negative pedal lines of the parametric curve
{xf,yf} at points
{xf,yf}& /@ Range[min,max,step].
xf and yf must be pure functions with head Function.
This is a quick hack function written for experienced
Mathematica users.
Example:
NegativePedalPlot[{Cos@#&, Sin@#&}, {0,2 Pi, 2 Pi/30},{.8,0}]";
NegativePedalPlot[{xf_Function,yf_Function},
{tmin_,tmax_, dt_}, {a_,b_}, opts___Rule]:=
Module[{curvePoints, curvePointsGP,pedalPointGP,
linesToCurveGP, negativePedalLinesGP},
curvePoints = N@ {xf@ #,yf@ #}& /@ Range[tmin,tmax,dt];
curvePointsGP = {Hue[0],PointSize[.02], Point[#]}& /@ curvePoints;
pedalPointGP = {Hue[.7], PointSize[.02], Point[{a,b}]};
linesToCurveGP = N@ Line[{{a,b},#}]& /@ curvePoints;
negativePedalLinesGP = Line[{
100 Reverse[Normalize[N[#-{a,b}]]{1,-1}] +#,
-100 Reverse[Normalize[N[#-{a,b}]]{1,-1}] +#
}]& /@ curvePoints;
Show[
Graphics[{negativePedalLinesGP,
curvePointsGP, pedalPointGP}],
opts
]
]
(* HHHH------------------------------ *)NegativePedalPlot[
{ Function[{x}, x], Function[{x}, x^2/4 ] },
{-7, 7, .25},
{0, 1},
Axes -> True, AspectRatio -> Automatic,
PlotRange -> {{-7, 7}, {-1, 18}}]
xah talk show 2025-03-23 2c3f0
xah talk show 2025-03-23 2ccd1
xah talk show 2025-03-23 2ccf3
xah talk show 2025-03-23 2d383
xah talk show 2025-03-23 2ec3a