Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Can Anyone Identify This Math Equation?


3 replies to this topic

#1 rob86

    You can tune a guitar but you can't tuna fish.

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 761 posts
  • Gender:Male
  • Location:Canada
  • myCENT:23.50

Posted 04 December 2009 - 02:33 AM

I've forgotten a lot of math knowledge, so forgive me for my stupidity!

I'm trying to understand a bit of physics code relating to simple collision detection of circles in a game/simulation, and I see an important equation here, and I don't know what it's supposed to be doing. Can anyone identify it? It looks very familiar and simple, but I can't remember what it's for!

SQRT( (x1-x2)^2 + (y1-y2)^2 )

Here it is in python code..

if math.sqrt(  ((Circle.x-Circle2.x)**2)  +  ((Circle.y-Circle2.y)**2)  ) <= (Circle.radius+Circle2.radius):


#2 xpress

    XPRESSing the XPRESSion

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:X Universe
  • Interests:Computer Security
    Java and PHP
    Music
  • myCENT:93.53
  • Spam Patrol

Posted 04 December 2009 - 02:52 AM

It is the distance between two points in a plane, its just pythagoras theorem in a different way and very simple.

if you want more details check the following website distance between two points

#3 rob86

    You can tune a guitar but you can't tuna fish.

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 761 posts
  • Gender:Male
  • Location:Canada
  • myCENT:23.50

Posted 04 December 2009 - 04:06 AM

Ah that's right I remember it now. I knew it looked familiar, thanks.

#4 BuffaloHelp

    Sterling Archer

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 4,088 posts
  • Gender:Male
  • myCENT:50.18

Posted 04 December 2009 - 06:21 AM

You crazy math geeks!

Distance between two point on a plane? I simply take my ruler out and measure. I don't need no math formula for that... :)

Nice, xpress for finding out so quickly. Topic is closed.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users