×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*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.

Students Click Here

Jobs

need a programming language for simple geometrical simulation

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

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.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize

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.youtube.com/watch?v=vMU0QNHDY8M&feature=player_embedded

(download spreadsheet from http://cid-275d981e8a790dad.office.live.com/view.aspx/Readers%20Downloads/Hypercube.xlsx  Animation doesn't work on-line but click download button for working copy)

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

http://chandoo.org/wp/2011/06/23/automating-repetitive-tasks/

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

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

RE: need a programming language for simple geometrical simulation

(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.

peace
Fe

RE: need a programming language for simple geometrical simulation

Forgot to mention OCTAVE ..

peace
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.  

peace
Fe

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.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Research Report - What’s the State of Nonlinear Simulation?
Simulation is an increasingly valuable tool across the product design workflow, but not all simulations are equal. We set out to determine how engineers and product designers make use of specialized analyses, how they incorporate nonlinear simulation into their work and how they rate the available software. Download Now
White Paper – Data Security and Know-How Protection
Our data is constantly exposed to the danger of being intercepted or stolen as it wends its way over global data networks. Data security measures and measures for protecting intellectual property should not, however, first be implemented when data is exchanged – companies must lay the foundation for these measures within their own organization. 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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close