0
$\begingroup$

I have two set of points that I want to make a distortion as illustrated below.

A1={{1.85714, 0.742307}, {2.78571, 1.11346}, {1.07143, 1.3609}, {1.21429,
   2.35064}, {2.14286, 2.72179}, {2.92857, 2.1032}, {1.5, 
  4.33013}, {2.28571, 3.71154}, {4.64286, 1.85577}, {3.85714, 
  2.47436}, {4., 3.4641}, {4.92857, 3.83526}, {3.21429, 
  4.08269}, {5.07143, 4.825}}

A2={{1.5, 0.866025}, {2.5, 0.866025}, {1., 1.73205}, {1.5, 
  2.59808}, {2.5, 2.59808}, {3., 1.73205}, {1.5, 4.33013}, {2.5, 
  4.33013}, {3., 3.4641}, {4., 1.73205}, {4.5, 2.59808}, {4., 
  3.4641}, {4.5, 4.33013}, {5.5, 4.33013}}

I have already tried to use the Rotate function, but didnt carry me anywhere.

Like for example

RotationTransform[-20 Degree, {0, 0}] /@ A1 

Could you help me?

Distorting process

EDIT1: First attempt

AN = -20;
eta = Graphics[{EdgeForm[Thickness[0.001]], PointSize[0.020], Red, 
    Point /@ RotationTransform[-AN Degree, {0, 0}] /@ A1}];
eta2 = Graphics[{EdgeForm[Thickness[0.001]], PointSize[0.013], Black, 
    Point /@ RotationTransform[-AN Degree, {0, 0}] /@ A2}];
Show[eta, eta2, Frame -> True, AspectRatio -> 1.2]

ATTEMPT1

$\endgroup$
1
  • 1
    $\begingroup$ Have you looked at ShearingTransform? $\endgroup$
    – Syed
    Commented Aug 26, 2021 at 20:07

1 Answer 1

1
$\begingroup$
pts = RandomReal[1, {1000, 2}];
Graphics[Point[pts]]

enter image description here

Graphics[GeometricTransformation[Point[pts],
  ShearingTransform[Pi/4, {1, 0}, {0, 1}]]]

enter image description here

$\endgroup$
6
  • $\begingroup$ How about the inversal path, and i'll need the output of the points too. $\endgroup$ Commented Aug 27, 2021 at 1:12
  • $\begingroup$ Consult the documentation of ShearingTransform. The inverse is an obvious application of that. $\endgroup$ Commented Aug 27, 2021 at 1:15
  • $\begingroup$ Something like -17 Degree maybe works. But how to get the points? $\endgroup$ Commented Aug 27, 2021 at 1:21
  • $\begingroup$ YOU have the locations of the points!!! $\endgroup$ Commented Aug 27, 2021 at 1:21
  • $\begingroup$ I'm talking about the transformed points. How to extract them from ShearingTransform? $\endgroup$ Commented Aug 27, 2021 at 1:30

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.