Home static Java Programming [Archive] - Co-ordinates genius required
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Co-ordinates genius required
 10 Duke Stars available This topic has 2 replies on 1 page.

Posts:2
Registered: 8/10/04
Co-ordinates genius required
Aug 10, 2004 6:25 AM

Hi,

I need some help in programming a section of an application I'm trying to create.

I need to create a triangle (ie 3 sets co-ordinates) of images.

I know that sounds simple - but I also need to be able to create two buttons and make the images rotate left or right (depending on the button pressed)

I assume this will be achieved by turning co-ordinates into some kind of reference (ie 'A1'), then instead of using the co-ordinates mapping the image to the reference?????
But I am very stuck!

My next step is to make the triangle out of 3 images randomly selected from a folder of 5 - then randomly map these to the 3 triangle co-ordinates, using some sort of random number generator (rand?).....if anyone could help with that, then that would be truely impressive!!

Thanks in advance for anyone taking up the challenge!

Posts:21,718
Registered: 98-02-20
Re: Co-ordinates genius required
Aug 10, 2004 6:29 AM (reply 1 of 2)

Best to understand how to transform coordinates in 2D or 3D space. Have you ever heard of such a thing? Ever study matricies or linear algebra at all? Can you multiply a vector by a matrix to get another vector? That's what you need to know:

http://www.ping.be/~ping1339/coortf.htm

Look at Cartesian coordinates.

%

Posts:11,186
Registered: 06.04.04
Re: Co-ordinates genius required
Aug 10, 2004 7:07 AM (reply 2 of 2)

http://www.ping.be/~ping1339/coortf.htm

That sure is a fine link. After the OP has read and understood the appropriate parts he might have a look
at AffineTransform in the API docs ...

kind regards,

Jos

 This topic has 2 replies on 1 page.