Thursday, 26 May 2011

200-300 words plus Pseudocode


An If/Else statement is a man waiting to be woken up.

Instructions: Move the magnet up and down the box. If you put the magnet on the top of the box then the man is awake. But if you put the magnet on the bottom of the box then the man is sleeping ready to be woken once again buy the movement of the magnet.

An if/Else statement is a piece of code in a program that will run when something triggers it such as a movement, mouse click or a value etc. The statement has two parts to it an IF and an Else. When the statement has been triggered the program will check the statement to see if it should run the IF part of the statement or the Else part. This piece explains that an If statement is like a man ready to be woken up. It shows that an if statement is waiting in a pile of code ready to be triggered buy something which will make it run. In this instance the trigger is the magnet which wakes the man up or “runs the IF statement” or Else “It doesn’t run” and he stays asleep. The Man being awake represents the If statement running and the man lying down represents the else part of the statement.

Pseudocode
If (magnet=top of the box)
{
Man is awake;
}
Else
{
He is still sleeping;
}

Thursday, 19 May 2011

After presentation

After the presentation with the group and the class i have decided to choose my 2nd idea which is having a man in the glass or acyclic box and he will stand up if a magnet is put on the top of the box. I choose this idea because after my presentations the tutor and lecturer thought that this was a cool idea. I also chose this project because it would probably cost the least out of all the ideas because apart from the acyclic box I have all the resources I need to make this project.

Ideas for Presentation

Idea 1
 My first idea that came to mind for an If/else statement was to have a chain reaction. The model would start with an action which the user will do to stat the chain reaction. My metaphor would be something along the lines of If/else is the start of a process. I would start to explain that if the chain reaction is triggered then it is a process else it is still and not affecting the rest of the program. I would most likely use materials that I have easy access to I think that if was to buy something’s for this project it wouldn’t cost too much. I expect to spend about $20 on this project.

http://www.youtube.com/watch?v=Vh-4y4hS91k&feature=fvsr

Idea 2
The second idea that I had for an If/else statement was to have a model of a man in a glass or acrylic box and when you put a magnet on the top of the box he will stand up straight but if the magnet is not of the top of the box he will be at the bottom of the box. My metaphor for this idea would be If/else is a man in a box ready to be woken up. I would explain that if the magnet is on the top of the box the man is standing else he is lying or sitting down. The materials I would use would be either glass or acrylic for the box and paper or a fabric for the man and magnets to get the man to stand up. The magnets will be attached to the man so when another magnet is on top of the box the man will stand up. I think that I would spend about 20 on all of these materials most likely I would spend less.






Idea 3
My third idea for the If/else statement was to have a small door which you can not open until you unlock it. I would have the key sitting in front of the door and then the user can pick it up and unlock the door. My metaphor for this idea would be An If/Else statement is a door ready to be unlocked. I would explain that an if statement only starts to work if something specific happens in the project to set it off which is exactly like a locked door (the door is only open if the door is unlocked). The material I would use for this idea would be some wood for the door which I will be able to make, a small locking mechanism which would go in the door and will be able to lock and unlock the door and I would also need to make a key. I think I could make the door out wood and the rest out of some sort of metal or wire. I think that all the materials I will need would cost around $20. 


Monday, 9 May 2011

Research on If/Else 3rd

int counter=0;
int shrink=0;
int side=0;
int up=0;
int timing=10;


void setup()
{
 
  background(127);
  size (500,500);
  stroke(0);
}
void draw()



{
 
rect(counter,50,50,50);
counter= counter +1;

if (counter>timing)
{
rect(50,shrink,50,50);
shrink= shrink +1;

if (shrink>timing)
{rect(side,400,50,50);
side= side +1;

if (side>timing)
{rect(400,up,50,50);
up= up +1;}}}

}

Thursday, 5 May 2011

Research on If/Else 2nd

Link-http://www.openprocessing.org/visuals/?visualID=15768

if (keyCode == RIGHT) rightPressed = true;
  if (keyCode == LEFT)  leftPressed = true;
  if (keyCode == UP) {
    upPressed = true;
  }
  if (keyCode == 82) reset = true;

Research on If/Else 1st

Link -http://www.openprocessing.org/visuals/?visualID=3148

 










if( mousePressed )
    {

      PVector dir = new PVector( mouseX, mouseY, -500 );
      dir.sub( loc );

      dir.normalize();
      speed.add( dir );

    }
    else

    {
      speed.mult( .9 );

    }
    loc.add( speed );

    pushMatrix();
    translate( loc.x, loc.y, loc.z );

    rotateToFace( loc );
  

    beginShape( QUADS );
    vertex( -size, -size, 0 );

    vertex( size, -size, 0 );
    vertex( size, size, 0 );

    vertex( -size, size, 0 );
    endShape();

    popMatrix();

