posted 12 years ago
I am working on trying to place a shape inside of an applet. I have the html coded and the rest of the applet class written. My problem is that I have not taken math in a very long time. I remember graphing but I am a little confused about using java's coordinate system. In my reading it seems as thought each shape has the 0,0 and you set it from there. But then I tried counting each place in order to place the shape. Is there some formula I should be using.
Any help would be greatly appreciated. Thanks in advance
Any help would be greatly appreciated. Thanks in advance
posted 12 years ago
Hi,
From your description, I can't be sure what's going on, but I can tell you that in Java, as in most computer graphics, 0, 0 is the top left corner of the window, and the Y coordinate increases as you go down; this is the opposite of how mathematicians normally do things.
From your description, I can't be sure what's going on, but I can tell you that in Java, as in most computer graphics, 0, 0 is the top left corner of the window, and the Y coordinate increases as you go down; this is the opposite of how mathematicians normally do things.
posted 12 years ago
If you haven't done so already, you should flip through the 2D graphics tutorial.
In particular, there is a section on AffineTransforms, which make it easy to
translate the origin, flip the Yaxis and generally rescale.
[ November 01, 2005: Message edited by: Jeff Albrechtsen ]
In particular, there is a section on AffineTransforms, which make it easy to
translate the origin, flip the Yaxis and generally rescale.
[ November 01, 2005: Message edited by: Jeff Albrechtsen ]
There is no emoticon for what I am feeling!
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
The WEB SERVICES and JAXRS Course
https://coderanch.com/t/690789/WEBSERVICESJAXRS
