Juce coordinate system vs cartesian


#1


What coordinate system does Juce use?  I am used to Cartesian which I thought was standard, so I think either Juce doesn't use Cartesian, or I put the pieces together wrong.  I am specifically looking at the Path.addCenteredArc() method.  I understand that any coordinate system works, but it is confusing to me to think in terms of the Juce coordinates.
I think Juce starts with 0 at the top and Pi/2 to the right (clockwise). which seems strange to me.  If thats correct why?  (does England teach math using a different coordinate system than the US does? )
Either Juce doesn't use Cartesian, or It is because windows doesn't or both.


I would like to do all of my calculations in Cartesian, and use a View matrix to translate when drawing to the OS's Window.
Cartesian is 0 angle to the right and counter clockwise which means the sign in each quadrant is (x, y):
-+  ++
--   +-
Windows uses:
--  +-
-+  ++

I think Juce uses(which appears to be Cartesian for X and Y, but the direction of Angles seems reversed.)

-+ ++

--  +-

If I create my Path using Cartesian, and do all of my calculations, I can create a matrix(AffineTransform) to convert it to Windows when I draw using Graphics.strokePath(), but then what happens when I compile on one of the other operating systems. 
I am hoping that Juce is already aware of the coordinate system it is running on and I can just use an AffineTransform to convert from Cartesian to whatever Juce uses (unless Juce is already Cartesian) and it will apply a transform for each operating system.


Kismet
 


#2

Really don't understand what you mean..?? The coordinate system's extremely simple and yes, obviously is cartesian!

And addCentredArcc seems to have plenty of full documentation about what all its parameters mean AFAICT..


#3

Cartesian starts with angle 0 at the right and goes counterclockwise and juce starts with 0 at the top and goes clockwise

Am I mistaken?

 

P.S.

I agree your code is well documented.  I love your comment sections by your jasserts so i can tell exactly what to do.  Awesome!

Kismet


#4

"Cartesian" just means the normal 2D x, y system, it has nothing to say about about rotational angles at all.

But yes, for that particular arc method the top is considered to be at angle 0.