Results 1 to 2 of 2

Math Help - Transforming a series of 3D points

  1. #1
    Newbie
    Joined
    Oct 2012
    From
    Australia
    Posts
    1

    Transforming a series of 3D points

    Hi,

    I currently apply a matrix transform a series of 3D points (x,y,z), which is quite expensive in terms of processing time.
    Is it possible to transform just the extent points (I create a bounding box which encapsulates the points) and do some kind of linear interpolation to shift all the points without having to apply the transform to each of them?

    Thanks.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    3,661
    Thanks
    606

    Re: Transforming a series of 3D points

    Hey Shawn888.

    A matrix transformation (assuming you are just multiplying by a matrix) is really not that much. If the matrix has known co-effecients that is basically going to be the same computationally as a linear interpolation (a linear interpolation requires a vector addition and a scalar multiplication operation).

    But you have to know the direction vector and if you don't know this, you have to calculate it.

    A 3x3 matrix requires 3 lots of 3 dot products (one for each row in the final column matrix) and if you want, you can code up a very fast assembler routine in SSE2 that will get the best number of clock cycles, or you can get your GPU to do it on some really fast shared memory with the many of its vertex GPU cores (that will do many in parallel).

    If this is for a game engine, then you really should be doing as much as you can on the GPU anyway: but if you really need to do this in software, get an optimized assembler routine, and check the size of your SSE registers and create separate optimized routines for the different architecture specs and you should see an improvement.

    A final option is to get some library code that does this, or use an optimized compiler that can create code that is as close as the hand-written optimal code as possible.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 3
    Last Post: August 24th 2011, 11:35 AM
  2. Replies: 1
    Last Post: February 9th 2011, 10:52 AM
  3. Transforming Logs.
    Posted in the Pre-Calculus Forum
    Replies: 6
    Last Post: July 28th 2010, 02:52 AM
  4. Generating a fourier series for a collection of data points
    Posted in the Advanced Applied Math Forum
    Replies: 2
    Last Post: October 17th 2009, 07:52 AM
  5. Replies: 3
    Last Post: January 11th 2009, 11:49 AM

Search Tags


/mathhelpforum @mathhelpforum