4
$\begingroup$

I tried this:

Clear[b1, b2, A, p]
b1 = {-1, 1};
b2 = {1, 1};
A = {{2, 1}, {-1, 1}};
p = Parallelogram[{0, 0}, {b1, b2}];

Then drew this:

Graphics[{
  {Red, p},
  Blue, Thick,
  Arrow[{{0, 0}, b1}],
  Arrow[{{0, 0}, b2}],
  {Opacity[0.6], GeometricTransformation[p, A]},
  Red,
  Arrow[{{0, 0}, A.b1}],
  Arrow[{{0, 0}, A.b2}]
  }]

enter image description here

Then I tried:

Area[GeometricTransformation[p, A]]

But it didn't work, giving me:

Area::reg: GeometricTransformation[p,{{2,1},{-1,1}}] is not a correctly specified region. >>

Now, I know I can get the area of the transformed region with:

Abs[Det[A.Transpose[{b1, b2}]]]

Which is 6, but I am wondering if there is a simple way (for students just beginning with Mathematica) to use the Area command in this situation.

Update: Thanks to MichaelE2, J.M., and rcollyer, I was able to transform the region:

t = TransformedRegion[p, AffineTransform[A]]

Which returned Parallelogram[{0, 0}, {{-1, 2}, {3, 0}}], which is terrific information for students.

Then I was able to draw the same image like this:

Graphics[{
  {Red, p},
  Blue, Thick,
  Arrow[{{0, 0}, b1}],
  Arrow[{{0, 0}, b2}],
  {Opacity[0.6], t},
  Red,
  Arrow[{{0, 0}, A.b1}],
  Arrow[{{0, 0}, A.b2}]
  }]

Then I was able to get the area.

Area[t]

Which returned a 6.

$\endgroup$
2
  • 1
    $\begingroup$ Hmm, Area@DiscretizeGraphics@Graphics@GeometricTransformation[p, A] fails miserably, and Normal@GeometricTransformation[p, A] fails, too. :/ $\endgroup$
    – Michael E2
    Commented Jun 26, 2016 at 3:39
  • 1
    $\begingroup$ Try using TransformedRegion[] instead. $\endgroup$ Commented Jun 26, 2016 at 3:40

1 Answer 1

9
$\begingroup$

You are looking for TransformedRegion. GeometricTransformation is for transforming graphics primitives, but you are looking at region functionality. This is a case where the difference is important. Simply,

t = TransformedRegion[p, AffineTransform@A]
(* Parallelogram[{0, 0}, {{-1, 2}, {3, 0}}] *)

where the AffineTransform was needed as TransformedRegion expects a function.

$\endgroup$
1
  • $\begingroup$ Well explained. I really appreciate the help you have provided. $\endgroup$
    – David
    Commented Jun 26, 2016 at 4:41

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.