You have to be a geek to get this stuff. (I have a very good friend who is an expert programmer and he concurs with me.)
I have spent all day trying to get a handle on what the elements of this programming language are and how they work and relate to each other. Sheesh. In all the books and papers I have found no one can diagram this thing out because it is so elusive. Nikki says, “You’ve only had one class, BH.” I just want to understand the building blocks—the ABCs. I am not trying to map New York or anything.
So, our first project is creating a simple solar system.
My first result was a huge black circle over the background image. (The starry sky is just a picture I stuck in the background because the prof said he didn’t want to see white back there.)
The big black circle is the sun. I had created all my spheres in proper proportion to each other but found this didn’t work as the sun would just be too big for my canvas. But then, my sun was black too. (I had to fix the code introducing each color) So I moved the “sun” line of code to draw it first instead of last so that it would appear behind the other planets.

On my next return there were some strange non-spherical behaviors going on. Hmm. Well, looks like I forgot to stipulate the line value so that it was giving me crazy black shapes around my spheres.

Ok, correct line value, correct the order for planets, change size to fit on canvas.

Now move spheres around by changing x and y coordinates for each.

OK, how do I get these to look like something besides color stickers? I guess that is next week.
And this took me some hours to do. Can you believe that? Well, I was reading and looking up stuff but still.
Here is the code so far:

I promise I will not show you code in all my forthcoming posts. Maybe a bit from my final if it looks interesting.
































