×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# need a programming language for simple geometrical simulation

## need a programming language for simple geometrical simulation

(OP)
I would like some suggestions as to which programming language to use for a simulation project.

I'm trying to simulate a new type of associative computer memory, which may or may not be implemented as a neural network. I want to be able to show simple geometrical objects moving around on the screen in simulation, like spots, lines, and squares, probably only in 2 dimensions, but I will need colors. I'm anticipating storing the points that describe these geometrical objects in arrays. The objects don't have to move particularly fast, but since I plan to film the results and post them on YouTube, they should be fast enough and solid to look visually interesting/convincing.

I am using Windows Vista. I know only the basics of Linux, but I suppose I could learn more Linux if necessary since there is no real deadline on this project. I have decades of programming experience and I know many languages like C++, Java, MATLAB, Scilab, CLIPS/JESS, Pascal, and BASIC.

One coworker told me that he would use MATLAB for such a project, when I told him what I was trying to do. I cannot afford MATLAB, but Scilab is free and almost the same, so that sounds like the best language for me at the moment, *if* his advice about MATLAB is good. However, as far as I know, such graphical simulation capability is not available in Scilab, despite some impressive videos on YouTube that do not describe how their Scilab programs are interfacing, or how they are working/plotting, so I am wary of starting a huge project in Scilab if I'm not sure it would do what I want.

Any suggestions?

### RE: need a programming language for simple geometrical simulation

I know people who have linked Matlab to a graphical simulation, but I'm sketchy as to the exact details.  Both VC++ and Visual Basic have their forms, which could be manipulated.

You might get more help for the latter two languages at http://www.tek-tips.com/index.cfm

### RE: need a programming language for simple geometrical simulation

If you can run Crysis at 60fps on a desktop computer written in (mostly) C/C++, and you already know it well, why fight it?

Dan - Owner
http://www.Hi-TecDesigns.com

### RE: need a programming language for simple geometrical simulation

Have you looked at COGO (aka Coordinate Geometry)?

In lieu of C++ you might look at Delphi... a Pascal like language.

Dik

### RE: need a programming language for simple geometrical simulation

(OP)
Thanks for all the suggestions. I'm totally unfamiliar with Crysis and COGO and Delphi, but I'll take a look into those. I've never tried Visual BASIC but I'm sure I'd find it easy since I knew BASIC very well at one time. I forgot to mention that I do have a copy of Microsoft Visual Studio, even though I can't afford any new software now. That has C++ and I believe Java and Visual BASIC, though I haven't tried the latter two on it. Also, this is a personal project to try out an idea, not a work project or school project, so I can't get funding for it, which is why I need free or close to free software.

### RE: need a programming language for simple geometrical simulation

If you have VS, then you have both VB and VC++, both of which have "forms" upon which you can put graphical objects and move them around, etc.  Worst comes to worse, you can do similar things in Excel with VBA.  I've created a mock display with controls, and you can click butttons, and make different images appear on the mock display, etc.

### RE: need a programming language for simple geometrical simulation

Well, I see that Python is not part of your arsenal...but I am going to suggest because is totally free along with all its powerful modules for 2D and 3D visualization and simulation, etc.

A couple of years ago, I co-worker wanted to develop a little graphical program to coaching soccer...so, I found Visual Python

http://www.vpython.org/

and thanks to the ease of programming and the examples, I had something rather impressive just over a weekend.

### RE: need a programming language for simple geometrical simulation

#### Quote:

Worst comes to worse, you can do similar things in Excel with VBA.

Why "worst comes to worse"?

For someone familiar with Basic and wanting to do some simple graphics with minimum expenditure and hassle it seems the obvious choice.

Some examples of animations produced in Excel with little or no programming:

http://www.excelhero.com/blog/2011/06/excel-dancing-pendulums.html

http://newtonexcelbach.files.wordpress.com/2011/06/dp.gif

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

