Results 1 to 2 of 2

Thread: Transforming a series of 3D points

  1. #1
    Oct 2012

    Transforming a series of 3D points


    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?

    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Sep 2012

    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: Aug 24th 2011, 11:35 AM
  2. Replies: 1
    Last Post: Feb 9th 2011, 10:52 AM
  3. Transforming Logs.
    Posted in the Pre-Calculus Forum
    Replies: 6
    Last Post: Jul 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: Oct 17th 2009, 07:52 AM
  5. Replies: 3
    Last Post: Jan 11th 2009, 11:49 AM

Search Tags

/mathhelpforum @mathhelpforum