Difference between pages "ReturnRandomVector" and "Rotate Objects by Concatenation"

From scripting
(Difference between pages)
Jump to: navigation, search
(Created page with " global proc vector returnRandomVector(float $Lower, float $Higher) { //Author Nick Pisca 0001d 2009 float $XVal = rand($Lower, $Higher); float $YVal = rand($Lower, $Higher...")
 
(Created page with " for ($x = 1; $x<91; $x++){ currentTime 1 setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate"); currentTime 260 ; setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate");...")
 
Line 1: Line 1:
  global proc vector returnRandomVector(float $Lower, float $Higher) {
+
  for ($x = 1; $x<91; $x++){
  //Author Nick Pisca 0001d 2009
+
   
  float $XVal = rand($Lower, $Higher);
+
  currentTime 1
  float $YVal = rand($Lower, $Higher);
+
setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate");
  float $ZVal = rand($Lower, $Higher);
+
currentTime 260 ;
  vector $CAPVec = <<$XVal, $YVal, $ZVal>>;
+
setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate");
  return $CAPVec;
+
 +
  float $randx = rand(-360,360);
 +
  float $randy = rand(-180,560);
 +
  float $randz = rand(-555,760);
 +
   
 +
rotate -r -os $randx $randy $randz ;
 
  }
 
  }
  
  
''More information on vectors and vector mathematics, read pages 14-16, 20-21 in [http://stores.lulu.com/nickpisca YSYT].  
+
''More information on attribute keyframing, read pages 119-122 in [http://stores.lulu.com/nickpisca YSYT].
 +
 
 +
 
 
[[Category:MEL]]
 
[[Category:MEL]]

Latest revision as of 19:58, 24 April 2017

for ($x = 1; $x<91; $x++){

currentTime 1
setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate");
currentTime 260 ;
setKeyframe -breakdown 0 ("nurbsSphere"+$x+".rotate");

float $randx = rand(-360,360);
float $randy = rand(-180,560);
float $randz = rand(-555,760);

rotate -r -os $randx $randy $randz ;
}


More information on attribute keyframing, read pages 119-122 in YSYT.