PlotCurve

導入

v1.0

カテゴリ

アニメーション

詳細

オブジェクトの曲線をカーブにプロットします。 プロットされるカーブは、インター ポレーション(補間)によって作成される 3 次カーブです。

スクリプト構文

oReturn = PlotCurve( [InputObjs], Name, [StartFrame], [EndFrame], [StepFrame] );

戻り値

プロットされた NURBS CurveList を 1 つの X3DObjectXSICollection として返します。

パラメータ

パラメータ タイプ 詳細
InputObjs 文字列 プロットされる曲線を持つオブジェクトのリスト

デフォルト値: 現在の選択

Name 文字列 カーブ名
StartFrame Integer 最初にプロットするフレーム

デフォルト値: 0

EndFrame Integer 最後にプロットするフレーム

デフォルト値: 0

StepFrame Integer フレーム間のステップ

デフォルト値: 1

1. VBScript の例

'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

2. VBScript の例

' 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

関連項目

PlotShape CreateCurve