2
$\begingroup$

I want to paint over the ellipse. I have following

a = 2;
b = 1;
ellipse[a_, b_][t_] := {a*Cos[t], b*Sin[t]}
ellipse[a, b][10]
ParametricPlot[{ellipse[a, b][t]}, {t, -10, 10}]

How can i paint over this area? I was trying to use some options of parametric plot, but without success. Help please! Tnx

$\endgroup$
  • $\begingroup$ Try RegionPlot instead of ParametricPlot. $\endgroup$ – Will.Mo Nov 20 '17 at 12:03
  • $\begingroup$ How can I use region plot if I have only parametric function ellipse? $\endgroup$ – Mykhailo Voloshyn Nov 20 '17 at 12:10
  • $\begingroup$ Using ParametricRegion but for performance sake you should calculate parameters and use Circle. $\endgroup$ – Kuba Nov 20 '17 at 12:18
  • $\begingroup$ Thanks. I was trying using ParametricRegion, and the ellipse is painted, but how to paint over the area? I have an error. $\endgroup$ – Mykhailo Voloshyn Nov 20 '17 at 12:49
  • 3
    $\begingroup$ Graphics[{LightBlue, Opacity[0.75], Disk[{0, 0}, {a, b}]}, Axes -> True] or Graphics[{Circle[{0, 0}, {a, b}], LightBlue, Opacity[0.75], Disk[{0, 0}, {a, b}]}, Axes -> True] $\endgroup$ – Bob Hanlon Nov 20 '17 at 13:46
2
$\begingroup$

You can introduce an extruding parameter within ParametricPlot or ParametricRegion.

ParametricPlot:

ParametricPlot[r ellipse[a, b][t], {t, 0, 2π}, {r, 0, 1}]

enter image description here

ParametricRegion:

Region @ ParametricRegion[r ellipse[a, b][t], {{t, 0, 2π}, {r, 0, 1}}]

enter image description here

ParametricPlot is used for visualization only, whereas ParametricRegion can be used for more than just visualization -- it's a region. You can query mathematical properties like area, centroid, point membership, etc.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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