Re: can't translate 3D model to 0,0,0
- To: mathgroup at smc.vnet.net
- Subject: [mg88417] Re: can't translate 3D model to 0,0,0
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Mon, 5 May 2008 06:11:01 -0400 (EDT)
On 5/3/08 at 6:18 AM, willpowers69 at 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.