JavaWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JavaWorld@TW » Java ME、Google Android 平台與 JavaCard 討論區 » Android  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 鐘擺效果
marudidi





發文: 70
積分: 0
於 2010-03-12 18:11 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問如何畫出圖片鐘擺來回晃動(弧形軌跡)的效果
並且知道X Y座標的位置
謝謝


vote up 0 vote down
reply to postreply to post
作者 Re:鐘擺效果 [Re:marudidi]
koji

秒速5センチメートル

站長

發文: 7580
積分: 19
於 2010-03-13 00:18 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
啥意思?

你是希望要個公式嗎?找個圓的算法呢?

koji


vote up 0 vote down
koji edited on 2010-03-14 09:37
reply to postreply to post
Facebook上的TWJUG社團,歡迎加入
作者 Re:鐘擺效果 [Re:marudidi]
snowifox





發文: 133
積分: 1
於 2010-03-16 23:17 user profilesend a private message to usersend email to snowifoxreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
marudidi wrote:
請問如何畫出圖片鐘擺來回晃動(弧形軌跡)的效果
並且知道X Y座標的位置
謝謝

一般的圖形圓形時鐘的指標你會畫嗎?
秒鐘一秒跳一格,從20秒擺到40秒,再擺回來,
粗糙的第一版原型就算做出來了吧,
然後再細緻的調囉~


vote up 0 vote down
reply to postreply to post
作者 Re:鐘擺效果 [Re:marudidi]
iloveimy1





發文: 34
積分: 0
於 2010-03-29 23:20 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
鐘擺 是一個以鐘擺長度為半徑的圓弧 只是角度略小 正負30度效果就不錯

x y 位置的公式為
X = 中心點X + 半徑 * SIN( 角度)
Y = 中心點Y + 半徑 * COS( 角度)

接下來動畫就是 角度變化,就會有鐘擺的效果了

國中物理有說過 鐘擺來回一次 是一秒鐘,不管擺動的幅度為多少,都是1秒鐘
提供你參考。


vote up 0 vote down
reply to postreply to post
Android學習心得
軟貓玩具
http://toimy.blogspot.com/
作者 Re:鐘擺效果 [Re:marudidi]
weber





發文: 88
積分: 0
於 2010-03-31 11:51 user profilesend a private message to usersend email to weberreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
最難的地方, 應該是在於考慮地心引力的加速度之後的
速度及位置的計算,例如,
在兩端的最上方, 其速度是零, 在最下方, 其速度最大。
以 "單擺運動" 為關鍵字查詢, 應可找到相關的公式。


vote up 0 vote down
reply to postreply to post

» JavaWorld@TW »  Java ME、Google Android 平台與 JavaCard 討論區 » Android

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JavaWorld@TW


Powered by Powerful JuteForum® Version Jute 1.5.8
Copyright© 2002-2003 Rainman Zhu,Zua,Netboy,Scott. All Rights Reserved.