Complete Maya Programming, Vol. II: An In-Depth Guide to 3D by David Gould

By David Gould

David Gould's acclaimed first publication, whole Maya Programming: an in depth consultant to MEL and the C++ API, offers artists and programmers with a deep knowing of ways Maya works and the way it may be improved and customised via programming. In his new e-book David deals a steady, intuitive advent to the middle principles of special effects. each one suggestion is defined steadily and is totally carried out in either MEL and C++ in order that an artist or programmer can use the resource code without delay of their personal courses. Geometry and modeling are lined intimately with increasingly more complicated examples demonstrating all of Maya's attainable programming positive aspects. David Gould's first quantity is extensively considered as the main authoritative reference on Maya programming. quantity II keeps this custom and gives an unrivaled advisor for the artist and programmer tackling advanced initiatives. * Covers a spectrum of themes in special effects together with issues and vectors, rotations, changes, curves and surfaces (polygonal, NURBS, subdivision), and modeling.* deals insights to Maya's internal workings in order that an artist or programmer can layout and enhance personalized instruments and solutions.* Discusses challenge fixing with MEL (Maya's scripting language) and the extra robust and flexible C++ API, with lots of code examples for every.

Show description

Read or Download Complete Maya Programming, Vol. II: An In-Depth Guide to 3D Fundamentals, Geometry, and Modeling (Morgan Kaufmann Series in Computer Graphics and Geometric ... Morgan Kaufmann Series in Computer Graphics) PDF

Similar geometry and topology books

Plane Geometry and its Groups

San Francisco 1967 Holden-Day. octavo. , 288pp. , index, hardcover. positive in VG DJ, a couple of small closed tears.

Extra info for Complete Maya Programming, Vol. II: An In-Depth Guide to 3D Fundamentals, Geometry, and Modeling (Morgan Kaufmann Series in Computer Graphics and Geometric ... Morgan Kaufmann Series in Computer Graphics)

Sample text

All of the coordinates are squared, then summed. The square root of the result is the length of the n-dimensional vector. 6ot MEL VECTOR To calculate the length of a vector, use the mag command. vector float $v$1ength -- mag( $v )- If you need to calculate the length of a 2D vector, the hyp0t command can be used. 4, $1ength = h y p o t ( print $1ength. y ). 188449 FLOAT A R R A Y To calculate the length of a vector as a float array, use the following procedure. proc f l o a t len( { return sqrt( float $v[] $v[O]*$v[O] ) + $v[1]*$v[1] + $v[2]*$v[2] } The following is an example of use of this procedure.

The length of vector c is simply the dot product of the vectors a and b. fi)b DISTANCE TO LINE This same method can be used to calculate the perpendicular distance from a point p to a line, running through the points p0 and p l . 6, the length of vector d is the distance from the vector a to its projection on the vector b. The vector a is calculated as follows. a=p-pO Vector b is used to represent the line. It is normalized to ensure that it has a unit length. b=pl-pO b = normalize(p1 - pO) As shown previously, the vector c is A A c = (a-b)b The vector d is d--ame = a- A A (a.

5, // Initialized as ( 4 . 2) Although the vector data type is convenient for performing vector operations, many of Maya's MEL commands and procedures don't support vector operations. For instance, a quite common task is getting the position of a transform. 0 onward, it is valid to explicitly assign this array of three scalars to a vector as follows. translate'. In earlier versions of Maya, this would have caused an error. In all versions it isn't possible to directly assign a vector to an attribute.

Download PDF sample

Rated 4.51 of 5 – based on 39 votes