|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi you all.
To make a smooth animation, I'd like to measure the distance between two
points ( ie : distance between <2,3,4> and <7,-8,3>)
Does anyone know the formulae to calculate it?
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
of course:
distance(<x,y,z> to <x1,y1,z1>) =
__________________________
/ 2 2 2
\/ (x - x1) + (y - y1) + (z - z1)
news:396A0D89.699D3985@club-internet.fr...
> Hi you all.
>
> To make a smooth animation, I'd like to measure the distance between two
> points ( ie : distance between <2,3,4> and <7,-8,3>)
>
> Does anyone know the formulae to calculate it?
>
> Thanks
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>Hi you all.
>
>To make a smooth animation, I'd like to measure the distance between two
>points ( ie : distance between <2,3,4> and <7,-8,3>)
>
>Does anyone know the formulae to calculate it?
The simple way, in POV script, is vlength(A-B) where A and B are the vectors
you want the distance between. The formula actually used is
sqrt( (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y)+(A.z-B.z)*(A.z-B.z))
which is from the Pythagorean Theorem in three dimensions.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The scalar distance between two points can be found by:
sqrt( (x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2 )
where <x1, y1, z1> is your first point, and <x2, y2, z2> is your second
point.
So, in your example:
sqrt( (7 - 2)^2 + (-8 - 3)^2 + (3 - 4)^2 )
= sqrt( 5^2 + (-5)^2 + (-1)^2 )
= sqrt( 25 + 25 + 1)
= sqrt(51)
= 7.14 (approximately)
- How
news:396A0D89.699D3985@club-internet.fr...
> Hi you all.
>
> To make a smooth animation, I'd like to measure the distance between two
> points ( ie : distance between <2,3,4> and <7,-8,3>)
>
> Does anyone know the formulae to calculate it?
>
> Thanks
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Oded wrote:
> of course:
> distance(<x,y,z> to <x1,y1,z1>) =
> __________________________
> / 2 2 2
> \/ (x - x1) + (y - y1) + (z - z1)
Gee, that looks nice in the variable-length font, but maybe you should've
aligned to the fixed-width font... :)
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Does the formula give the "hypotenuse" of a shape that looks like a doorstop or
is it a different shape?
Brendan
Ron Parker wrote:
> >Hi you all.
> >
> >To make a smooth animation, I'd like to measure the distance between two
> >points ( ie : distance between <2,3,4> and <7,-8,3>)
> >
> >Does anyone know the formulae to calculate it?
>
> The simple way, in POV script, is vlength(A-B) where A and B are the vectors
> you want the distance between. The formula actually used is
>
> sqrt( (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y)+(A.z-B.z)*(A.z-B.z))
>
> which is from the Pythagorean Theorem in three dimensions.
>
> --
> Ron Parker http://www2.fwi.com/~parkerr/traces.html
> My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Come on, it's povray. There's the easy way:
vlength(<2,3,4>-<7-8,3>)
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 10 Jul 2000 16:46:26 -0400, Andrea Ryan wrote:
>Does the formula give the "hypotenuse" of a shape that looks like a doorstop or
>is it a different shape?
It gives the length of the diagonal of the largest rectangular face on a
solid that looks like a doorstop (assuming you mean a wedge-shaped doorstop.)
That happens to also be the straight line that connects the two points.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10 Jul 2000 17:09:38 -0400, Warp wrote:
> Come on, it's povray. There's the easy way:
>
>vlength(<2,3,4>-<7-8,3>)
#macro DistanceBetweenPoints( A, B )
vlength(<0,0,0>+A-B)
#end
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <396### [at] global2000net>, Andrea Ryan
<ary### [at] global2000net> wrote:
> Does the formula give the "hypotenuse" of a shape that looks like a
> doorstop or is it a different shape?
It really just gives the hypotenuse of a 3D triangle...I sometimes think
of it as the line between the front-left-bottom corner and the
back-right-top corner of an axis-aligned box.
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |