Friday, October 24, 2014

2 Programs

Today in class we learned more about the basics of processing. One of which is frameRate. frameRate is how often draw is called a second. So, if I were to write frameRate(100) draw would be called 100 times in a second. We learned about smooth() which is an attribute that smooths out the lines so that they won't look so pixelated. But the coolest thing  we learned  today is an input called if(mousePressed). The input if(mousePressed) is the input used when you want the computer do so something every time the mouse is pressed. For example, if you want the computer to create a circle where the mouse if every time the mouse is pressed you would use the code:

if(mousePressed){
   ellipse(mouseX, mouseY, 50, 50);
 }

This code basically says when the mouse is pressed create a circle, where the mouse is hovering that, is 50 coordinates down and 50 coordinates across. I really enjoyed learning how to use the input if(mousePressed) and I can't wait to create my own code using this input. The code we created in class is down below.

void setup() {
 size(500, 500); // set size of window
 background(7, 80, 0); // set background color
 frameRate(60); // how often is draw called (60 times per second)
 smooth(); // anti-aliasing, smooths lines
} // end setup

void draw(){
 background(7, 80, 0); // redraw background to remove trace, ghosts
 
 if(mousePressed){ // if the mouse is pressed
   ellipse(mouseX, mouseY, 50, 50); // make a circle follow the mouse
 } // end if
 
  }// end draw

“The computer was born to solve problems that did not exist before.”
– Bill Gates
 



CSE Intro to Processing 2

Today in class we learned more about the basics of processing. One of which is frameRate. frameRate is how often draw is called a second. So, if I were to write frameRate(100) draw would be called 100 times in a second. We learned about smooth() which is an attribute that smooths out the lines so that they won't look so pixelated. But the coolest thing  we learned  today is an input called if(mousePressed). The input if(mousePressed) is the input used when you want the computer do so something every time the mouse is pressed. For example, if you want the computer to create a circle where the mouse if every time the mouse is pressed you would use the code:

if(mousePressed){
   ellipse(mouseX, mouseY, 50, 50);
 }

This code basically says when the mouse is pressed create a circle, where the mouse is hovering that, is 50 coordinates down and 50 coordinates across. I really enjoyed learning how to use the input if(mousePressed) and I can't wait to create my own code using this input. The code we created in class is down below.

void setup() {
 size(500, 500); // set size of window
 background(7, 80, 0); // set background color
 frameRate(60); // how often is draw called (60 times per second)
 smooth(); // anti-aliasing, smooths lines
} // end setup

void draw(){
 background(7, 80, 0); // redraw background to remove trace, ghosts
 
 if(mousePressed){ // if the mouse is pressed
   ellipse(mouseX, mouseY, 50, 50); // make a circle follow the mouse
 } // end if
 
  }// end draw

“The computer was born to solve problems that did not exist before.”
– Bill Gates
 

Wednesday, October 22, 2014

A Portrait

My very first assignment was due a couple of days ago and I must say it was quite fun. The assignment was to create a portrait of someone in our class, I decided to create a portrait based on my best friend Tytianna. All I did was create a  bunch of lines and circles but it took a long time because it was hard to find what coordinates the lines and circles should be at to create a body. I practiced everything we learned previously by not only using lines and circles, but also changing the fills and strokes. The code I created is down below.

                          
size(1000,700);
background(180,18,165);
fill(199,31,222);
stroke(255,255,255);
ellipse(500,400,400,400);
fill(116,63,59);
stroke(2,2,2);
ellipse(500,300,70,85);
stroke(116,63,59);
line(500,500,500,342);
line(500, 500, 450,550);
line(500,500,550,550);
line(500,365,520,410);
line(500,365,480,410);
fill(500,500,500);
ellipse(480,290,15,10);
fill(500,500,500);
ellipse(510,290,15,10);
fill(2,2,2);
ellipse(480,290,3,3);
ellipse(510,290,3,3);
fill(255,255,255);
noStroke();
rect(485,325,30,10,30);
fill(116,63,59);
stroke(2,2,2);
rect(494,305,10,10,30);
fill(110,55,59);
rect(470,200,60,60,180);

“First, solve the problem. Then, write the code.”
-John Johnson

Monday, October 13, 2014

CSE Intro to Processing

A few weeks ago I had my first official class for Computer Science Engineering! Since most the students in this class are beginners most of what we did was learning the very basics of Processing. Like how to set up the size of the window, how to change the background color, how to make basic shapes and how to change the fill and lines of the shapes.  I completely understood what we were being taught and I really enjoyed the class immediately!

                                                           Code taught by Mr.Miles

// set up size of window
size(displayWidth, displayHeight);

// change background color to seafoam
background(127, 255, 127);
       
// rect(30, 20, 100, 55);
rect(600, 30, 400, 400, 0, 5, 10, 20);
rect(420, 120, 200, 200, 100);

rectMode(CORNERS);
rect(30, 20, 100, 500);

rectMode(CENTER);
rect(width / 2, height / 2, 50, 50);

rectMode(CORNER);

fill(255, 0, 0); // change the color of shapes' fill
ellipse(100, 100, 50, 50);
ellipse(width / 3, height / 3, 100, 100);

stroke(0, 0, 255); // change the color of lines
triangle(50, 50, 100, 100, 200, 75);

“Computers are getting smarter all the time.  Scientists tell us that soon they will be able to talk to us.  (And by ‘they’, I mean ‘computers’.  I doubt scientists will ever be able to talk to us.)”
-Dave Barry





Wednesday, October 8, 2014

Welcome to Azaria Burton's Senior Capstone Blog!

My name is Azaria Burton and I currently attend Science Leadership Academy. This year I will be completing my final project called a Capstone. I have recently found a new interest in Computer Science Engineering and decided that it would be fun to do my capstone based on the skills I have learned in my CSE class. My final project will consist of a game created by me and a blog to help me track my progress. I'm very excited to start this new journey of becoming computer literate!




“...if you aren't, at any given time, scandalized by code you wrote five or even three years ago, you're not learning anywhere near enough.”
― Nick Black