Apply affine transformation to conic arc?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Apply affine transformation to conic arc?

stu002
Hi,

I have some conic arcs (including full circles and ellipses) created
via the 2D arrangements package.

I may have missed something, but is there a way to apply an affine (or
even just an orthogonal) transformation to them?  I think affine
transformations take conics to conics so their defining properties
should be preserved?

Thanks in advance,

Stu

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Apply affine transformation to conic arc?

Efi Fogel
You can apply whatever transformations on, for example, points, and then use the transformed points to define new curves.
What's important thought is that you know what kind of transformation you are applying, and in particular when it comes to rotations.

The sine and cosine of an angle are transcendental numbers; thus, there is no guarantee that they can be represented as exact rational numbers. In simple words, if you start with an angle, you cannot obtain an exact transformation matrix. The best you can do is obtain an approximation of the rotation, while bounding the error.

There is a construction of an object of type CGAL/Aff_transformation_2.h that accepts a vector that represents the rotation. It constructs an approximation; see http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Aff__transformation__2.html#a5cc6631b0ed023470ccfc9e37e5272fb


   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/



On 15 February 2018 at 07:37, Stuart Hungerford <[hidden email]> wrote:
Hi,

I have some conic arcs (including full circles and ellipses) created
via the 2D arrangements package.

I may have missed something, but is there a way to apply an affine (or
even just an orthogonal) transformation to them?  I think affine
transformations take conics to conics so their defining properties
should be preserved?

Thanks in advance,

Stu

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss