Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm working on a project that would help me calculate the ending position of a marble after traveling a series of physical structures. It would begin initially down a conic structure. I am absolutely an amateur but am interested in combining my interest in physics to learn computer programming. Is there an idea as to how one might go about such a project? I intend to run the models on my computer via recording of physical trial with the marble and cross compare until I am able to have the computer successfully predict the resulting location of the said marble.

Any input is appreciated, thank you!

What I have tried:

I am in the beginning stages of this project and am wanting to gain an professional understanding of the general framework for such a project
Posted
Updated 15-Nov-20 10:14am
Comments
Richard MacCutchan 15-Nov-20 14:59pm    
This all depends on the inputs to the project, i.e. how long does it take the marble to traverse each structure. Without that information you are shooting in the dark.

1 solution

You can make a lot of simplifications to make this problem solvable. For example, friction is a very complicated phenomenon. Simplify it to be a proportional to the velocity of the ball and consistent between materials. You can model the motion of the ball using standard physics equations for velocity and acceleration with friction taken into account in addition to the vertical slope of channel it is traveling in.

You can use a library like the Wykobi Computational Geometry Library[^] to calculate where the center of the ball will be while riding in the channel. Given the dimensions of a v-shaped channel and the radius of the ball, you can calculate the center point of the ball throughout its motion.

This all depends on how you model the physical structures the model will traverse. I like to combine mathematics and computer graphics (see my avatar and profile) and I would consider how the objects will be rendered in setting up the models. The modelling structure should accommodate both physics calculations and rendering.

I would structure the modelling to work in terms of time slices, as if you were rendering this as an animation. Movies are, generally, rendered at 24 FPS but you may want to target 30 or 60 Hertz meaning you will have a time slice of 33.3 or 16.7 mS. You could say, nah, we'll go with 20mS for 50Hz rendering so the numbers work out evenly. What ever. The point is, the whole simulation will start with the ball at an initial position in your physical structure. That is frame 1 of your animation. The next step in time will be 20mS later so calculate where the ball will be after 20mS of motion from an initial velocity of zero and the initial position. After 20mS the ball will have new poosition, velocity, and acceleration vectors and those will provide the initial conditions for the next time step's calculations. Continue this for as long as you want the simulation to run.

The calculations for motion down a straight v-shaped channel are fairly straight forward for the physics-inclined. It gets a bit trickier when the channel curves. There have to be some centrifugal deceleration effects accounted for in the curve so there are some challenges involved.

I hope that gives you some hints on how to approach this. A good 3D vector library will be essential. There are lots of them around. For my stuff I wrote my own but I don't recommend this approach. I wanted the learning experience and I found it to be quite valuable. Anyway, the first thing I would do is decide what development environment and language you want to use for this. There are lots and lots of good possibilities to choose from. Best of luck with it.
 
Share this answer
 
Comments
BillWoodruff 16-Nov-20 8:13am    
+5 Great answer !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900