Subject: CGAL users discussion list
List archive
- From: "naresh" <>
- To: <>
- Subject: [cgal-discuss] Point Rotation problem or Bug ?
- Date: Thu, 12 Mar 2009 12:53:06 +0530
Hi
I am trying rotate 2d point but i am getting
unexpected result from input. here is code.
typedef CGAL::Quotient<float> NT;typedef CGAL::Cartesian<NT> CartesianFloat;typedef CartesianFloat::Point_2 Point;typedef CartesianFloat::Aff_transformation_2 Transformation;int main() { Transformation rotate(ROTATION, sin(fAngle), cos(fAngle)); Point p0; <= i have some points to rotate from array std::cout << "Point X : " << CGAL::to_double(p0.x()) << " Y : " << CGAL::to_double(p0.y()) << std::endl; p0 = rotate(p0); std::cout << "Point X : " << CGAL::to_double(p0.x()) << " Y : " << CGAL::to_double(p0.y()) << std::endl; return 0; } And Here is result from input Original X : 159.91 Y : 1005.52 Original X : -166.478 Y : 995.262 Rotated X : -1.#IND Y : -1.#IND Rotated X : -197.657 Y : 989.541 Original X : 159.91 Y : -995.468 Original X : -166.478 Y : -1005.7 Rotated X : -1.#IND Y : -1.#IND Rotated X : -134.805 Y : -1010.46 Original X : 159.91 Y : -995.468 Original X : 159.91 Y : 1005.52 Rotated X : -1.#IND Y : -1.#IND Rotated X : -1.#IND Y : -1.#IND So i am getting -1.#IND when value is 159.91 as input. These problem i am getting in my code. I had posted little rotation code from my functions. So I this bug or i am doing anything wrong ?
|
- Re: [cgal-discuss] how to output a point's coordinate, (continued)
- Re: [cgal-discuss] how to output a point's coordinate, Samuel Hornus, 03/06/2009
- Re: Re: [cgal-discuss] how to output a point's coordinate, zengming, 03/06/2009
- Re: Re: [cgal-discuss] how to output a point's coordinate, Pedro Machado Manhães de Castro, 03/06/2009
- Re: Re: Re: [cgal-discuss] how to output a point's coordinate, zengming, 03/06/2009
- Re: Re: Re: [cgal-discuss] how to output a point's coordinate, zengming, 03/06/2009
- Re: Re: Re: [cgal-discuss] how to output a point's coordinate, Pedro Machado Manhães de Castro, 03/06/2009
- Re: Re: Re: [cgal-discuss] how to output a point's coordinate, zengming, 03/06/2009
- Re: Re: Re: [cgal-discuss] how to output a point's coordinate, Pedro Machado Manhães de Castro, 03/06/2009
- [cgal-discuss] How to rotate Segment_2, naresh, 03/06/2009
- [cgal-discuss] Sweep Line Running slow, naresh, 03/07/2009
- Re: [cgal-discuss] Sweep Line Running slow, Ophir Setter, 03/07/2009
- [cgal-discuss] Point Rotation problem or Bug ?, naresh, 03/12/2009
- [cgal-discuss] How to find center of mass and principal inertial axis of 3D model?, Samay Kumar, 03/13/2009
- Re: [cgal-discuss] How to find center of mass and principal inertial axis of 3D model?, naresh, 03/13/2009
- Re: [cgal-discuss] How to find center of mass and principal inertial, Ashwin N, 03/14/2009
- Re: [cgal-discuss] How to find center of mass and principal inertial, Pierre Alliez, 03/25/2009
- Re: [cgal-discuss] Point Rotation problem or Bug ?, Ashwin N, 03/14/2009
- [cgal-discuss] Point Rotation problem or Bug ?, naresh, 03/12/2009
- [cgal-discuss] Alpaha shape question, naresh, 03/18/2009
- Re: [cgal-discuss] Alpaha shape question, Andreas Fabri, 03/18/2009
- Re: [cgal-discuss] Alpaha shape question, naresh, 03/19/2009
- Re: [cgal-discuss] Sweep Line Running slow, Ophir Setter, 03/07/2009
- [cgal-discuss] Sweep Line Running slow, naresh, 03/07/2009
- Re: Re: [cgal-discuss] how to output a point's coordinate, Pedro Machado Manhães de Castro, 03/06/2009
- Re: [cgal-discuss] How to rotate Segment_2, Ashwin N, 03/09/2009
- Re: Re: [cgal-discuss] how to output a point's coordinate, zengming, 03/06/2009
- Re: [cgal-discuss] how to output a point's coordinate, Samuel Hornus, 03/06/2009
Archive powered by MHonArc 2.6.16.