MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


It should work but you can use a slightly simpler expression.

Of course, it always helps when posting to MathGroup to give an actual case 
that doesn't work rather than letting the responders make up their own 
cases.


pts = RandomReal[{0, 1}, {10, 3}]
mean = Mean[pts]

# - mean & /@ pts
Mean[%] // Chop

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"will parr" <willpowers69 at hotmail.com> wrote in message 
news:fvhe4g$3v9$1 at smc.vnet.net...
> Dear Math Forum,
>
> 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?
>
> best wishes,
>
> Will
> 



  • Prev by Date: Re: Identical elements
  • Next by Date: Question about alignment in Grid and TableForm
  • Previous by thread: Re: can't translate 3D model to 0,0,0
  • Next by thread: Re: can't translate 3D model to 0,0,0