Ideas for a physics based c program?

In summary, the conversation discussed ideas for a physics-based C program, specifically simulating the orbit of the Earth around the sun based on Newton's inverse square law. The suggestion was to calculate the orbit once per hour and aim for a stable orbit within one hour of the real one after 24*365+6 calculations. Other possibilities were also mentioned, such as creating an optical table or simulating falling circles or spheres.
  • #1
bigfoot100
4
0
I want to write a physics based c program but can't decide what to do it on any ideas?
 
Physics news on Phys.org
  • #2
How about accurately simulating/calculating the orbit of the Earth around the sun based on Newtons inverse square law, the mass of the Earth and sun, and a starting location/speed/direction for both the Earth and the sun. See if you can do a calculation once per hour and come back to about the same place in space (ie. a stable orbit to within one hour of the real one) after 24*365+6 calculations.

Sounds simple, contains a couple of hidden issues and opens up a lot of additional fun things to do.
 
  • #3
Make an optical table with mirrors, beam splitters etc. guiding a laser beam or pulse.

Or have circle (or spheres if you want 3D) fall into a box. See if you can get them to settle without too many defects.
 

1. What is a physics based c program?

A physics based c program is a computer program that uses the C programming language to simulate or model physical systems and phenomena. It utilizes mathematical equations and algorithms to accurately calculate and predict the behavior of these systems.

2. What are some ideas for a physics based c program?

Some ideas for a physics based c program include simulating the motion of objects under various forces, modeling the behavior of fluids and gases, creating simulations of electrical circuits, and creating interactive visualizations of complex physical systems.

3. What are the benefits of creating a physics based c program?

Creating a physics based c program allows for a deeper understanding of physical concepts and phenomena through interactive and visual representations. It also allows for the testing and prediction of various scenarios and can aid in problem-solving and decision-making in real-world applications.

4. Is C the best language for creating a physics based program?

C is a popular and efficient language for creating physics based programs due to its speed and ability to handle complex mathematical calculations. However, other languages such as Python and Java can also be used depending on the specific needs and requirements of the program.

5. Are there any resources available for learning how to create a physics based c program?

Yes, there are many resources available online for learning how to create a physics based c program. These include tutorials, online courses, and forums where you can ask for help and advice from experienced programmers. Additionally, there are books and other reference materials that can provide a comprehensive understanding of physics and programming concepts.

Similar threads

Replies
8
Views
527
  • Programming and Computer Science
Replies
4
Views
629
  • STEM Academic Advising
Replies
22
Views
1K
  • STEM Academic Advising
2
Replies
50
Views
4K
Replies
6
Views
366
  • STEM Academic Advising
Replies
3
Views
161
  • Engineering and Comp Sci Homework Help
Replies
3
Views
504
Replies
49
Views
3K
  • STEM Academic Advising
Replies
3
Views
783
  • Programming and Computer Science
Replies
1
Views
245
Back
Top