# Basic Trigenometry Question

This topic is 736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

After a long break from math I started taking another crack at it. I'm not sure I'll ever get to this graphical stuff, but I'm sorting through a trigonometry link.

https://www.raywenderlich.com/35866/trigonometry-for-game-programming-part-1

What is getting me is that you need to know something about the triangle to deduct the information. How do you gather intel, if you don't know anything about it.

Two sprites on the screen, you have no idea what points they're at. How on earth do you do trigonometry with a blank triangle?

Edited by JeremyB

##### Share on other sites

You are correct: You cannot do trig without some given information.

Having right triangles, as opposed to just any sort of triangle gives you a head start because you know that one angle is 90 degrees. If you know that the sum of the angles is 180 degrees then you only need one more angle to know all three angles. But, if you don't know that second angle, you'll never know the third unless perhaps you have some other piece of information like the length of a side which can be used to give you a second angle.

But Alvaro makes a good point; you should know where they are on the screen since it's your code that puts them there.

##### Share on other sites

Thanks guys. The information was helpful, and what I thought. I learned some vector math, just adding, subtracting, scalar multiplication. Things are coming clear. : )

Not quite trig here, but I'm having a little problem plotting a circle. I see the formula:

(x-h)2 + (y - k)2 = r2

Where h and k have something to do with the center of the circle. That's where my understanding is ending, even with videos I watch. For some reason, no one is going over the variables. is h and k x and y coordinates of the center point, if so which? Also if they are the center points what is x and y in the formula?

Sometimes the videos and sites could be a lot more helpful, lol.

Edited by JeremyB

##### Share on other sites

That's where my understanding is ending, even with videos I watch.

This is because you probably don't know Pythagoras' theorem, which is not a big deal, because if you want, you can understand it pretty easily, I'm sure. You just need to spend some time on it.

Normally, if there is something you can't grasp, it's not that the problem is inherently hard, it's just that you are trying to grasp 2+ things at once, and you count it as one problem.

is h and k x and y coordinates of the center point, if so which? Also if they are the center points what is x and y in the formula?

I will just show you a graph, you need to figure everything on your own. Imagine that 'h' and 'k' are substituted with 'a' and 'b' in your formula.

Edited by codeBoggs

1. 1
2. 2
3. 3
Rutin
14
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633674
• Total Posts
3013275
×