0

In mathematics the y-axis of a Cartesian coordinate system shows in upward direction. So a bigger y-value means a higher position of the object. As far as I noticed, this is the same in CGAL. In computer science most of the times the y-axis is directed downwards. So a bigger y-value means a lower position of the object.

Is there a possibility to change the direction of the y-axis? I'm using the CGAL/Exact_predicates_inexact_constructions_kernel.

Thanks for any answer! kartoffelsalat

Edit: To clarify my question, answering Marc: I don't care about graphics, etc. I am especially interested, that the Polygon_2 methods, which return the top-most-vertex, return the top-most-vertex, but now with the highest y-value. And yes - orientation-methods which return CLOCKWISE should return COUNTERCLOCKWISE instead

Edit: Solved my problem with Marcs hint on flipping in/output Points y-value to their negative value.

kartoffelsalat
  • 116
  • 2
  • 7
  • Are you talking about graphics (Qt, etc) or do you want to reverse the orientation of the plane so predicates that currently return CLOCKWISE now return COUNTERCLOCKWISE? – Marc Glisse Oct 31 '13 at 16:16
  • Clarified my question above; I want to reverse the plane orientation and don't care about graphics. Sorry for the late response, didn't saw the comment... – kartoffelsalat Nov 04 '13 at 16:04
  • By far the easiest would be for you to input (x,-y) instead of (x,y) whenever you give points to CGAL, and possibly translate back when you read points from CGAL. – Marc Glisse Nov 04 '13 at 16:27
  • Thank you, it's working! If you put this as an answer I can mark it as solution (am I right?). – kartoffelsalat Nov 05 '13 at 12:41

1 Answers1

0

By far the easiest would be for you to input (x,-y) instead of (x,y) whenever you give points to CGAL, and possibly translate back when you read points from CGAL.

Marc Glisse
  • 7,550
  • 2
  • 30
  • 53