Hi,
I recently received the Non-Organic Surface Modeling DVD from Alias Wavefront. In the dvd a Peter Bakic discribes different techniques for modeling. In it he menions a tangent CV script of which I thought would be located within the dvd's tutorial or source material. Anyhow long story short, no script. I'm trying to make a tangent CV script that takes three selcetd cv's and moves the third cv to the center position of the first 2 cv's. So far this is what I understand.
x3 = (x2 + x1)/2
y3 = (y2 + y1)/2
z3 = (z2 + z1)/2
I need some assistance trnasforming this equation into a usable Mel script.
Using the following sniplet of code I'm able to find the value of each point, but I don't quite understand how to find the value of the first cv selected and apply it to a variable in order to process the equation.
xform -q -ws -t nurbsPlane1.cv[0][3] ;
xform -q -ws -t nurbsPlane1.cv[1][3] ;
xform -q -ws -t nurbsPlane1.cv[2][3] ;
I'm guessing I have to create some type of while loop to assign the value of a given axis to a variable to process the equation. Any direction anyone could offer would be great.
Thanks in advance.
Mike