comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: matrix operation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: matrix operation [message #74072] Tue, 28 December 2010 12:09
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 23 Dez., 17:08, Gray <grayliketheco...@gmail.com> wrote:
> On Dec 23, 10:50 am, Paolo <pgri...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> For large values of N, the methods you mentioned are likely
>> to be slower then a simple addition/multiplication combo.
>
>> x'=a1*x+b1*y+c1*z+d1
>> y'=a2*x+b2*y+c2*z+d2
>> z'=a3*x+b3*y+c3*z+d3
>
>> Ciao,
>> Paolo
>
>> On Dec 23, 9:39 am, Gray <grayliketheco...@gmail.com> wrote:
>
>>> Hi all,
>
>>> I'm just getting really confused about how to do this properly.  Can
>>> you all help?
>
>>> I have a list of x y coordinates, and I want to perform an affine
>>> transformation on them, so I have a 3xN array of (xi,yi,1) and a 3x3
>>> matrix for my transformation, and I want to end up with a 3xN array of
>>> (x'i,y'i,1).  How can I transform all my coordinates at once?  I know
>>> my tools are #, ##, transpose/reform, and matrix_multiply, but I seem
>>> to be chronically unable to sort this out.  Thanks!
>
>>> --Gray
>
> Well... I guess that makes sense.  :)

Hi,
are the inbuilt routines like t3d, poly_2d and /or poly_warp not
useful? Did they crash for large matrices?

Cheers

CR
Re: matrix operation [message #74099 is a reply to message #74072] Thu, 23 December 2010 08:08 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Dec 23, 10:50 am, Paolo <pgri...@gmail.com> wrote:
> For large values of N, the methods you mentioned are likely
> to be slower then a simple addition/multiplication combo.
>
> x'=a1*x+b1*y+c1*z+d1
> y'=a2*x+b2*y+c2*z+d2
> z'=a3*x+b3*y+c3*z+d3
>
> Ciao,
> Paolo
>
> On Dec 23, 9:39 am, Gray <grayliketheco...@gmail.com> wrote:
>
>
>
>
>
>
>
>> Hi all,
>
>> I'm just getting really confused about how to do this properly.  Can
>> you all help?
>
>> I have a list of x y coordinates, and I want to perform an affine
>> transformation on them, so I have a 3xN array of (xi,yi,1) and a 3x3
>> matrix for my transformation, and I want to end up with a 3xN array of
>> (x'i,y'i,1).  How can I transform all my coordinates at once?  I know
>> my tools are #, ##, transpose/reform, and matrix_multiply, but I seem
>> to be chronically unable to sort this out.  Thanks!
>
>> --Gray

Well... I guess that makes sense. :)
Re: matrix operation [message #74100 is a reply to message #74099] Thu, 23 December 2010 07:50 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
For large values of N, the methods you mentioned are likely
to be slower then a simple addition/multiplication combo.

x'=a1*x+b1*y+c1*z+d1
y'=a2*x+b2*y+c2*z+d2
z'=a3*x+b3*y+c3*z+d3


Ciao,
Paolo

On Dec 23, 9:39 am, Gray <grayliketheco...@gmail.com> wrote:
> Hi all,
>
> I'm just getting really confused about how to do this properly.  Can
> you all help?
>
> I have a list of x y coordinates, and I want to perform an affine
> transformation on them, so I have a 3xN array of (xi,yi,1) and a 3x3
> matrix for my transformation, and I want to end up with a 3xN array of
> (x'i,y'i,1).  How can I transform all my coordinates at once?  I know
> my tools are #, ##, transpose/reform, and matrix_multiply, but I seem
> to be chronically unable to sort this out.  Thanks!
>
> --Gray
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Hodograph plots of wind speed and direction
Next Topic: Convolving a vector with the 2nd derivative of a Gaussian

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:52:04 PDT 2025

Total time taken to generate the page: 0.00588 seconds