We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › Curious about Math...
Page Index Toggle Pages: 1
Curious about Math... (Read 2074 times)
Curious about Math...
Jul 30th, 2009, 1:17pm
 
First of all hello,

I am a beginner to Processing and even to coding. Well i started to code with processing, and i was enjoying it so much. i finished some PDFs, learned OOP programming and such. I am a designer myself, and i really would love Processing to be my medium tool. I've always wanted to create real-time visuals, installations and such. The problem is, when it comes to math i just can't do anything, and i do not understand why the Source Codes i download have that hard to understand calculations (at least to me). When it comes to creativity i cant do stuff because i know nothing about math and it's nature. But i am really willing to do something about code-art.

As you know i am in need of some suggestions, like should i take a Math course, or i don't even need it? Or is there something i do wrong i should know?

Oh, and those PVector Classes and such, vectors and physics are like out of my range, As a result what should i do to become a code artist?

Thank you for your time and suggestions.
Re: Curious about Math...
Reply #1 - Sep 4th, 2009, 4:14pm
 
I can't really give out some silver-bullet :/ math is a big part of programming...

It is one thing to draw something using a pen and paper and a completely different thing to make something build itself live using instructions.

In theory you could tell the computer each step to do and never write or understand any calculations, but that would seriously limit things and productivity Wink

My advise would be to start out slow with geometry, that is the backbone of the visuals, maybe start out with a school book that you estimates is at the level where you left math, build on from there. The tricky part is often not the math, but to take the math from a textbook and translate it into programmable steps.

When you been at coding for a while, and more important, been looking at other peoples code for a while, you won't have to spend all that much brain power on the syntax and the math will probably seem more accessible. You will surely run into calculus stuff in other peoples code, but dissecting code that uses calculus and understanding what it does is much simpler than sitting down with a textbook and learning calculus:)

The Processing examples uses a variety of math, most of it is simple stuff, start out from there too.

If you can grasp OOP I bet you could learn the math you need to do what you want:)

Get one or two of the Processing Books out there, that will also give you a clue as to what math knowledge is expected in order to understanding the examples (ohh yeah and the authors are often in here and they love to elaborate + there is not that many Processing books so a lot of the users in here have read the same books) these books are often "not math heavy" because Processing is mostly about getting visual stuff up and running whatever your level of knowledge is.

No silver-bullet, sorry, just how I have experienced a couple of art directors go from pen and paper to keyboard:)
Re: Curious about Math...
Reply #2 - Sep 6th, 2009, 1:05am
 
In general, when I say I am a programmer, people exclaim: "Ooh, you must be good at math!".
And I try to persuade them programming has little to do with maths, actually, beside simple operations you do on your calculator, and lot, lot of logic. So once you learned to do +, -, *, / and wrapped your mind around hexadecimal (and binary) concepts, and the or/and/not/xor concepts (logical and binary), optionally the shift operations and square root, you are good to go for 90% of your programming needs.

Hey, if you ever need to do stats, integration or projection, in general you don't do the deep maths yourself, you find a good library doing the hard stuff for you, and just use it (although at least a light understanding of what is going on allows to avoid the biggest mistakes by checking results are looking good).

Except, of course, this applies mostly to business/technical programming, the one most computer engineer practice every day.
Obviously, and you hit that yourself, Processing and other similar visual frameworks, often ask you some more math knowledge, particularly on the geometry area, starting with simple trigonometry and vector manipulations, optionally dipping into matrix operations, numerical analysis (something I had the hardest time to wrap my mind around at the university... I should try and study it again to see if my PoV has changed over time) and so on.

Alas, I have no hard and fast advice. Like RickiG, I would advice to look tutorials on geometry, first because it has immediate results on the usage with Processing (and you can use Processing to help grasping some concepts!), secondly because as a designer, you might find easier to understand the visual concepts (I know I do, I am a visual guy).

Studying with somebody (math course) might help, but you have to find the right guy (or gal), patient, lively, more on the concrete side than on the theoretical one... A good prof can make the topic fascinating, a bad one can disgust you definitively... Smiley
Re: Curious about Math...
Reply #3 - Sep 25th, 2009, 2:14am
 
This has come up before - lots of good advice here:

http://processing.org/discourse/yabb2/num_1232116676.html

and good links to resources. Two key things: having the right mindset/expectations (having a sense of what mental struggle went on behind the scenes of any math-programming combo!) and learning through doing. For this last, Processing is perfect - e.g. there's

http://processing.org/learning/trig/

Find some coding / programming challenge you're interested in, and let that lead you to learn the maths you need.

One thing I would like to see that I haven't yet: a good solid explanation of coding physics using runge kutta integration. The physics of motion is a perfect way to learn calculus - it's intuitive. E.g. if your speed is changing over time, everyone knows what that is: acceleration. Anyone know of any good links Programming a simple physics model in Processing would be a great calculus primer.
Re: Curious about Math...
Reply #4 - Oct 1st, 2009, 7:10pm
 
In my experience, programming/whatever is not about math, it's about logic. It's about thinking like a computer (since that's what you are doing, really) and being able to "bend the rules" to make a computer act how you want it to.

With enough practice, programming can turn into poetry. Once you know the language, the manipulation of that language is like the manipulation of any language. Of course, it is fairly more limited than say English. However, that doesn't mean it lacks harmony, nuance, and the possibility of beauty.

But all that comes after spending a couple of years learning and using a language. And even then, if you learn concepts as you learn the technical implementation of concepts, transitioning from one language to another becomes easy.

Yes, it takes years. Your first language is important, but it's not going to kill you later. I learned PHP and ActionScript 2.0 at the same time as my first languages, so I was great at procedural code but not so much at OOP. But I overcame that, and was able to incorporate strong procedural methods into my object-oriented approaches.

Anyway.... it just takes time. And the ability to spend that time experimenting. Which is why Processing is great, because the language itself almost begs for exploration.
Page Index Toggle Pages: 1