.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old April 30th, 2003, 01:34 AM

Gwaihir Gwaihir is offline
Corporal
 
Join Date: Sep 2001
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Gwaihir is on a distinguished road
Default Re: [OT] pythageoron and 3d

just keep adding sides squared under the sqrt.

because the first diagonal is used as a side with the next "rectangular" side, so it looks like this (where a, b, c are the height, length, width, and you want the diagonal of the box):

diagonal of a side:
sqrt( a^2 + b^2 )

diagonal of box = diagonal of (diagonal of side & height):
sqrt( sqrt( a^2 + b^2 )^2 + c^2 )
=sqrt( a^2 + b^2 + c^2 )

so in an n-dimensional space, the distance from point p to point q is

sqrt( (p.1-q.1)^2 + (p.3-q.3)^2 + (p.3-q.3)^2 + . . . + (p.n-q.n)^2 )

(grr, how do you get &#nbsp; spaces to work? I can't do sigma notation without spaces to align the sub and superscritps. hrmph.)

hope that helps

edit: hehe, looks like i was beaten to it while i posted.

[ April 30, 2003, 00:38: Message edited by: Gwaihir ]
Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.