Plotting a surface

Plotting a surface

max_schoenherr
Advocate Advocate
1,069 Views
3 Replies
Message 1 of 4

Plotting a surface

max_schoenherr
Advocate
Advocate

Hi there, a while ago I did a tutorial about creating a circle with two equations: https://youtu.be/jt111bspge0

 

When I enter a function in, say, Wolfram Alpha, I get a plottet surface. sin(x)*tan(y) for example looks quite nice. How can I achieve this in Maya using expressions only? No MEL or Python scripting. Just wondering.

 

----Maximilian

0 Likes
Accepted solutions (1)
1,070 Views
3 Replies
Replies (3)
Message 2 of 4

max_schoenherr
Advocate
Advocate

Oh, by "plotting" I mean just the motion, for example of a locator in space.

0 Likes
Message 3 of 4

bradley_henke
Enthusiast
Enthusiast
Accepted solution

If I'm not mistaken, when you enter an expression on an attribute, you are actually creating an expression node which is in fact executing MEL code. You have access to special variables like "time" and "frame", and you can set numerical values by just using the nodeName.attribute syntax, rather than setAttr and getAttr commands, but apart from that, you are still just executing MEL. You can access the expression from Windows -> Animation Editors -> Expression Editor.

I'm still a bit confused by what you mean by "plotting" a surface. Your example sin(x) * tan(y) is a multivariable function, so it should produce a surface, not a line. You could set up an expression to give you the value of sin(x) * tan(y) on the z axis as you move the locator through space. Then you could animate the locator to move around the domain of x and y.

 

locator1.tz = sin(locator.tx) * tan(locator.ty);


Maya will not, however, generate a surface for you with an expression. 

0 Likes
Message 4 of 4

max_schoenherr
Advocate
Advocate

Hi, that's exactly what I needed. thanks! I'm now looking into how to create that surface. Or maybe a particle "carpet".

0 Likes