Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Language)
Para:
Nmeros aleatorios
Fractales
1
Abrir MEL
2
3
MEL (Maya Embedded Language)
En el Script Editor.
File -> Open (O copiar y pegar el script en la
parte de abajo del Script Editor).
Seleccionar la parte del texto a ejecutar y
oprimir el botn:
4
Aleatorios.mel
sphere;
rename nurbsSphere1 a1;
select a1;
duplicate -rr;
for($i=1; $i<=9; ++$i) for($i=1;$i<=10;$i++)
duplicate -rr -st; {
$x = rand(1,1000);
select ("a"+$i);
for($i=1; $i<=10; ++$i) rotate $x $x $x;
{ select -d;
select("a"+$i); };
$x=rand(-5,5);
print $x;
print " ";
$y=rand(1,10);
print $y;
print " ";
$z=rand(-5,5);
print $z;
print "\r";
move $x $y $z;
select -d;
};
5
6
7
Aleatorios.mel
8
Mandelbrot.mel
parte 1/3
9
Mandelbrot.mel
parte 2/3
int $iter;
int $SIZE = 100; //number of spheres to be generated in x and y
float $LEFT = -2.0; //constant determining the left most co-ordinate
float $RIGHT = 1.0; //constant determining the right most co-ordinate
float $TOP = 1.0; //constant determining the upper most co-ordinate
float $BOTTOM = -1.0; //constant determining the lower most co-ordinate
10
for ($y = 0; $y < $SIZE; $y++) Mandelbrot.mel
if ($iter >= 0 && $iter <= 1){
{ sphere -p $x 0 $y -r 0.4; parte 3/3
for ($x = 0; $x < $SIZE; $x++) sets -e -forceElement lambert8SG;
{ }
$zr = 0.0; $zi = 0.0; if ($iter > 1 && $iter <= 2){
$cr = $LEFT + $x * ($RIGHT - $LEFT) / $SIZE;
sphere -p $x 0 $y -r 0.5;
sets -e
$ci = $TOP + $y * ($BOTTOM - $TOP) / $SIZE; -forceElement lambert7SG;
}
$rsquared = $zr * $zr;
$isquared = $zi * $zi; if ($iter > 2 && $iter <= 3){
sphere -p $x 0 $y -r 0.6;
Clculos con cada esfera
Plano 1/m
1/ m m 1/
13