I'm using VB6 and I have made a baseball game where a flyball at times will fly to the outfield. I also have a shadow for the ball. I need to make the arcing ball and the shadow that runs along the ground, converge at the point where the ball strikes the ground. I simply can't get this formula right. The shadow should simply travel the same velocity as the ball for the same amount of time, but without a vertical component. Pretty sure there's Sin etc involved, but I just can't seem to find the right application of it. Can someone provide me with a resource or the detailed mathematical formula to solve this problem?
Here is a link to a JPG drawing of the problem:
http://www.jazjef.com/NSU/ball%20arc%20and%20shadow.jpg
Many thanks for any assistance...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Answer

Answer

Processing your response...

Discuss This Question: 2 Replies

There was an error processing your information. Please try again later.

Thanks. We'll let you know when a new response is added.

Please enter a reply.

Send me notifications when members answer or reply to this question.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

(I assume you intend 3D.) There is a line that can be drawn from wherever the ball is to wherever the sun is. When extended to the ground, the line will mark the position of the shadow.The sun is so far away that angle of the line relative to the ground appears to be the same throughout the entire flight of the ball. So you can imagine that the line moves along with the ball and always points up/down at the exact same angle.A result is that a 'realistic' shadow can travel across the ground much farther than the ball. That is, assuming the ground is along the X and Y axes (and Z is vertical), a pop-up could show the ball going straight up with X & Y remaining constant and Z increasing then decreasing. At the same time, the shadow will be moving in the X and/or Y directions with Z remaining constant. At all times, you can imagine a line through the ball up to the sun and down to the ground. The angle of the line never changes.The height of the sun can always be computed as Z(ball) + 1. I.e., as the ball rises and falls, the {imaginary} sun moves in concert. And the sun's X/Y coordinates will depend on what time of day you want the shadow to represent. Those coordinates will always also be relative to the ball's X/Y coordinates. I.e., as the ball moves over the ground, the sun moves in the exact same way but at some angle off from the ball.The resulting line to the ground touches the shadow.If any of that makes sense, we might work out an efficient formula.Tom

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Reply

Processing your reply...

Ask a Question

Question Title:(150 char. limit.) Question:(Please be specific.)

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Donâ€™t miss out on this exclusive content!

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Follow

Thanks! We'll email you when relevant content is added and updated.

## Discuss This Question: 2 Replies

REGISTER or login: