Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Math Problem ...
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
CyberGeek




PostPosted: Sun Dec 17, 2006 9:38 am   Post subject: Math Problem ...

Good Morning Guys,

I was just wondering if someone could tell me the algebra equation for matrices. What I want to do is, have a square, and when I push the left arrow key down, the square will rotate 10 degrees to the left, and if the right arrow key is pushed, the square will rotate 10 degrees to the left. Now, the Turing Implementation I can do, it is the math equation that I need. If someone could please help me that would be most appreciated. Very Happy
Sponsor
Sponsor
Sponsor
sponsor
neufelni




PostPosted: Sun Dec 17, 2006 2:14 pm   Post subject: (No subject)

I am pretty sure that Turing has a Pic.Rotate function that you can use, so I don't think you will need any math for this.
ericfourfour




PostPosted: Sun Dec 17, 2006 2:29 pm   Post subject: (No subject)

Nick the only problem with that idea is that a square is not a picture.
md




PostPosted: Sun Dec 17, 2006 2:31 pm   Post subject: (No subject)

This is GD, not everything revolves around Turing Wink

IIRC The DirectX documentation actually explains the math quite well... unfortunately I don't have a link to it. Also, on wikipiedia http://en.wikipedia.org/wiki/Rotation_matrix
neufelni




PostPosted: Sun Dec 17, 2006 2:44 pm   Post subject: (No subject)

ericfourfour wrote:
Nick the only problem with that idea is that a square is not a picture.

That is true, but you can easily make it a picture using Pic.New. I believe there is a program called rotatinghouse.t or something like that in the Turing examples that should show you how you can do this.
ericfourfour




PostPosted: Sun Dec 17, 2006 3:02 pm   Post subject: (No subject)

To rotate a square, I usually rotate every point individually. I have no idea what matrices are but it can be done with simple trig.
wtd




PostPosted: Sun Dec 17, 2006 3:13 pm   Post subject: (No subject)

md wrote:
not everything revolves around Turing


You lie! Take it back!
md




PostPosted: Sun Dec 17, 2006 3:19 pm   Post subject: (No subject)

Nick, not everything revolves around Turing (sorry wtd Wink ), and no matter how hard you try and justify it your solution isn't what the OP asked for, even if it *might* work.
Sponsor
Sponsor
Sponsor
sponsor
neufelni




PostPosted: Sun Dec 17, 2006 3:31 pm   Post subject: (No subject)

I know that not everything revolves around Turing, I myself don't use Turing much anymore, but since CyberGeek made it clear that he was using Turing, I explained how he could do it with Turing.
md




PostPosted: Sun Dec 17, 2006 4:31 pm   Post subject: (No subject)

Quote:
Now, the Turing Implementation I can do, it is the math equation that I need
Wink

Note that I'm not saying this entirely for you... but I have to fight the rising tide of stupidity whenever and wherever it starts to encroach on intelligent thought (not that you're stupid... I'm sure it was a momentary lapse of reading Razz ).
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: