掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
速度を時間的に変化するには? (ID:6660)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
procedure TaThread.Execute; var i : integer; Page : integer; CoordBuff1 : array[0..249,0..1] of double; HalfWd, XOffset, YOffset : integer; move : double; x,dt,T,a :real; ix :integer; begin //Load the coordinates buffers with a random set of coordinates. for i := 0 to 249 do begin CoordBuff1[i][0] := random(HalfWd); CoordBuff1[i][1] := random(HalfWd); end; //cycle through loop changing each dots coordinates slightly then redrawing the //dots onto a different page. Page := 0; repeat for i := 0 to 249 do begin x := 0; dt := 1; a := 9.8; T := 0; ix := Round(x); T := T + dt; move := a*T ; x :=a*T*T/2 ; if random > 0.5 then CoordBuff1[i][0] := CoordBuff1[i][0]+move else CoordBuff1[i][0] := CoordBuff1[i][0]+move ; //Check the dot is still on the screen. if CoordBuff1[i][0] > HalfWd then CoordBuff1[i][0] := CoordBuff1[i][0] - HalfWd; if CoordBuff1[i][0] < 0 then CoordBuff1[i][0] := CoordBuff1[i][0] + HalfWd; end; //ここでアニメ作製 //Toggle the value in the page parameter. Page := 1-Page; until (Terminated = TRUE); end; という感じでもともとは動きが定義されています。これにタイマーを加えて時間的に速度が変化するようにしたいのですがわかりますか? 初心者なので、自分でプログラムを見ていても具体的にこれが何を示しているのかといったことがわかりません。 ちなみに、アニメーションというのはランダムドットです。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.