Re: can't translate 3D model to 0,0,0

On 5/3/08 at 6:18 AM, willpowers69@hotmail.com (will parr) wrote:

>I have a problem with translating some 3D models to 0,0,0. I have
>been using the following code:

>ma = Mean@a; ac = # + ({0, 0, 0} - ma) & /@ a;

>where "a" is a 3D model made up of many 3D coordinates. However,
>this code does not work - in that the new centroid (mean) of the
>model is not at 0,0,0. can anyone suggest an alternative method?

Your code is more complex than needed since

ac = # - ma&/@a is exactly equivalent to your expression for ac.

But having said that, there really isn't anything wrong with
your code. It should do exactly what you want.

readnews134 (1249)
5/5/2008 10:14:06 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 41