Hi. I am taking a basic programming class. I got the textbook early and started reading it. I am familiar with basic programming concepts from trying to learn other languages and have already read the required chapters for the class. Basically we just have to submit programs for each chapter and the teacher lets us do any programs we are interested in. I was wondering if VB is capable enough to do 3D related programming. I am trying to think of how I can relate the class to something I am interested in and hopefully something that will translate over to python easily so I can make scripts for Blender. One idea I had was making a program where there is two arrows and pressing one rotates an image of a cube clockwise and the other one rotates it counter clockwise. I think something like that might be too advanced but not sure. So I am curious if anyone has used VB for any 3D related programming that would translate over to python fairly easy. I could easily do the example programs in the book to hand in but I won’t learn anything from the class. Thanks for reading.
Ask your teacher if you can port the VB chapter code over to python. From my use of VB it’s heavily built around Menu driven programs.
And I don’t think it has support for either OpenGL or DirectX.
Is vb tough? I’ve heard that it is. I wanna learn it though.
Wright a real-time software renderer?
From memory, there is an OpenGL wrapper/lib available for VB (at least with VB6, not sure about with .net editions). Check ‘planet source code’ for some examples that use this (there’s a solar system one there IIRC that should include the relevant link).
However, it is worth nothing that OpenGL interface is by design very C-orientated. Python is quite similar to C in some ways (syntax wise), but VB is not to similar to either. Furthermore, the wrapper doesn’t always provide a consistent style of access. As a result, you might find it harder to port things from VB to Python or C, or even getting examples from common resources to work in VB when starting out.
- Now, if you’d like to work in Python instead, there is a PyOpenGL module or such available. A google search should reveal what you’re looking for. The package does require another py package which acts as a special installer thing (.egg files). This should be quite compatable with all the c/c++ based “redbook” examples out there.
- In C, things are even easier (in terms of getting 3d working through OpenGL and GLUT), though you’ll need to be careful of memory management issues.
I should also mention that with VB, it is easy to use DirectX with it. However, the problems with DirectX are that it is restricted to Windows only, and you need to write a lot more bulking to get the simplest tasks done.
Hope that helps,
Here’s a book that looks promising and the used copies are only ~ $12
My thots when I read your post: don’t stretch your learning too far beyond the intent of the class. What you need to learn are the basic logic paths and constructs of programming, the theory of which transfers to whichever language you choose or application you’re constructing. The projects that are included will allow you to become very familiar with these techniques. Learn them well, then you’ll be better equipped to tackle the projects which interest you later.
Too often students of IT tend to overlook the often mundane stages of project development such as planning and researching. However, I’ve come to understand that its these aspects of design which are the most important to any given project’s success.
Its just our nature to want to jump right in and work on the specifics of the solution we’re constructing rather than taking the time to fully understand the circumstances and realize all aspects.
Most important is the human element. Spending time talking with and understanding the future user’s point of view is paramount. The technical wizardry and details of the solution will come - but if its not understood by, needed by, thus, not used by the end users, then what’s the point?
If you HAVE to use VB, then you could do the simple cube rotation for “playing” around.
As for just WANTING to learn VB, one has to be clear to ones self here: Do you want to learn VB or learn to PROGRAM? If you just want to “learn VB”, then do so. If you want to learn to “program”, start elsewhere.
I’ve been a software developer for over 24 years – a PAID to write CODE developer. I’ve been mostly a contractor and got to work for a myriad of places – chemical companies, pharmaceutical companies, small specialty companies, shipping companies, etc. In all that time there is one thing for sure – MOST developers don’t know “how to program”, but most know “how to make software package X do what I want” – and usually it’s VB.
If you REALLY want to learn to write good software, you gotta know something about the machine itself, software development itself, etc. Take a read here:
But to reiterate:
VB should do fine for your class and desires at this point. Just remember to learn how to do what you WANT and ADAPT it to VB. If you get stuck in the “VB way” just remember that it’s not necessarily the “best” or “right” way.
<PERSONAL OPINIONS ON VB>
</PERSONAL OPINIONS ON VB>
I took a VB class once, and I regretted it. The teacher taught very little programming; Usually we simply made interfaces and made something pop up when you clicked a button.
I learned Python over the summer, and I love it. Easier to code than VB, and not so “pointy clicky” oriented, which is what I wanted to learn.
I agree. Python is really quick, not to mention easy.
Python freakin’ ROCKS! Useful little tool in any developer toolbox I think.
Thanks for all the replies. When I signed up for the course I did not know what language would be used. If I was going to spend time learning a language my choice would not be VB. That being said I thought trying to use it for something I was interested in would help.
Philbo: Thanks, that book looks interesting. I think I will see if it is in the library or something.
mzunga: That is a good point. I think I should not extent learning too far from the class, but in a way the teacher encourages. If you hand in a good program that shows you know what your doing than the teacher will give you an automatic A for the midterm or final. So it may be better to programs in the book and work with the teacher to try to improve my programming than learn a specific function of VB.
mrunion: I agree. From reading the book it seems a lot of it is more of teaching you how to use the Visual Basic Express program with some programming sprinkled in. Unfortunately I have to use VB. The reason being is the teacher will occasionally be giving us half completed programs that we have to finish that will be in VB. I mentioned I started learning python and he said he hasn’t done much with it but wanted to learn because he thinks that is where they are heading. By “they” I don’t know if he meant that is what the school was going to be switching over to for their intro classes.
others: I agree that python is quick and easy. I have little experience with programming but have read enough to know basic concepts like variables, variable scope, flow control, etc; Python seemed easy enough that you could focus more on what you were trying to accomplish than, ok where do I put that semi colon?
Again, thanks for all the replies.