POV-Ray : Newsgroups : povray.general : Matrices Server Time
11 Aug 2024 11:25:57 EDT (-0400)
  Matrices (Message 2 to 11 of 21)  
<<< Previous 1 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Lance Birch
Subject: Re: Matrices
Date: 3 Sep 1999 19:37:23
Message: <37d05bb3@news.povray.org>
>But Mr.POV, I can't multiply 4x3 matrices together!!!

Some matrices are non-conformable, so you can't multiply a 4x3 matrix by a
4x3 matrice but you can multiply a 4x3 by a 3x4.

For example:

a = [1, 2, 3]
b = [3, 5, 7]

You can multiply a by b because they're non-conformable matrices.
And also matrices are not commutative or associative under multiplication.

Or was that what you meant anyway?

--
Lance.


---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
For a totally different experience, visit my Chroma Key Website:
Colorblind - http://listen.to/colorblind


Post a reply to this message

From: Lance Birch
Subject: Re: Matrices
Date: 3 Sep 1999 19:47:13
Message: <37d05e01@news.povray.org>
>You can multiply a by b because they're non-conformable matrices.

LOL. *ahem*  CAN'T sorry... hehe

But then again your obviously already know all of what I just babbled
about... *looks at TI-81 matrix program*

--
Lance.


---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
For a totally different experience, visit my Chroma Key Website:
Colorblind - http://listen.to/colorblind


Post a reply to this message

From: Larry Fontaine
Subject: Re: Matrices
Date: 3 Sep 1999 19:48:25
Message: <37D05CAF.2317EEA8@isd.net>
Well it doesn't really matter because they're supposed to be 4x4 anyway and
those are multiplyable. Yes, I know, non-commutative blah blah blah I learned
that stuff last year. That's fairly obvious, though, because everybody whose
ever made a POV scene knows that rotate-translate is different from
translate-rotate.

Lance Birch wrote:

> >But Mr.POV, I can't multiply 4x3 matrices together!!!
>
> Some matrices are non-conformable, so you can't multiply a 4x3 matrix by a
> 4x3 matrice but you can multiply a 4x3 by a 3x4.
>
> For example:
>
> a = [1, 2, 3]
> b = [3, 5, 7]
>
> You can multiply a by b because they're non-conformable matrices.
> And also matrices are not commutative or associative under multiplication.
>
> Or was that what you meant anyway?
>
> --
> Lance.
>
> ---
> For the latest 3D Studio MAX plug-ins, images and much more, go to:
> The Zone - http://come.to/the.zone
> For a totally different experience, visit my Chroma Key Website:
> Colorblind - http://listen.to/colorblind


Post a reply to this message

From: Lance Birch
Subject: Re: Matrices
Date: 3 Sep 1999 19:53:40
Message: <37d05f84@news.povray.org>
That's true hehe

I've spent the last 6 months doing matrix stuff in Mathematics C.  Gets
fairly boring when you're given a test and you have to work out the
determinant of 2 3x3 matrices and then use them with Cramer's Rule to work
out the solutions to simultaneous equations, all by hand.  Soo sloooooww...

--
Lance.


---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
For a totally different experience, visit my Chroma Key Website:
Colorblind - http://listen.to/colorblind
Larry Fontaine wrote in message <37D05CAF.2317EEA8@isd.net>...
>Well it doesn't really matter because they're supposed to be 4x4 anyway and
>those are multiplyable. Yes, I know, non-commutative blah blah blah I
learned
>that stuff last year. That's fairly obvious, though, because everybody
whose
>ever made a POV scene knows that rotate-translate is different from
>translate-rotate.
>
>Lance Birch wrote:
>
>> >But Mr.POV, I can't multiply 4x3 matrices together!!!
>>
>> Some matrices are non-conformable, so you can't multiply a 4x3 matrix by
a
>> 4x3 matrice but you can multiply a 4x3 by a 3x4.
>>
>> For example:
>>
>> a = [1, 2, 3]
>> b = [3, 5, 7]
>>
>> You can multiply a by b because they're non-conformable matrices.
>> And also matrices are not commutative or associative under
multiplication.
>>
>> Or was that what you meant anyway?
>>
>> --
>> Lance.
>>
>> ---
>> For the latest 3D Studio MAX plug-ins, images and much more, go to:
>> The Zone - http://come.to/the.zone
>> For a totally different experience, visit my Chroma Key Website:
>> Colorblind - http://listen.to/colorblind
>


Post a reply to this message

From: John VanSickle
Subject: Re: Matrices
Date: 3 Sep 1999 20:28:08
Message: <37D06AE3.651D63A@erols.com>
Larry Fontaine wrote:
> 
> Just for anybody who maybe isn't familiar with this feature...

I have a whole page devoted to this, and it's fairly well-known
'round here.  You can find it at:

  http://users.erols.com/vansickl/matrix.htm

