Outpost Universe Forums

Off Topic => General Interest => Topic started by: Spikerocks101 on May 13, 2009, 11:25:01 PM

Title: Math
Post by: Spikerocks101 on May 13, 2009, 11:25:01 PM
I need help. I have a question to do with triangles and a grid. To start, the grid center in 0,0. To the left is -X, to the right is +X, up is +Y, down -Y. You know 2 points on the grid, 0,0(A) is the first, 0,7(B) is the second. You need to find the point ©. Theres a changing varible for the and at angle BAC, which is 25 degrees for the example. Line AC is 5 units long. What is the corident of C. I need a formula, like (this won't work but):
Cy = 7*degrees +7
Cx= 0*degrees + 0
I need it so that theres a changing varible, Degrees.
Title: Math
Post by: Fenrisul on May 14, 2009, 12:45:02 AM
(http://www.xdtech.net/temp/rotatepoint.jpg)

here - i hope this isnt for a math class :P  if a math teacher sees this solution they'll s*** a matrix.
Title: Math
Post by: Spikerocks101 on May 14, 2009, 11:34:22 AM
you get a cookie, your awesome
Title: Math
Post by: Freeza-CII on May 14, 2009, 12:46:57 PM
math hurts my soul
Title: Math
Post by: Hidiot on May 14, 2009, 01:27:30 PM
That's more geometry, trigonometrics or analytical geometry (depending on how you want to solve it).

Calculus is the only thing binding me to school where I come from.
Title: Math
Post by: Fenrisul on May 14, 2009, 11:03:41 PM
Quote
math hurts my soul
Learn it, love it, live it.
Title: Math
Post by: Spikerocks101 on May 14, 2009, 11:43:30 PM
im still ahving 1 proble, what is "C1x" and "C1y"? Isn't the 3rd Sin sapose to be Cos?
Title: Math
Post by: Fenrisul on May 15, 2009, 11:15:58 AM
Quote
im still ahving 1 proble, what is "C1x" and "C1y"? Isn't the 3rd Sin sapose to be Cos?
C1x is the x coordinate of the green dot, aka 0
C1y is the y coordinate of the green dot, aka 5

also, yes it is supposed to be Cos, thats what i get for answering right before bed. (Updated image)
Title: Math
Post by: Spikerocks101 on May 15, 2009, 09:18:13 PM
i'm still having some problems. when i set the degrees to 180, it returns X: 4.00, Y: 2.99. I know it should be X: 0, Y: -5 thou. Please help.
Title: Math
Post by: CK9 on May 16, 2009, 02:04:09 PM
To be honest, I have no idea what you're trying to do, but I'm very surprised you aren't being told to work in radians rather than degrees
Title: Math
Post by: Hooman on May 16, 2009, 03:04:22 PM
Lol, good point. Most computer implementations of Sin and Cos work with radians rather than degrees. Degrees is an arbitrary measurement scale, where as radians actually has some natural mathematical significance. It also simplifies the calculations of Sin and Cos, since to work from degrees you pretty much have to convert to radians before doing the calculation the radian way.
 
Title: Math
Post by: CK9 on May 24, 2009, 12:02:48 PM
Which could be why he's getting the erronious answer, too.
Title: Math
Post by: Spikerocks101 on May 24, 2009, 08:32:41 PM
no worries, it worked all fine. I got a simple 3d engine with C++ and Glut. This is the best program I have made so far. Saddly, its hell trying to learn Glut, because at school, where still learning crappy Visual "Basics", and we haven't even got to while loops... any ways, does any of you know Glut, becuase I want to know some commands, so yeah.
Title: Math
Post by: Hooman on May 25, 2009, 11:23:21 PM
BASIC: Beginer's All-Purpose Symbolic Instruction Code. Not "Basics".  ;)

Kind of like how "Laser" (Dr. Evil pose) is also an acronymn.

Hmm, I wonder how many google hits I've just generated by saying that. Maybe they should pay me. :P


If you want to know Glut commands, why not search for reference material?
Title: Math
Post by: Spikerocks101 on May 26, 2009, 11:50:41 AM
well, i have been learning it by myself, and i have been jumping to and thru here and there, and found GLUT. I know how to do most things with basic glut, I.E. make shapes, but i need to know some simple thing, and hard things, that might not even be Glut command. Heres some:
Lighting (googling it didn't help much)
Images/Textures (also I didn't understand that much)
Multi-Key Press (Unlike the "one key at a time" event)
Classes (I really didn't understand classes, but know I need them to make enemies for a game and stuff)

Yeah...
Title: Math
Post by: Hooman on May 26, 2009, 10:17:28 PM
Sounds like you need to cover some programming basics then first.

Maybe just keep reading those things you don't understand until you start to understand them.
Title: Math
Post by: Mez on May 27, 2009, 04:30:46 AM
I suggest reading practical c & practical c++ to start with (O'Reilly).  Might not be as useful to you as they are / were to me as i already knew about classes and had done alot of programing in Java.

There are alot of C/C++ programing books as well as books on just using glut, can't recommend any myself personally, but using amazon and reading the comments and ratings should be a good start
Title: Math
Post by: Freeza-CII on May 27, 2009, 01:09:38 PM
forget the math and coding lets hit the bar.
Title: Math
Post by: Spikerocks101 on May 27, 2009, 08:52:35 PM
i'm under aged :(
Title: Math
Post by: Mez on May 28, 2009, 05:06:05 AM
Quote
i'm under aged :(
that never stopped me
Title: Math
Post by: Spikerocks101 on May 28, 2009, 11:17:19 AM
and look how you turned out... playing an old game still.