xah talk show 2025-03-26 Wolfram language graphics 1e2f0
graphics program the negative pedal
xah talk show 2025-03-26 Wolfram language graphics 20945
(*
give a curve, parabola, by the formula
{x, x^2}
given a point O, lets say {1,1},
this is called the pedal point.
now, we want to draw a line L,
passing a point P on parabola,
and is perpendicular to the line OP.
and we want to do this for many points P on the curve.
*)(* draw points on parabola *)
parabolaPoints = Table[{x, x^2} , {x, -1, 1, 0.1}]
dots = Map[ Point , parabolaPoints]
Graphics[ { Red , dots}, Axes -> True ]
(* HHHH------------------------------ *)(* draw a line L, that is perpendicular to line OP *)
pedalpoint = {1,1};
curvePoint = {2,4};
(* line OP *)
lineOP = { pedalpoint, curvePoint};
(* a line, passing P, and perpendicular to line OP *)
vectorOP = Normalize[ curvePoint - pedalpoint ];
vectorPedalLine = Reverse[ vectorOP ] * {1,-1};
xgraphics = Graphics[
{
PointSize[ 0.05 ],
{ Blue, Point[ pedalpoint ]},
{ Red, Point[ curvePoint ]},
{ Pink, Line[ { pedalpoint , curvePoint} ]},
{ Black, InfiniteLine[ {curvePoint, (vectorPedalLine + curvePoint) } ]}
},
Axes -> True,
PlotRange -> {{-1,1} 9, {-1,1} 9}
]
(* to find a vector that is perpendicular to vector {a,b},
is {b, -a}
*)Clear[ aa, bb ]
aa = 2;
bb = 3;
vec1 = {aa,bb}
vec2 = {bb, -aa}
Graphics[ {
{ Red , Line[ {{0,0} , vec1} ]},
{ Blue , Line[ {{0,0} , vec2} ]}
}, Axes -> True
]