Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top