Description of the If/Else


         If
  • Allows the program to make a decision about which code to execute. If the test evaluates to true, the statements enclosed within the block are executed and if the test evaluates to false the statements are not executed.

        Else
  • Extends the if() structure allowing the program to choose between two or more block of code. It specifies a block of code to execute when the expression in if() is false.

Start of Project 3

My term that I have chosen to do is If/else. My original idea that I had in my head was to create a chain reaction which would trigger and start the chain reaction if somebody was to push,pull,twist or touch the beginning of the chain reaction. I would explain that this is like an if/else statement, If somebody starts the chain reaction it is moving / else it is not. I haven't got my metaphor together yet. 

Monday, 2 May 2011

Link to final

This is the link to my Final Transformation program


http://www.openprocessing.org/visuals/?visualID=27974

feedback after presentation

After my presentation on the last day I got feedback from my fellow class mates.

Some of the feedback I got was:


"You should make it so that you can catch the balls when they are bouncing"

"I really like the image that it creates and how it transforms constantly as the program runs"

"Maybe you should make it more simpler. Only use one sound so it doesn't complicate things"

The feedback that I got is very useful and I hope to incorporate all the things that were said during the holidays

Monday, 11 April 2011

Research on interactivity with bouncing balls

After researching other programms with bouncing balls I then needed to learn how to icorperate interavity into my program. These are some of the programs I found that are relevant to my programme





http://www.openprocessing.org/visuals/?visualID=5704



http://www.openprocessing.org/visuals/?visualID=22459

Research on Bouncing Balls

These are some programs I found in open processing which would relate to the programme I am trying to create



http://www.openprocessing.org/visuals/?visualID=2488 




http://www.openprocessing.org/visuals/?visualID=10843

In these two examples both of them do not have any interactivity or sound however they did have the bouncing effect that I wanted to create in my program. I looked at there programme and tried to found out how I would be able to create this bouncing effect and how I could change it to fit my storyboard. gh

Monday, 28 March 2011

Transformation

Transformation
  • The act or an instance of transforming.
  • The state of being transformed.
  • A marked change, as in appearance or character, usually for the better.

Reflection

Reflection

Though out this project I have learnt a lot of new things. However I think that the most significant thing I have learnt is the basic language of coding. I can now go through code and know what part of the program is doing when the program is running. The thing that helped me to keep motivated was the tutorials, every time I went to a tutorial I would learn something new weather it was from Ben teaching us new things or going off on my own and researching how to do something that I wanted to do. I think that I would like to improve on being able to use variables and loops with ease, this would not only make things a lot easier but it would also be much easier to manage if i was to change the program dramatically.

Goal

My goal for my next project will be to easily read code and use most of the commands to create a program to the best of my ability. Also to use my time wisely so that I wont be rushing to finish of m project at the last minute.  

Thursday, 17 March 2011

After presenting

After presenting my images to the class and gaining valuable feedback from them I decided to merge two of my ideas together. I am going to use my first idea in the background and then use my radar idea on the top layer of my image. By combining both of these image I think I will be able create an attractive image which would be interesting to look at.

Four sketches

These are the four sketches I did. My inspiration I had for this was the moths I had flying around outside my room which I thought could make a great pattern. Buy combining the transparency code with the images I will draw in processing would look very abstract.



My second pattern from the top was an inspiration from a movie I was watching and on that movie was a radar and buy seeing that image I thought I could replicate it which could look good if it was repeated a number of times and buy making half of them light and half of the dark would give another contrast like element to the image.


My third sketch was an inspiration from the floating ball in civic square in Wellington. I thought by creating a pattern or image that most people would recognise could prove useful in its popularity. But if somebody didn't recognise image it would still look very attractive.


My last image was a inspiration from my five year old brother who was playing with a slinky when I got home. The movement of  the Slinky falling down the stairs made me think of a pattern which could replicate its movement going down the stairs.


Thursday, 3 March 2011

Second pattern_rainbow


This is the same design as my last but I added a rainbow effect to it. Comparing this pattern to the black and white design makes this design look much more interesting and eye catching but instead of focusing on the pattern  the back ground is more significant  in this design and makes you look at the color of the back ground rather than the pattern its self which could be useful in my final design

My second pattern


This is the pattern my partner gave me instructions to draw in our 1st lecture. After figuring out how to draw this pattern my knowledge of how to draw patterns greatly improved.

My first pattern


This was the first pattern I made while using my open processing. It was the first pattern I saved and it was a pattern that would be further developed into the pattern that my partner made me draw from his instructions.