?
Solved

Snooker Physics Problem

Posted on 2003-03-28
10
Medium Priority
?
533 Views
Last Modified: 2013-12-26
I have the cue ball on my snooker table. The Cue tip rests at the cue ball, and the user swings the cue round wth the mouse. Now, the velocity exerted on the cue ball by the cue is directly through the centre of the cueball, given an angle theta that the cue is around the ball in the XZ plane, how do i represent the velocity vector? This is my current calculation, and through a process of guesstimation, ive tried different COS/SIN combinations and still dont get anything sensible.

cueball.set_velocity_x(sin(cue.angle*DEG2RAD));
cueball.set_velocity_z(cos(cue.angle*DEG2RAD));
0
Comment
Question by:gobbo18uk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 8226949
How do you get cue.angle?
0
 
LVL 1

Author Comment

by:gobbo18uk
ID: 8227043
cue.angle is obtained from the mouse. As the user moves left or right, the cue swings around the cue ball. It is also clamped between 0 and 360 degrees.
0
 
LVL 1

Author Comment

by:gobbo18uk
ID: 8227085
If you would like a visual idea of what I mean, please visit my site, then under the uni-work section from the menu bar, select the snooker simulation and there is a screenshot.

http://www.steve-chamberlain.co.uk/

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:NeilNeilOrangePeel
ID: 8227446
I think u want to use x = cos(theta) - sin(theta), y = sin(theta) + cos(theta)
0
 
LVL 1

Author Comment

by:gobbo18uk
ID: 8230055
I have tried that but the result does not seem to be correct. I am also (for the time being) discounting the Y-axis as a simplification to my system (i.e. the balls are confined to the XZ plane and you cannot do a 'jump' trick shot). Thanks for the input though.
0
 

Accepted Solution

by:
NeilNeilOrangePeel earned 150 total points
ID: 8231585
sorry If the snooker table is in the x-z plane I meant:
x = cos(theta) - sin(theta), z = sin(theta) + cos(theta)
0
 
LVL 84

Expert Comment

by:ozo
ID: 8232002
what did you get when you tried
cueball.set_velocity_x(sin(cue.angle*DEG2RAD));
cueball.set_velocity_z(cos(cue.angle*DEG2RAD));
?
what did you use for cue.angle and DEG2RAD?
0
 
LVL 1

Expert Comment

by:Hermetic
ID: 8236604
This is going to sound like a bunch of silly questions, but based on your description, I can't think of anything else to add. (sounds like it should work)

What level of detail are the cueball velocity and cue angle numbers stored in? (float or double)

Are you sure that you have stored the cue angle in degrees?

Are you sure that the sign is correct for your velocity equations?

Are you sure you have the correct conversion for cue angle in DEG2RAD?

What do you mean by sensible? (completely wrong or a little off)
0
 
LVL 1

Author Comment

by:gobbo18uk
ID: 8236927
The velocity and angle are stored as floats.

The angles is stored in degrees, and the conversion to radians is correct.

I am now sure that :

x = cos(theta) - sin(theta)
z = sin(theta) + cos(theta)

is the correct answer and will accept this as the answer, it provides 'correct' results, i.e the ball moves at the same speed in any direction, as opposed to when it was moving very fast in one direction then just slipping in another direction. However I still have some problems, but i can sort those out in due course.

0
 

Expert Comment

by:froobly
ID: 8770357
Sorry to dig up a dead topic, but the accepted solution sounds completely wrong.  I think that the problem is that you're not multiplying cos(theta) or sin(theta) by the speed of the cue.

The equation should be Vx = speed*cos(theta); Vy = speed*sin(theta);

If this doesn't work, then it means that you're giving this function incorrect values for speed and theta.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question