View Single Post
  #11  
Old 04-15-2005, 01:49 AM
The Goober The Goober is offline
Senior Member
 
Join Date: Oct 2004
Location: I am the threadkiller
Posts: 164
Default Re: Programming Question

Ah, I think I understand now. Its fuuny, because I'm actually due to start learning MEL for work soon.

If that rand() function with those arguments is giving you points randomly distributed within a box, then that is all its going to give you. The two points that you are specifying are actually the corners of the (axis-aligned) box - there is no way to use that function to generate points within a sphere. That is, I think what its computing is: p = rand(<x,y,z>,<x1,y,z1&gt returns a point p such that x<=p.x<=x1, y<=p.y<=y1, z<=p.z<=z1. I'm guessing here, but seems to make sense.

So am I correct that what you are looking for is a function that will randomly generate points within a sphere?
Reply With Quote