Ziye Liu's Blog
  • ( www.ziyeliu.com )
  • Home
  • Visual Effects Blog
    • Houdini >
      • Procedural Courtyard House
      • Procedural Music Animation
    • Maya - MEL >
      • MEL Rooftop Generator
      • MEL Circle of Spheres
    • Maya - Rendering >
      • Maya Render Premultiply Issue
      • Depth of Field and Bokeh
      • 3D Render - Match to a Real Object
      • RenderMan I
      • RenderMan II
    • Python >
      • Python Sampler Quilt
      • Motion Capture Data Parsing
      • Python and Turtle Graphics
  • Themes & Variations
    • The Film
    • Scene 1 - "Crazy Polka Dots"
    • Scene 2 - “Untitled”
    • Scene 3 - "Grapes"
    • Scene 4 - “Narcissus Garden”
  • 中文博客

Spiral Circle of Objects

Maya MEL Script

By Ziye Liu
M.F.A. Visual Effects, 2012
This is my first MEL script excercise. I would've never thought I could do this. Looking forward to see more progress.
What it does: generate an spiral array of spheres. 
Second Version
  • Add randomness.
  • Interface improvement.
April 14th, 2013
Picture

First Version
  • Basic loop that generates spiral.
for($i = 0; $i < $totalNum; $i++)
    {
        $r = $circleSize;
        $theta = $i * $circleAngle * (3.14159265358979323846 / 180);
        $x = ($r - $i * $out) * cos(deg_to_rad($theta)) + $xcenter;
        $y = ($r - $i * $out) * sin(deg_to_rad($theta)) + $ycenter;
        
        sphere -r $objectSize -p $x ($zcenter * $i) $y;
    }
Picture
Graphic User Interface (GUI) of the script.
www.ziyeliu.com
Digital Art, Visual Effects, Photography
©Ziye Liu, 2011 - 2019, All Rights Reserved