Click here to Skip to main content
15,917,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i am new to c++, i've got only little experience in programming. For 1 year i have programmed in java.

I want to create a small Simulation where a Laser (a Line) hits a Cylinder and is reflected.
The problem is i am overwhelmed by the big number of possibilities. I read an article about GDI+, but it was 10 years old. I don't want to work with outdated packages, because i might need it for complexer tasks.

So my question is: Which package should i use?
Posted
Comments
Code-o-mat 15-Apr-12 4:52am    
A cylinder? Are you talking 3D? You want to work in 3D?
_Tom_ 15-Apr-12 5:05am    
Sorry, i forgot to mention. It will be in 2D, the cylinder should be shown as a circle.
[no name] 15-Apr-12 6:00am    
"I don't want to work with outdated packages,"
What is your end goal. Are you for example wanting to get into simulation in a bigger way or gaming or 3d modelling for example?
_Tom_ 15-Apr-12 6:37am    
I am studying physics in the 2nd semester. We have to do small projects. My goal is to get used to work with C++ and other programming languages.
It is important to visualize the theory, so i try to gather some knowledge in this area.

I will try Python as nv3 suggested.
Aescleal 16-Apr-12 6:02am    
I'd try matlab first, if you intend to end up as a practicing scientist then it's a lot better thing to know than (my beloved, sniff, sniff) C++.

Having said that Python's great for quick and dirty code.

And can you mark nv3's solution as answering the question? Especially if you're following is suggestion.

1 solution

Hello Tom!

GDI+ is in now way outdated, in fact its predecessor - the Windows GDI (Graphics Device Interface) - is still in use.

However, using elementary C++ and GDI+ to do 2D or 3D modelling is a relatively hard work, though possible. If you want to look for a relatively easy solution for modelling the light paths of a laser and reflections on a cylinder, I would recommend you to look into packages like

- Matlab (it costs)
- Python / Spyder (free and also very good)

With just a few lines of code you can model what you need and graphics part is thanks to the libraries almost done in a couple minutes.
 
Share this answer
 
Comments
_Tom_ 15-Apr-12 6:38am    
We've got Matlab at our university, but i will try Python first. Thank you!
Aescleal 16-Apr-12 6:03am    
Good suggestions, especially if he or she wants to be a scientist and not a software engineer.
nv3 16-Apr-12 7:01am    
Thank you!

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