[HN Gopher] Fixing the Drift in Shape Rotations
___________________________________________________________________
Fixing the Drift in Shape Rotations
Author : steveruizok
Score : 21 points
Date : 2021-11-19 14:19 UTC (8 hours ago)
(HTM) web link (www.steveruiz.me)
(TXT) w3m dump (www.steveruiz.me)
| xvedejas wrote:
| There should also be strategies for the choice of center to be
| invariant even after re-selecting the rotated set of shapes. You
| should be able to do this by finding the two points farthest from
| each other, and choosing the midpoint between the two, for
| instance. But that point might not be unique, so maybe finding
| the center of the smallest circle enclosing all objects would be
| a better example?
| _dain_ wrote:
| >However, the rotated shapes probably have a different average
| center; which means that your second rotation (ie to rotate
| things back) is pivoting around a different point. And that's
| what causes the change of position.
|
| Uhh, what? Why doesn't the rotated group have the same centre as
| the original? The article glosses right over this without
| explaining it. Is it floating point imprecision? Is it from
| rasterization?
| [deleted]
| glenjamin wrote:
| I think it's because the centre is computed using the X and Y
| axis, and the rotated shapes have a different bounding box on
| those axes.
___________________________________________________________________
(page generated 2021-11-19 23:00 UTC)