Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 24-10-2012 , 07:09 PM
Registered User
Join Date: Oct 2012
Posts: 1

Creating vertices

Hi

I'm a MEL noob, so be kind! I'm wondering whether it's possible to create vertices in Maya using a MEL script. I want to be able to use a mathematical formula (like x^2*(y-1)^2/x^2+y^2) to create a load of vertices and then join them together to form a surface.

From using Maya I know that most (if not all) complex objects are created using primitive objects and warping, joining, culling, etc. them to get the desired object. So would it be better to create a surface, say a plane, with regularly spaced grid-like vertices and then move them? Or can a create "points" and join them together somehow?

Any help appreciated, thanks

# 2 29-10-2012 , 05:40 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
You could probably use the'polyCreateFacet" command to create the starter face and use the 'polyAppendVertex' to keep extending the surface.

Code:
polyCreateFacet 
-constructionHistory on 
-texture 1 
-subdivision 1 
-point -14.000 0.000 -9.000
-point -14.000 0.000 9.000
-point 6.000 0.000 11.000
-point 2.000 0.000 -9.000 ;
The polyAppendVertex command is very similar. The values for the point flags is where your formula will come in I suppose and you could use a 'for' or 'while' loop to cycle the process.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 3 06-11-2012 , 04:04 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Since it's a 2d function, why not create a NURBS curve from it?


Imagination is more important than knowledge.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads