Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
3 edited tags
| link
    Bumped by Community user
2 deleted 2 characters in body
source | link

I have these two codes:

(1)

m = 100;
Do[ s[i] = N[2 Pi (i - 1)/m];
    r[i] = N[Exp[Cos[s[i]]] (Cos[2 s[i]])^2 
           + Exp[Sin[s[i]]] (Sin[2 s[i]])^2];
   ET[i] = N[r[i] Exp[I s[i]]],{i, 1, m + 1}]

RShape = ListPlot[Table[{Re[ET[i]], Im[ET[i]]}, {i, m + 1}], 
PlotStyle -> Black, Joined -> True, AspectRatio -> Automatic, 
PlotRange -> {{-2, 3}, {-1.5, 2}}, Axes -> False, 
Frame -> {{True, False}, {True, False}}, 
FrameTicks -> {{{-2, -1, 0, 1, 2}, None}, {{-2, -1, 0, 1, 2, 3}, 
   None}},
FrameLabel -> {Re[eta], Im[eta]}, RotateLabel -> False, 
FrameStyle -> Directive[FontSize -> 25]] /. Line -> Arrow;

Show[RShape]

and (2)

ListPlot[Table[{x, y}, {x, -2, 3, 0.00505}, {y, -2, 2, 0.00505}], PlotStyle -> 
Black]

I'm trying to plot series of points from code (2) inside region plotted in code (1); with a condition that only points inside the region will be plotted (no points on the outside and on the boundary of the region). By having this condition, I understand that I can use RegionFunction command

RegionFunction -> Function[{x, y, z},
Sqrt[x^2 + y^2] < Exp[Cos[ArcTan[x, y]]] (Cos[2 ArcTan[x, y]])^2 +
Exp[Sin[ArcTan[x, y]]] (Sin[2 ArcTan[x, y]])^2] 

Please help me find the suitable plot command to combine all this ideas. Thank you.

I have these two codes:

(1)

m = 100;
Do[ s[i] = N[2 Pi (i - 1)/m];
    r[i] = N[Exp[Cos[s[i]]] (Cos[2 s[i]])^2 
           + Exp[Sin[s[i]]] (Sin[2 s[i]])^2];
   ET[i] = N[r[i] Exp[I s[i]]],{i, 1, m + 1}]

RShape = ListPlot[Table[{Re[ET[i]], Im[ET[i]]}, {i, m + 1}], 
PlotStyle -> Black, Joined -> True, AspectRatio -> Automatic, 
PlotRange -> {{-2, 3}, {-1.5, 2}}, Axes -> False, 
Frame -> {{True, False}, {True, False}}, 
FrameTicks -> {{{-2, -1, 0, 1, 2}, None}, {{-2, -1, 0, 1, 2, 3}, 
   None}},
FrameLabel -> {Re[eta], Im[eta]}, RotateLabel -> False, 
FrameStyle -> Directive[FontSize -> 25]] /. Line -> Arrow;

Show[RShape]

and (2)

ListPlot[Table[{x, y}, {x, -2, 3, 0.005}, {y, -2, 2, 0.005}], PlotStyle -> 
Black]

I'm trying to plot series of points from code (2) inside region plotted in code (1); with a condition that only points inside the region will be plotted (no points on the outside and on the boundary of the region). By having this condition, I understand that I can use RegionFunction command

RegionFunction -> Function[{x, y, z},
Sqrt[x^2 + y^2] < Exp[Cos[ArcTan[x, y]]] (Cos[2 ArcTan[x, y]])^2 +
Exp[Sin[ArcTan[x, y]]] (Sin[2 ArcTan[x, y]])^2] 

Please help me find the suitable plot command to combine all this ideas. Thank you.

I have these two codes:

(1)

m = 100;
Do[ s[i] = N[2 Pi (i - 1)/m];
    r[i] = N[Exp[Cos[s[i]]] (Cos[2 s[i]])^2 
           + Exp[Sin[s[i]]] (Sin[2 s[i]])^2];
   ET[i] = N[r[i] Exp[I s[i]]],{i, 1, m + 1}]

RShape = ListPlot[Table[{Re[ET[i]], Im[ET[i]]}, {i, m + 1}], 
PlotStyle -> Black, Joined -> True, AspectRatio -> Automatic, 
PlotRange -> {{-2, 3}, {-1.5, 2}}, Axes -> False, 
Frame -> {{True, False}, {True, False}}, 
FrameTicks -> {{{-2, -1, 0, 1, 2}, None}, {{-2, -1, 0, 1, 2, 3}, 
   None}},
FrameLabel -> {Re[eta], Im[eta]}, RotateLabel -> False, 
FrameStyle -> Directive[FontSize -> 25]] /. Line -> Arrow;

Show[RShape]

and (2)

ListPlot[Table[{x, y}, {x, -2, 3, 0.05}, {y, -2, 2, 0.05}], PlotStyle -> 
Black]

I'm trying to plot series of points from code (2) inside region plotted in code (1); with a condition that only points inside the region will be plotted (no points on the outside and on the boundary of the region). By having this condition, I understand that I can use RegionFunction command

RegionFunction -> Function[{x, y, z},
Sqrt[x^2 + y^2] < Exp[Cos[ArcTan[x, y]]] (Cos[2 ArcTan[x, y]])^2 +
Exp[Sin[ArcTan[x, y]]] (Sin[2 ArcTan[x, y]])^2] 

Please help me find the suitable plot command to combine all this ideas. Thank you.

1
source | link

How to plot equally distance points inside 2D region?

I have these two codes:

(1)

m = 100;
Do[ s[i] = N[2 Pi (i - 1)/m];
    r[i] = N[Exp[Cos[s[i]]] (Cos[2 s[i]])^2 
           + Exp[Sin[s[i]]] (Sin[2 s[i]])^2];
   ET[i] = N[r[i] Exp[I s[i]]],{i, 1, m + 1}]

RShape = ListPlot[Table[{Re[ET[i]], Im[ET[i]]}, {i, m + 1}], 
PlotStyle -> Black, Joined -> True, AspectRatio -> Automatic, 
PlotRange -> {{-2, 3}, {-1.5, 2}}, Axes -> False, 
Frame -> {{True, False}, {True, False}}, 
FrameTicks -> {{{-2, -1, 0, 1, 2}, None}, {{-2, -1, 0, 1, 2, 3}, 
   None}},
FrameLabel -> {Re[eta], Im[eta]}, RotateLabel -> False, 
FrameStyle -> Directive[FontSize -> 25]] /. Line -> Arrow;

Show[RShape]

and (2)

ListPlot[Table[{x, y}, {x, -2, 3, 0.005}, {y, -2, 2, 0.005}], PlotStyle -> 
Black]

I'm trying to plot series of points from code (2) inside region plotted in code (1); with a condition that only points inside the region will be plotted (no points on the outside and on the boundary of the region). By having this condition, I understand that I can use RegionFunction command

RegionFunction -> Function[{x, y, z},
Sqrt[x^2 + y^2] < Exp[Cos[ArcTan[x, y]]] (Cos[2 ArcTan[x, y]])^2 +
Exp[Sin[ArcTan[x, y]]] (Sin[2 ArcTan[x, y]])^2] 

Please help me find the suitable plot command to combine all this ideas. Thank you.