Thread Subject: Finding volumes of tetrahedron?

Subject: Finding volumes of tetrahedron?

From: Rufus Worrell

Date: 7 Feb, 2008 19:45:04

Message: 1 of 6

Hey guys I know that finding the cross product of two
vectors can give you areas of parallelogram.

But if I had VERtices of (1,2,3) (4,5,6) (7,8,9) (2,5,1) how
would I find the volume of a tetrahedron with mat lab?
Thanks

Subject: Finding volumes of tetrahedron?

From: Bruno Luong

Date: 7 Feb, 2008 19:52:03

Message: 2 of 6

"Rufus Worrell" <hollywoodbatez@AOL.com> wrote in message
<fofn40$agb$1@fred.mathworks.com>...
> Hey guys I know that finding the cross product of two
> vectors can give you areas of parallelogram.
>
> But if I had VERtices of (1,2,3) (4,5,6) (7,8,9) (2,5,1) how
> would I find the volume of a tetrahedron with mat lab?
> Thanks

V = 1/6 *|det(V1,V2,V3)|

with
V1 := P2-P1
V2 := P3-P2
V3 := P4-P3

Bruno

Subject: Finding volumes of tetrahedron?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 7 Feb, 2008 19:57:33

Message: 3 of 6

In article <fofn40$agb$1@fred.mathworks.com>,
Rufus Worrell <hollywoodbatez@AOL.com> wrote:
>Hey guys I know that finding the cross product of two
>vectors can give you areas of parallelogram.

>But if I had VERtices of (1,2,3) (4,5,6) (7,8,9) (2,5,1) how
>would I find the volume of a tetrahedron with mat lab?

http://en.wikipedia.org/wiki/Tetrahedron#Volume_of_any_tetrahedron

  For a tetrahedron with vertices [...] the volume is [...]
  This can be rewritten using dot product and a cross product, yielding
  V = |(a-d) . ((b-d) x (c-d))| / 6
--
   "I was very young in those days, but I was also rather dim."
   -- Christopher Priest

Subject: Finding volumes of tetrahedron?

From: Rufus Worrell

Date: 8 Feb, 2008 12:44:02

Message: 4 of 6

"Bruno Luong" <b.luong@fogale.fr> wrote in message <fofnh3
$h5m$1@fred.mathworks.com>...
> "Rufus Worrell" <hollywoodbatez@AOL.com> wrote in message
> <fofn40$agb$1@fred.mathworks.com>...
> > Hey guys I know that finding the cross product of two
> > vectors can give you areas of parallelogram.
> >
> > But if I had VERtices of (1,2,3) (4,5,6) (7,8,9)
(2,5,1) how
> > would I find the volume of a tetrahedron with mat lab?
> > Thanks
>
> V = 1/6 *|det(V1,V2,V3)|
>
> with
> V1 := P2-P1
> V2 := P3-P2
> V3 := P4-P3
>
> Bruno

ok for another question i put this in mat lab >> P1 = [1 2
1]
P2 = [1 -3 4]
P3 = [2 3 5]
P4 = [2 -3 5]

V1 := P2-P1
V2 := P3-P2
V3 := P4-P3

V = 1/6 *|det(V1,V2,V3)|


V1 := P2-P1
V2 := P3-P2
V3 := P4-P3

P1 =

     1 2 1


P2 =

     1 -3 4


P3 =

     2 3 5


P4 =

     2 -3 5

but i get the error Undefined function or method 'V1' for
input arguments of type 'char'.

Subject: Finding volumes of tetrahedron?

From: Davide Ferraro

Date: 8 Feb, 2008 13:22:05

Message: 5 of 6

Why you are using := for a vector subtraction in Matlab. I
would use only =.
I think that this could be your error.




"Rufus Worrell" <hollywoodbatez@AOL.com> wrote in message
<fohiqh$cks$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.fr> wrote in message <fofnh3
> $h5m$1@fred.mathworks.com>...
> > "Rufus Worrell" <hollywoodbatez@AOL.com> wrote in message
> > <fofn40$agb$1@fred.mathworks.com>...
> > > Hey guys I know that finding the cross product of two
> > > vectors can give you areas of parallelogram.
> > >
> > > But if I had VERtices of (1,2,3) (4,5,6) (7,8,9)
> (2,5,1) how
> > > would I find the volume of a tetrahedron with mat lab?
> > > Thanks
> >
> > V = 1/6 *|det(V1,V2,V3)|
> >
> > with
> > V1 := P2-P1
> > V2 := P3-P2
> > V3 := P4-P3
> >
> > Bruno
>
> ok for another question i put this in mat lab >> P1 = [1 2
> 1]
> P2 = [1 -3 4]
> P3 = [2 3 5]
> P4 = [2 -3 5]
>
> V1 := P2-P1
> V2 := P3-P2
> V3 := P4-P3
>
> V = 1/6 *|det(V1,V2,V3)|
>
>
> V1 := P2-P1
> V2 := P3-P2
> V3 := P4-P3
>
> P1 =
>
> 1 2 1
>
>
> P2 =
>
> 1 -3 4
>
>
> P3 =
>
> 2 3 5
>
>
> P4 =
>
> 2 -3 5
>
> but i get the error Undefined function or method 'V1' for
> input arguments of type 'char'.
>

Subject: Finding volumes of tetrahedron?

From: Bruno Luong

Date: 8 Feb, 2008 15:10:04

Message: 6 of 6

"Rufus Worrell" <hollywoodbatez@AOL.com> wrote in message
<fohiqh$cks$1@fred.mathworks.com>...

> but i get the error Undefined function or method 'V1' for
> input arguments of type 'char'.
>

Sorry, I wrote a mathematical formula. You should of course
adapt it with correct MATLAB syntax like this:

V1=P2-P1;
V2=P3-P2;
V3=P4-P3;

V = abs(det([V1(:) V2(:) V3(:)]))/6

Bruno

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com