2
$\begingroup$

I have a curve and a circle on x,y axes. I want to plot points on the curve and on the circle based on the "a". The value of "a" should be {1/5,2/5,3/5,4/5} of the curve and the circle. Then, I want to connect those points on curve and the circle. I've been working on this for several days but still couldn't found the solution.

Quad1 = {{-1, 0}, {0, 1}, {1, 0}};(*Define 3 control points for the polygon*) Print[MatrixForm[Quad1]] q1 = Graphics[BezierCurve[Quad1]]; (*Construct a Bezier Curve*) a = BezierFunction[Quad1] Show[Graphics[{Red, Point[Quad1], Green, Line[Quad1]}, Axes -> True], ParametricPlot[a[t], {t, 0, 1}], ParametricPlot[{{ Cos[t], Sin[t]}}, {t, 0, Pi}, PlotLegends -> "Expressions", PlotStyle -> Orange, PlotRange -> {0, 1}]] a1 = a[1/5] a2 = a[2/5] a3 = a[3/5] a4 = a[4/5]

enter image description here

$\endgroup$
2
  • $\begingroup$ Firstly, what's Quad1? $\endgroup$
    – Wjx
    Sep 18, 2016 at 23:11
  • $\begingroup$ Quad1 is the control points for the bezier curve. (blue curve) $\endgroup$
    – BayWilson
    Sep 18, 2016 at 23:40

1 Answer 1

5
$\begingroup$
Quad1 = {{-1, 0}, {0, 1}, {1, 0}};

a = BezierFunction[Quad1];

pts1 = a /@ Range[1/5, 4/5, 1/5];

pts2 = {Cos[#], Sin[#]} & /@
   (Pi Range[4/5, 1/5, -1/5]);

Show[
 ParametricPlot[{Cos[t], Sin[t]}, {t, 0, Pi}],
 ParametricPlot[a[t], {t, 0, 1}],
 Epilog -> {
   AbsolutePointSize[6],
   Green,
   Line[Quad1],
   Red,
   Point[pts1],
   Point[pts2],
   Dashed,
   Line /@ Transpose[{pts1, pts2}]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.