Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Need Math Expert Help: Geometric Random Variable
  RSS 2.0 ATOM  

Need Math Expert Help: Geometric Random Variable
Rate this thread
 
51147
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 09 January 2011 07:55 PM

Hello,
I am trying to code the behavior of an object moving a certain distance from its present location along the X axis. The distance the object will travel is a geometric random variable with a mean of 15. How can I generate this number using MEL math and random number generators?



Replies: 1
/img/forum/dark/default_avatar.png

hi there,
could it be something like this?
your object.translateX=rand(1,15);

Author: mihoss

Replied: 09 January 2011 09:40 PM  
avatar

Unfortunately that would give a equal likelihood of any number between 1 and 15. A geometric distribution needs to center around a mean of 15 with 15 being the most likely. However, this is not a gaussian equation.  Thank you for replying thought.



Replies: 0