1
$\begingroup$

i would like to ask a question

if we have some parametric plot and it will be a shape, can we use "area" function to calculate that shape?

Here is the simple program

\[Alpha] = \[Pi];
\[Alpha]1 = .5 \[Pi];
g[1] = ParametricPlot[{-8 + u Cos[\[Alpha]1], 
    u Sin[\[Alpha]1]}, {u, -8, 8}, PlotStyle -> Green];
g[2] = ParametricPlot[{u Cos[\[Alpha]], 8 + u Sin[\[Alpha]]}, {u, -8, 
    8}, PlotStyle -> Green];
g[3] = ParametricPlot[{8 + u Cos[\[Alpha]1], 
    u Sin[\[Alpha]1]}, {u, -8, 8}, PlotStyle -> Green];
g[4] = ParametricPlot[{u Cos[\[Alpha]], -8 + u Sin[\[Alpha]]}, {u, -8,
     8}, PlotStyle -> Green];
ar = {};
AppendTo[gar, g[1]];
AppendTo[gar, g[2]];
AppendTo[gar, g[3]];
AppendTo[gar, g[4]];
Show[gar, AxesOrigin -> {0, 0}, PlotRange -> All]

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$
Show[gar, AxesOrigin -> {0, 0}, PlotRange -> All] //BoundaryDiscretizeGraphics // Area

256

$\endgroup$
5
  • $\begingroup$ its not working, i receive the this error BoundaryMeshRegion::buncl: At least one boundary was not closed in BoundaryMeshRegion[{{-8.,-8.},{-8.,-7.84297},{-8.,-7.68594},{-8.,-7.34547},{-8.,-7.02755},{-8.,-6.71588},{-8.,-6.37778},<<37>>,{-8.,6.02834},{-8.,6.36812},{-8.,6.68533},{-8.,6.99632},{-8.,7.16501},{-8.,7.33371},<<162>>},{{},{Line[{<<1>>}]}}]. >> $\endgroup$
    – 葉柏樂
    Oct 14, 2022 at 6:05
  • $\begingroup$ @葉柏樂AbdullahSyafiq Or DiscretizeGraphics /@ {g[1], g[2], g[3], g[4]} // RegionUnion // Show // BoundaryDiscretizeGraphics // Area $\endgroup$
    – cvgmt
    Oct 14, 2022 at 6:43
  • $\begingroup$ i dont know why, it still not work in that program $\endgroup$
    – 葉柏樂
    Oct 14, 2022 at 7:18
  • $\begingroup$ @葉柏樂AbdullahSyafiq version 13.1 $\endgroup$
    – cvgmt
    Oct 14, 2022 at 7:21
  • $\begingroup$ maybe because i still use version 10.0 $\endgroup$
    – 葉柏樂
    Oct 14, 2022 at 7:24

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.