Physics and Programming language

In summary: It's very powerful and can be used for a variety of different tasks, from basic algebra to more complex curve fitting and mathematical modeling. It can take a bit of time to get used to, but it is definitely worth it. Additionally, there are a number of online resources available to help you learn more about the software.
  • #1
physicsnoob93
169
0
Ok well, i was just looking around for someone to give me a few tips or give me a "guide".

I really wanted to use programming with physics, to simulate or just to get to know how to apply what i know in physics and see how much i understand it to make applications.
I am not a very good programmer, i just learned a bit of visual basic before.

I want to know what you would recommend because i have a very rough course load in school.

I was thinking of C or C++ or Python out of which C++ appeals to me the most.

1. Is this possible?
2. Can it be done by a 14 year old?
3. If so, what should i do first, I'm completely lost.
 
Technology news on Phys.org
  • #2
If you think to learn C++ specifically with physics applications in mind (visualisations, etc) perhaps it is better to learn Java. Several advantages are:
  • It is easier to produce graphical output (C++ is text-only, getting graphics is "advanced" while in Java it is "basic" ==> even after a short learning time you have visually appealing results instead of text in a terminal, which is very stimulating)
  • The syntax of Java and C(++) is quite alike
  • Java is very strict (strict type-checking, safe memory management) while in C++ it is very easy to cause access violations, memory overflows, invalid address reads, and so on. This enforces good (as in: careful) programming. C++ allows you to be very sloppy and still have it compile, possibly teaching you bad habits.
  • Java is strongly object oriented, which is good to learn from the start
  • Java is cross-platform (you can even run it in an applet in your browser)

You can find some tutorials on the Internet and start playing around a bit. However, from own experience I can tell you, you will want to buy a good book. I can't recommend any for Java as I've never properly learned it, but after fooling around a long time with C++ I finally got my hands on a book which introduced general programming alongside the C++ syntax and features. Even nouw, though I hardly use C++ anymore, I still apply the programming techniques in there (specifically the object oriented approach).
 
  • #3
I would suggest using Python and, in particular, using the http://vpython.org" would be a good start, once you start to get the hang of Python as a programming language.
 
Last edited by a moderator:
  • #4
Python also has the numpy and scipy packages - excellent free maths libraries.
It's very easy to learn and is a more modern design, it's closer to what languages of the future will look like.
 
  • #5
Thanks for the replies guys.

I liked python so far. Vpython is quite amazing.
And i also think python should be easier to learn.
Correct me if i am wrong.

Any other recommendations?

Thanks

Utkarsh
 
  • #6
If you have the money or if you are at a school that gives access I would highly recommend Mathematica for scientific computation.
 

1. What is the relationship between physics and programming language?

The relationship between physics and programming language is that programming language is used to create simulations and models of physical phenomena. This allows scientists to study and understand complex physical systems without having to conduct expensive and time-consuming experiments.

2. How is programming language used in physics research?

Programming language is used in physics research to create simulations and models, analyze data, and solve complex equations. These tools allow scientists to test theories and make predictions about physical systems.

3. What are some examples of programming languages used in physics?

Some examples of programming languages used in physics include Python, MATLAB, and C++. These languages are popular because they have extensive libraries and packages specifically designed for scientific and numerical computing.

4. How does programming language help in understanding complex physical concepts?

Programming language helps in understanding complex physical concepts by allowing scientists to create visualizations and simulations of these concepts. This makes it easier to grasp and analyze complex ideas and phenomena.

5. What are the advantages of using programming language in physics?

The advantages of using programming language in physics include the ability to create accurate and detailed simulations, the ability to analyze large amounts of data, and the ability to easily share and reproduce results. It also allows for faster and more efficient research and can lead to new discoveries and advancements in the field.

Similar threads

  • Programming and Computer Science
Replies
8
Views
873
  • Programming and Computer Science
Replies
22
Views
2K
Replies
65
Views
3K
  • Programming and Computer Science
Replies
10
Views
3K
  • Programming and Computer Science
2
Replies
54
Views
3K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
Replies
6
Views
1K
Back
Top