> You can use matrices in POV, and they're very useful because you can
> shear (only way to do so), and you can multiply them so you only have
> one transform statement in your object.
> Most of you probably knew that.

Yup.

> Format is:
>    matrix <Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Dx,Dy,Dz>
> Matrix transformations in POV:
>  shear x and y for z:
>    [  1    0    0  ]
>    [  0    1    0  ]
>    [  X    Y    0  ]
>    [  0    0    0  ]

The third row should read:

     [  X    Y    1  ]

> I made a TI-86 program to find POV-matrices. Just select the transform
> and enter the numbers. Maybe I'll post it.

Bah.  I do them in my head.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

From: Mike
Subject: Re: Matrices
Date: 3 Sep 1999 21:31:30
Message: <37D07476.3436F2E@aol.com>
> Just for anybody who maybe isn't familiar with this feature...
> You can use matrices in POV, and they're very useful because you can
> shear (only way to do so)

#include "colors.inc"

camera {location <0, 3, -10> look_at 0 angle 60}

light_source {<0, 5, -5> color 2*White}

//sheared box

box {<-1, -1, -1>, <1, 1, 1>
pigment {checker color White, color Black}
finish {ambient .1 phong 1 phong_size 40}

rotate 45*z
scale <2, 1, 1>
rotate -27*z

translate 2*x
}

//non-sheared box

box {<-1, -1, -1>, <1, 1, 1>
pigment {checker color Black, color White}
finish {ambient .1 phong 1 phong_size 40}

translate -2*x
}

plane {y, -1
pigment {color 0.5*White}
finish {reflection .5}
}

/* neener neener neener ;-) */


Post a reply to this message

From: Larry Fontaine
Subject: Re: Matrices
Date: 3 Sep 1999 22:01:24
Message: <37D07BD8.78953817@isd.net>
Mike wrote:

> > Just for anybody who maybe isn't familiar with this feature...
> > You can use matrices in POV, and they're very useful because you can
> > shear (only way to do so)
>
> #include "colors.inc"
>
> camera {location <0, 3, -10> look_at 0 angle 60}
>
> light_source {<0, 5, -5> color 2*White}
>
> //sheared box
>
> box {<-1, -1, -1>, <1, 1, 1>
> pigment {checker color White, color Black}
> finish {ambient .1 phong 1 phong_size 40}
>
> rotate 45*z
> scale <2, 1, 1>
> rotate -27*z
>
> translate 2*x
> }
>
> //non-sheared box
>
> box {<-1, -1, -1>, <1, 1, 1>
> pigment {checker color Black, color White}
> finish {ambient .1 phong 1 phong_size 40}
>
> translate -2*x
> }
>
> plane {y, -1
> pigment {color 0.5*White}
> finish {reflection .5}
> }
>
> /* neener neener neener ;-) */

I stand corrected. But note, you had to use two statements to do it, and
all other matrix transforms listed have their own POV statement.


Post a reply to this message

From: TonyB
Subject: Re: Matrices
Date: 3 Sep 1999 22:26:01
Message: <37D07442.DE361E75@panama.phoenix.net>
<clinton voice>   Hoowhee! I don't know wut you fellers are talkin' about, but
it sure sounds smart! =)  </clinton voice>

--
Anthony L. Bennett
http://welcome.to/TonyB

Non nova, sed nove.


Post a reply to this message

From: Tony Vigil
Subject: Re: Matrices
Date: 4 Sep 1999 03:12:13
Message: <37D0C892.17E75D3C@gte.net>
This is not completely true.  There is another way...  If you rotate your
object, then add it to a CSG, rescale the CSG, then rotate the CSG the
oposite direction of the first rotation the necessary amount - you do get a
sheared object!

Larry Fontaine wrote:

> Just for anybody who maybe isn't familiar with this feature...
> You can use matrices in POV, and they're very useful because you can
> shear (only way to do so)


Post a reply to this message

From: Charles
Subject: Re: Matrices
Date: 4 Sep 1999 14:02:33
Message: <37D15F17.77748C9D@enter.net>
Mike wrote:
> //sheared box
> 
> box {<-1, -1, -1>, <1, 1, 1>
> pigment {checker color White, color Black}
> finish {ambient .1 phong 1 phong_size 40}
> 
> rotate 45*z
> scale <2, 1, 1>
> rotate -27*z
> [...]

<g> Or, to be more precise, the final line should read...
rotate -z * atan2((sin(.25*pi)/2/cos(.25*pi)),1) * 180 / pi

Thank you. Armed with your sample POV code and a piece of
scratch paper, I was finally able to visualize what a shear
transformation was doing. Which in turn makes it easier to
make use of. :)


Charles
-- 
http://www.enter.net/~cfusner
"...Then darkness took me, and I strayed out of thought and time,
 and I wandered far on roads that I will not tell..." 
                              -The Two Towers, JRR Tolkien


Post a reply to this message

<<< Previous 1 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.