v1.0
Plots the trajectory of an object into a curve. The plotted curve is a cubic curve created by interpolation.
oReturn = PlotCurve( [InputObjs], Name, [StartFrame], [EndFrame], [StepFrame] ); |
Returns the plotted NURBS CurveList as an XSICollection of one X3DObject.
Parameter | Type | Description |
---|---|---|
InputObjs | String | List of objects whose
trajectories are plotted.
Default Value: Current Selection |
Name | String | Name of the curve. |
StartFrame | Integer | First frame to plot
Default Value: 0 |
EndFrame | Integer | Last frame to plot
Default Value: 0 |
StepFrame | Integer | Step between frames
Default Value: 1 |
'This example shows how to plot a curve from an animation NewScene , false 'Create a simple primitive and animate it. CreatePrim "Cone", "MeshSurface" SaveKey "cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 1 SetValue "PlayControl.Key", 50 SetValue "PlayControl.Current", 50 Translate , 5, 0, 0, siAbsolute, siParent, siObj, siX SaveKey "cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 50 SetValue "PlayControl.Key", 100 SetValue "PlayControl.Current", 100 Translate , 0, 0, 5, siAbsolute, siParent, siObj, siZ SaveKey "cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz", 100 'Plot from frame 0 t0 100 by step of 5. Creates curve MyPlot PlotCurve "Cone", "MyPlot", 0, 100, 5 |
' This example shows plotting curves on components (points) of an object. ' The curves create trails of each chosen component through space. NewScene , False ' Create an object for our example. set oObj = CreatePrim( "Torus", "MeshSurface" ) SetValue oObj & ".polymsh.geom.subdivu", 6 SetValue oObj & ".polymsh.geom.subdivv", 3 ' Put some animation on it. SaveKey oObj & "/kine.local.posx,kine.local.posy,kine.local.posz", 1 SaveKey oObj & "/kine.local.rotx,kine.local.roty,kine.local.rotz", 1 Translate oObj, 10, 9, 0, siRelative, siView, siObj, siXYZ SaveKey oObj & "/kine.local.posx,kine.local.posy,kine.local.posz", 50 LastFrame Translate oObj, 10, -9, 0, siRelative, siView, siObj, siXYZ SaveKey oObj & "/kine.local.posx,kine.local.posy,kine.local.posz", 100 Rotate oObj, -161, -434, -18, siAbsolute, siLocal, siObj, siXYZ SaveKey oObj & "/kine.local.rotx,kine.local.roty,kine.local.rotz", 100 ' Do the actual plotting of all the points in the mesh. ' Note: "Refresh" makes sure the animation is evaluated for the start ' frame, so we don't get trails from the "current" (end frame) position ' to the start position. FirstFrame refresh PlotCurve oObj & ".pnt[*]", "TorusPoints", 1, 100, 5 |