(OP)
I don't have Microsoft Office (I can't afford it), so I would have to use Open Office for anything like Excel, and I don't know about their compatibilities and interfaces, which might be different than Microsoft's. Still, that's a good idea, and I can look in it. Also, although I reinstalled my copy of VS this week, I have only Visual Studio 6.0, which is largely incompatible with Vista, so (per Internet information) in practice I can use only C++ and Visual Basic in VS, not Java (J++), on this OS and computer. (I can't afford the $500+ upgrade to Visual Studio 2010 for Vista.) Yesterday one person told me that Eclipse is a free Java environment, which is another option for me. ### RE: need a programming language for simple geometrical simulation How about writing it in javascript using raphael (http://raphaeljs.com/). Javascript is free, it will run on any browser. Raphael is just a VML/SVG front end. It works out whether you are using IE or some other browser and calls the appropriate routines. The only drawback is that it is a bit slow but given that you want to put it on the net, why not just write it for the net. The nice thing about this is you don't need a compiler and you can run it on any OS as long as it has a browser that supports javascript. As for editors, any editor will do. ### RE: need a programming language for simple geometrical simulation MS offers a free version of all of their dev tools... you will miss out on things like internet and database development, but it doesn't sound like that would matter. I have to question any serious engineering project that has the odd specs you're listing, as well as posting the results on YouTube... Dan - Owner http://www.Hi-TecDesigns.com ### RE: need a programming language for simple geometrical simulation It should be possible to do what you want in Open Office, but I haven't tried it, so I can't guarantee it. Java is free, and there are several free development environments for it, including Eclipse. Javascript is also free, and may well be the best option for what you want. This link: http://newtonexcelbach.wordpress.com/2011/06/24/yet-more-pendulums/ has a link to a Javascript file for animated pendulums, and also a link with a discussion on the source code. Might be a good place to start. Doug Jenkins Interactive Design Services http://newtonexcelbach.wordpress.com/ ### RE: need a programming language for simple geometrical simulation Matlab, Java, scilab, or dev C++ with OpenCV all should work just fine, particularly if you have decades of programming experience. dev C++ with OpenCV is free. Fe ### RE: need a programming language for simple geometrical simulation Forgot to mention OCTAVE .. Fe ### RE: need a programming language for simple geometrical simulation Get MS Visual C# 2010 Express (free) and try out WPF Animation on a Windows Form application. Plenty of tutorials out there to get some simple animation happening and C# should be simple to pick up if you've used C++ and Java before. Or, as gsal mentioned, Phython would be good fit for this type of thing. ### RE: need a programming language for simple geometrical simulation (OP) Update... My copy of Visual Studio C++, which I found out is too old to function on Vista despite online tips I found on how to get it to run on Vista, is ruled out now. I'm going to play with Visual Basic on that software tonight, but I expect the same incompatibility problems. I can't afford the$500+ for an upgrade to modern Visual Studio, and with so many problems with their software, I'm not sure I would pay Microsoft more money for that product even if I could afford it.

Another person I met suggested I could download JRE (Java environment) for free, and just use Notepad for writing the Java programs. That sounds like a decent solution.

PHP is impossible to develop on Vista, in my experience, despite some online claims to the contrary, whose online tips never worked for me. As far as I know, both PHP and JavaScript need to run from web pages, which is workable but a little weird.

I don't need any databases for this project.

It was a professor at UCSD who knew the particulars of my situation and of my intended project who recommended putting any of my simulation results online.

Thanks for the new suggestions, like OCTAVE and C#.

I'm also looking into a new consulting job, so all your suggestions might be good for that other project, especially if database-related, even if not good for this personal project of mine.

### RE: need a programming language for simple geometrical simulation

If you haven't already look into Python as another member suggested.
I hadn't used it before. But I recently installed it put it to the test. I must say that it is really good.
It is a higher level language than C and functions a little slower than Matlab/Octave but is free and works well.

Fe

### RE: need a programming language for simple geometrical simulation

You can get Visual C++ Express or Visual Basic Express for free from Microsoft, which I believe has been mentioned before.

### RE: need a programming language for simple geometrical simulation

you can also use qt designer for c++, but i'd use a more high-level language if i were you.
python for example (eclipse ide) with c++ for the computationally intensive parts.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

eBook - Manufacturing the Cars of Tomorrow
In this ebook, we'll explore how additive manufacturing is going to transform the way cars are made. This includes commentary from thought leaders such as Ford's CTO, Ken Washington, Customer case studies of ways 3D printing is being used today, and a variety of part examples where 3D printing is already impacting how automobiles are made. Download Now
White Paper - Smart Manufacturing for Semiconductor
New technologies and approaches present great opportunities for semiconductor manufacturers to achieve high levels of innovation, yield and improvement. This white paper explores some of these cutting-edge technologies and how they can be applied effectively in the semiconductor industry. Read about how Smart Manufacturing is transforming the semiconductor industry. Download Now
White Paper - Analysis and Simulation in Aircraft Structure Certification
Organizations using simulation and analysis tools effectively see the benefits in their ability to achieve certification faster and with drastically less total cost than those who do not maximize these tools. Read this White Paper to learn about how digital tools such as analysis and simulation help in aircraft structure certification. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!