You Are Here:

Community: Developer Discussion Boards

#1 Old normal path for a ball - 2006-06-21, 14:32

Join Date: Jun 2006
Posts: 1
saeed@adpdigital.com
Offline
Registered User
Dears
I want to move a ball from (x1,y1) to (x2,y2). but I need to ball's path look likes noram path same as real world,

also there are different LCDs in nokia phones.
I don't know how will I change the ball's x,y for moving from x1,y1, to x2,y2.

I appreciate any comments.

Saeed.
Reply With Quote

#2 Old Re: normal path for a ball - 2006-06-26, 21:36

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
What do you mean by normal? Parabolic curve (like throwing a ball)? Or friction slowing down a ball rolling on a surface?

It is possible to calculate the real world pysics in to the equation, it is just matter of what you are trying to achieve...

Hartti
Reply With Quote

#3 Old Re: normal path for a ball - 2006-07-17, 08:46

Join Date: Mar 2005
Posts: 8
Location: Palghar, Mumbai
Send a message via Yahoo to aadipa
aadipa
Offline
Registered User
I don't know what you want to do, but I have successfully done a tennis ball animation on mobile, which very close to real world animation.

1. Take a ball in 3D space
2. Apply diff. forces on the ball
3. Find out velocity and update position of ball
4. Take a projection to 2D space (viewport)
5. Display the ball on projected co-ordinates.

Hope this helps.
Reply With Quote

#4 Old Exclamation Re: normal path for a ball - 2006-07-19, 11:00

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
if the ball is thrown you can calculate the balls positions for a given time after start and a given strength (means a starting velocity) and a given alpha (starting angle counterwise beginning at 3 o'clock) with the following equation

x = strength * time * cos(alpha)
y = -(g/2) * t * t + strength * time * sin(alpha)

keep in mind that operating at pixels in steps (time) can result in a very different new position (delta is bigger than recognizable, e.g. ball jumps out of the view) or very small delta (smaller than 1 pixel, so that the movement is not recognizable too). use a clever time base - time step combination to avoid these.

keep in mind that midp 2.0 doesn't know floats, you have to hardly work around this fact for a midp 1.0 device

regards ray()
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
any idea about the path? how to add the "\" to the path? ipis General Symbian C++ 1 2005-11-27 22:08
can't find header in user os system path include stefano_campri General Symbian C++ 0 2005-10-27 15:49
GCC - file or path name too long mharries Symbian Tools & SDKs 0 2003-07-28 11:41
Internet Toolkit V3.1 and cookie path 69431S General Browsing 1 2003-04-10 15:03
nokia 7210 modem via IR doesn't work ! oussamaaiadi PC Suite API and PC Connectivity SDK 1 2003-03-06 11:46

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d184934X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