expressions question 2004-05-25 - By alex dinnin
Back Thanks everyone for your help !!! Got it working a treat now !!! Alex
Graham D Clark <mail@(protected)> wrote: use getBBox to get the geometries min max values as diameter then use that value as diameter in the line where you apply your expression, or if you need the radius to animate over time (and the object has been frozen or has no radius parmeter) then afaik you'll need to make a scop for it. it gets a little trickier if you want to 'steer' your wheel too and have it roate correclty in any direction but animating the wheels on paths and using path percentage value to rotate can make that math a lot easier -- ---- ---- ---- ---- ---- -- http://www.grahamdclark.com 2nd hand TD
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of alex dinnin Sent: May 25, 2004 12:40 PM To: XSI@(protected) Subject: Re: expressions question
Am I correct in saying then, that if you have frozen the object !!! you can not use the radius ??? thanks for the help on this everyone....
Peter Twardo <peliosis_v2@(protected)> wrote:
Well, since the amount of rotation, depends on both : translation, and radius of an object, your expression could't work.
I hope this helps:
(Try changing radius of your cylinder or whatever if you havent frozen it)
' ******************************************
CreatePrim "Cylinder", "MeshSurface"
Rotate , 90, 0, 0, siAbsolute, siParent, siObj, siX
ResetTransform "cylinder", siCtr, siRot, siXYZ
InspectObj "cylinder.kine.local"
AddExpr "cylinder.kine.local.rotz"
SetExpr "cylinder.kine.local.rotz", "cylinder.kine.local.posx*-(360/(2*PI *cylinder.polymsh.geom.cylinder.radius))"
' ******************************
Peter
-- ---- ---- ---- ---- ---- ----- Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger -- ---- ---- ---- ---- ---- ----- Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger <DIV>Thanks everyone for your help !!! </DIV> <DIV> </DIV> <DIV>Got it working a treat now !!!</DIV> <DIV> </DIV> <DIV>Alex<BR><BR><B><I>Graham D Clark <mail@(protected)></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER -LEFT: #1010ff 2px solid"> <META content="MSHTML 6.00.2800.1170" name=GENERATOR> <DIV><SPAN class=334265114-25052004><FONT face=Arial color=#0000ff size=2>use getBBox to get the geometries min max values as diameter then use that value as diameter in the line where you apply your expression,</FONT>< /SPAN></DIV> <DIV><SPAN class=334265114-25052004><FONT face=Arial color=#0000ff size=2>or if you need the radius to animate over time (and the object has been frozen or has no radius parmeter) then afaik you'll need to make a scop for it.</FONT> </SPAN></DIV> <DIV><SPAN class=334265114-25052004><FONT face=Arial color=#0000ff size=2>it gets a little trickier if you want to 'steer' your wheel too and have it roate correclty in any direction but animating the wheels on paths and using path percentage value to rotate can make that math a lot easier</FONT>< /SPAN></DIV> <DIV><FONT face="Times New Roman">-- ---- ---- ---- ---- ---- --</FONT> <BR> <FONT face="Times New Roman"><A href="http://www.grahamdclark.com/">http://www .grahamdclark.com</A></FONT> <BR><FONT face="Times New Roman">2nd hand TD</FONT> </DIV> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>alex dinnin<BR><B>Sent:</B> May 25, 2004 12:40 PM<BR><B>To:</B> XSI@(protected)<BR><B>Subject:</B> Re: expressions question<BR><BR></FONT></DIV> <DIV>Am I correct in saying then, that if you have frozen the object !!! you can not use the radius ???</DIV> <DIV> </DIV> <DIV>thanks for the help on this everyone....<BR><BR><B><I>Peter Twardo < ;peliosis_v2@(protected)></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER -LEFT: #1010ff 2px solid"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE>
<DIV><FONT size=2> <P><FONT face=Arial>Well, since the amount of rotation, depends on both : translation, and radius of an object, your expression could't work.</FONT></P> <P><FONT face=Arial>I hope this helps:</FONT></P> <P><FONT face=Arial>(Try changing radius of your cylinder or whatever if you havent frozen it)</FONT></P> <P><FONT face=Arial></FONT> </P> <P><FONT face=Arial>' ******************************************</FONT></P> <P>CreatePrim "Cylinder", "MeshSurface"</P> <P>Rotate , 90, 0, 0, siAbsolute, siParent, siObj, siX</P> <P>ResetTransform "cylinder", siCtr, siRot, siXYZ</P> <P>InspectObj "cylinder.kine.local"</P> <P>AddExpr "cylinder.kine.local.rotz"</P> <P>SetExpr "cylinder.kine.local.rotz", "<STRONG>cylinder.kine.local.posx*-(360/ (2*PI*cylinder.polymsh.geom.cylinder.radius))</STRONG>"</P> <P>' ******************************</P> <P><FONT face=Arial></FONT> </P> <P><FONT face=Arial>Peter</FONT></P></FONT></DIV></BLOCKQUOTE> <P> <HR SIZE=1> <FONT face=arial size=-1>Do you Yahoo!?<BR>Friends. Fun. <A href="http:/ /messenger.yahoo.com/">Try the all-new Yahoo! Messenger</A></FONT></BLOCKQUOTE>< /BLOCKQUOTE><p> <hr size=1><font face=arial size=-1>Do you Yahoo!?<br>Friends. Fun. <a href= "http://messenger.yahoo.com/">Try the all-new Yahoo! Messenger</a>
|
|