Author Topic: Math Question(s)...  (Read 6344 times)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Math Question(s)...
« on: March 05, 2011, 08:39:07 PM »
How do I find an angle in a circle? I have been wondering for ages...

I might update this topic as I need more help :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #1 on: March 06, 2011, 01:12:31 AM »
With a protractor...?

I'm guessing you want more help than that, though. What exactly do you want doing?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #2 on: March 06, 2011, 01:45:09 AM »
Just so I know before using it :) But what is an protractor (Explain in simplicity please :))

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
Re: Math Question(s)...
« Reply #3 on: March 06, 2011, 03:41:59 AM »
A protractor is a plastic semi-circle (or circle) with markings on it to indicate an angle, e.g. halfway between the 50 and 60 marks shows it's an angle of 55o. It's pretty difficult to use with a computer monitor, though (just in case you attempt it :P).

And, yes, we do need a bit more information as to what exactly you are planning. Not world domination, is it?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #4 on: March 06, 2011, 03:51:37 AM »
It is world domination :) No... I am going to make 2 circles bind, but the other one hangs on at one point...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #5 on: March 06, 2011, 08:57:33 PM »
Wow, *searching for "protractor" in google, finding pictures and then feeling dumb*... Found out that you can use pi though, but how do I make an angle a startting point:


I think that helps the understanding... I know how to get around the circle now, but not how to set the starting angle...

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Math Question(s)...
« Reply #6 on: March 07, 2011, 01:59:29 AM »
What you are looking for, I think, is the "tangent" of the circle.


Suppose you draw any line from the center of the circle, to the outside of the circle.  A tangent line is always at 90° to that line.





A tangent line is recogniseable because it only just touches the circle at one point, whereas any other type of line crosses the circle in 2 places or doesn't cross it at all:





Let me know if this help you at all.  If not, please can you explain what it is you're trying to do in your level.  That will help me a lot in understanding what you need.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #7 on: March 09, 2011, 03:10:31 AM »
Was going to make something diferent from Eufloria, you were going to live as a fast evolving cell that could conect parts together, but the knowledge of how to find the 90° of a circle is useful at any time as a programmer :P Well, I don't know if it solves it, but
Quote
Suppose you draw any line from the center of the circle, to the outside of the circle.  A tangent line is always at 90° to that line.
says something about what I am looking for, but after looking at
Quote
A tangent line is recogniseable because it only just touches the circle at one point, whereas any other type of line crosses the circle in 2 places or doesn't cross it at all:
it confuses me a little...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #8 on: May 05, 2011, 03:21:38 AM »
So, I think I finally figured this out, using sin() and cos(), cause at 0 they are at the 90° on a circle, so I can add and remove from there: Using purely sin and cos... So thats what I was looking for, to bad the plans are gone :/

(But I might use it in the future :D)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Math Question(s)...
« Reply #9 on: May 07, 2011, 06:33:31 AM »
Got a new one, which annikk can answer, which goes like this:

Finding and exit angle, or collision point or whatever you call it... It is the point where two objects collide if you know what I am saying... But this might not be fitting to what I am looking for.

I am looking for something to find an angle pointing from my mouse, or simplier said: Let's say that we have an arrow pointing to the center of the screen from the mouse, but how do you achive this(this is no litterally, I mean how to find that angle!)?

And if you wonder what I am making to need this is a shooting game... so I'll need to find out which way the bullets are going to go...

Hope you understood, else I can poste some pictures :P

Quote
EDIT: Uploaded the file, you can play it yourself and see.

The bullets are slower the closer you are to the player unit: I used the equation(x(unit) - x(mouse)/something) and the same with the y axis, so it creates more speed the further away you are cause the distance is larger,but I need something that is constant.

and the controls by the way is:

Left Click(Hold) = shoot
Right Click(Hold) = walk/run(depends on dist between unit and mouse)
/EDIT
« Last Edit: May 07, 2011, 06:46:06 AM by Aino »