Ryan Bowen 2011. Powered by Blogger.
RSS
Showing posts with label arrays. Show all posts
Showing posts with label arrays. Show all posts

Assignment Information

Alright here's a little information on the assignment I'm currently working on:

We have to be highly modularised, which means pretty much every minor action in the program gets its own function and is all stored in separate files instead of one chunk of code. Apparently this is less confusing, whoever believes this is stupid.

We have to make a program that generates random numbers, then subs those random numbers into an equation which somehow integrates the equation, not sure how sound the mathematics is but who cares it's worth 15% of this subject.

It's not going too well at the moment, it's due in two days. I'll post more progress up until then but don't expect me to do very well as it pretty much covers all the topics I'm yet to learn.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Terrain Navigator: Complete!

Well that was very easy I'm glad to say, it's restored faith in my abilities as a programmer!

Here's the final code, usually I would separate this into separate functions but since it's only a small exercise I just left it all in main.


  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Terrain Navigator Update

Well here it is so far:




  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

The Slaying of The Turtle

Okay so my recent attempts to create this "turtle graphics" program hasn't gone too well. So I given up.

Okay so I haven't given up but I chose to postpone it until I know more about arrays, especially 2D ones. Thus I  have turned to Engineering Problem Solving with C (3rd Edition) and it's chapters on arrays.

I am about to begin work on a fun sounding "Terrain Navigation" exercise, simulating a robot navigating hills: the program will look at a 2D array and evaluate based on height information where peaks and valleys occur.

I'll post my progress later this evening if I do well!

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

"Turtle Graphics" Update #2

Right, my turtle program is behind schedule since today I woke up late and spent most of the day eating bacon and generally being lazy.

The program is fairly functional but it doesn't quite do what it's meant to yet, at least it compiles!

Full source code after jump:


  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

"Turtle Graphics" Update

I know I said I'd post my progress today but unfortunately none has been made, I've had a hectic day and barely had a chance to get on the computer let alone programming!

I shall work on it tonight since I was reading up more on two dimensional arrays to prepare, it's not exactly difficult but I like to refine my knowledge by re-reading every chapter of my textbooks to ensure I haven't missed anything.

I'll also be doing some exercises from Engineering Problem Solving with C (3rd Edition) tonight and tomorrow to further cement it in my brain.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

My Wrestle With Arrays

I'm currently working on a C program that is a simulation of "Turtle Graphics".

Turtle Graphics for those who don't know is when you have a square of blank paper and you program a route into this "turtle" for it to follow on the following commands: Go Forward, Turn Left, Turn Right, Raise Pen, Lower Pen.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Total Pageviews