Tuesday, December 5, 2017

Looking at Java Examples

CASE STUDY #1:  Movie Tickets

Let's look at this code for a movie ticket program:
import java.util.Scanner;
class TicketPrice {
public static void main(String args[]) {
Scanner myScanner = new Scanner(System.in);
int age;
double price = 0.00;
System.out.print("How old are you? ");
age = myScanner.nextInt();
if (age >= 12 && age < 65) {
price = 9.25;
}
if (age < 12 || age >= 65) {
price = 5.25;
}
System.out.print("Please pay $");
System.out.print(price);
System.out.print(". ");
System.out.println("Enjoy the show!");
}
}

First of all, what is the name of this Class?

  • What are we bringing into the Class from Java that is already built for us?
  • What does "Scanner" do?
  • What does "double" mean in Java?
  • What variables are we using in this code? (I see three)
  • What are some of the things that are missing in this code?
  • What would the ticket price be for an 8 year old?  A 14 year old?  A 66 year old?
  • Draw a flow chart indicating the flow of this program.
  • Next, let's update the source code:
  • Begin by formatting the source code to be more readable -- add line breaks, indent (Tab) some of the lines, etc.  (See the next case study for an idea of how to format it)
  • Add some comments to the code.  Remember that every Class needs a title, author(s), and version (number or dates) and maybe some comments describing what a formula or function does.

CASE STUDY #2: Divide Equally

Next let's look at this strange code for a program that will divide the total number of gumballs equally among a varied number of children:
import java.util.Scanner;

class EquallyDivide
{

    public static void main(String args[]) {
        Scanner myScanner = new Scanner(System.in);
        int gumballs;
        int kids;
        int gumballsPerKid;

        System.out.print("How many gumballs? ");

        gumballs = myScanner.nextInt();
        System.out.print("How many kids? ");

        kids = myScanner.nextInt();
        gumballsPerKid = gumballs / kids;

        System.out.print("Each kid gets ");
        System.out.print(gumballsPerKid);
        System.out.println(" gumballs.");
    }
}

So let's work with this code:
Add some comments / labels.
What is the difference between:
 System.out.println
 System.out.print
With variable names like "gumballs" or "kids" or "gumballsPerKid", this program is pretty specific.  What sorts of names could we use for variables to make this program usable for other purposes?  The "gumballs" variable might be more useful as "items", for example.  Remember, however, that you can change all instances of "gumballs" but "gumballsPerKid" is a completely different variable name.
Draw a flowchart indicating the flow of this program.
What code could we add to figure out how many gumballs are left over after they have been divided equally?

CASE STUDY #3:  Magic Cue Ball

For case number 3 we have "The Magic CueBall" -- okay, so it's ripped off... but it works... sort of:
import java.util.Scanner;
import java.util.Random;

class MagicCueBall {

    public static void main(String args[]) {
        Scanner myScanner = new Scanner(System.in);
        Random myRandom = new Random();
        int randomNumber;
        System.out.print("Type a Yes or No question: ");
        myScanner.nextLine();
        randomNumber = myRandom.nextInt(10) + 1;
        if (randomNumber > 5) {
            System.out.println("Yes. Isn’t it obvious?");
        } else {
            System.out.println("No, and don’t ask again.");
        }
    }
}

Let's do some playing with the code again:

  • Again, begin by adding comments/labels to the code.
  • What Java utils are we bringing in this time?
  • When you run this program, how does the output text differ from the text written in the code?
  • Before the "if" statement, randomNumber can be what possible numbers?  Why is there a +1 at the end of the line?
  • Add some variation to the possible responses:
  • 4 different "Yes" answers
  • 4 different "No" answers
  • 2 different "Ask Again" answers

At the beginning of the program (before asking the user to type a yes or no question), add a title text graphic.  For example:

*********************************
* Magic Cue Ball 1.0 ~ by Your Name  *
*********************************

What else could we add to make this application more usable?

CASE STUDY #4:  A Number Guessing Game -- Building a Program Step By Step

Step One: Let's try a different method for finding a random number -- this time from 1 to 1000.
public class NumberGuessingGame {
      public static void main(String[] args) {
            int secretNumber;
            secretNumber = (int) (Math.random() * 999 + 1);
            System.out.println("Secret number is " + secretNumber); // to be removed later
      }
}

Step Two: Getting a Guess (import the Scanner and reply with the guess)
import java.util.Scanner;

public class NumberGuessingGame {
      public static void main(String[] args) {
            int secretNumber;
            secretNumber = (int) (Math.random() * 999 + 1);
            System.out.println("Secret number is " + secretNumber); // to be removed
            // later
            Scanner keyboard = new Scanner(System.in);
            int guess;
            System.out.print("Enter a guess: ");
            guess = keyboard.nextInt();
            System.out.println("Your guess is " + guess);
      }
}

Step Three: Checking Your Answer

import java.util.Scanner;

public class NumberGuessingGame {
      public static void main(String[] args) {
            int secretNumber;
            secretNumber = (int) (Math.random() * 999 + 1);
            System.out.println("Secret number is " + secretNumber); // to be removed
            // later
            Scanner keyboard = new Scanner(System.in);
            int guess;
            System.out.print("Enter a guess: ");
            guess = keyboard.nextInt();
            System.out.println("Your guess is " + guess);
            if (guess == secretNumber)
                  System.out.println("Your guess is correct. Congratulations!");
            else if (guess < secretNumber)
                  System.out
                             .println("Your guess is smaller than the secret number.");
            else if (guess > secretNumber)
                  System.out
                             .println("Your guess is greater than the secret number.");
      }
}

Step Five: Add Tries.
import java.util.Scanner;

public class NumberGuessingGame {
      public static void main(String[] args) {
            int secretNumber;
            secretNumber = (int) (Math.random() * 999 + 1);
            System.out.println("Secret number is " + secretNumber); // to be removed
            // later
            Scanner keyboard = new Scanner(System.in);
            int guess;
            do {
                  System.out.print("Enter a guess: ");
                  guess = keyboard.nextInt();
                  System.out.println("Your guess is " + guess);
                  if (guess == secretNumber)
                        System.out.println("Your guess is correct. Congratulations!");
                  else if (guess < secretNumber)
                        System.out
                                   .println("Your guess is smaller than the secret number.");
                  else if (guess > secretNumber)
                        System.out
                                   .println("Your guess is greater than the secret number.");
            } while (guess != secretNumber);
      }
}

Step Six: Remove the Debug Script.
import java.util.Scanner;

public class NumberGuessingGame {
      public static void main(String[] args) {
            int secretNumber;
            secretNumber = (int) (Math.random() * 999 + 1);         
            Scanner keyboard = new Scanner(System.in);
            int guess;
            do {
                  System.out.print("Enter a guess (1-1000): ");
                  guess = keyboard.nextInt();
                  if (guess == secretNumber)
                        System.out.println("Your guess is correct. Congratulations!");
                  else if (guess < secretNumber)
                        System.out
                                   .println("Your guess is smaller than the secret number.");
                  else if (guess > secretNumber)
                        System.out
                                   .println("Your guess is greater than the secret number.");
            } while (guess != secretNumber);
      }
}

Step Seven: Suggestions for Continuing to Upgrade Your Code

  • Add comments and labels [obviously]
  • Create a little title text graphic to display at the beginning of your program.
  • Display "Guess #" in front of [or behind] each "Enter a guess" prompt.
  • Limit the number of guesses a user gets -- and you might even have it display something like "Guess 3 of 10".

Pseudocoding, Variables and Flowcharting: Flipping a Coin

A simple task like flipping a coin is a good start in pseudocoding and flow charting.

Beginning Pseudocode:

Pseudocode is just like writing out what you want your computer program to do.  A simple program (flipping a coin, for example) might look something like this:
  1. Print the title on the screen (“Heads or Tails Game”)
  2. Ask the user, “Heads or Tails?”
  3. Flip the coin (get a random number -- either 0 or 1 with 0 being heads)
  4. Tell the user what the toss was
  5. Tell the user “You win!” or “You lose!”
  6. Say “Thank you for playing!”

Now, where would you put extra instructions that asked, “Do you want to play again?”  What about adding a score counter?  What if you wanted to display a picture of a Head or Tail?  Pseudocode is really that easy.

Looking at Programming:

If we look at a more extensive example, this one is interesting because it tallies up the number of heads and tails we get out of 100 coin flips.  This code involves using a counter, a Math.random number generator (0 or 1 is the result), a counter for the results of each of the sides of the coin, and a "do while" loop.  Study the code and see if you can figure out what the code pieces are doing.

class Toss {
        public final int HEADS = 0;
        static int countH = 0;
        static int countT = 0;
        static int counter = 0;
        private static int face;

        public static void flip() {
                face = (int) (Math.random() * 2);
        }

        public String toString() {
                String faceName;
                counter++;
                if (face == HEADS) {
                        faceName = "Heads";
                        countH++;
                } else {
                        faceName = "Tails";
                        countT++;
                }
                return faceName;
        }

        public static void main(String[] args) {
                System.out.println("Outcomes:");
                do {
                        flip();
                        System.out.println(new Toss().toString());
                } while (counter < 100);
                System.out.println("Number of Tails: " + countT);
                System.out.println("Number of Heads: " + countH);
        }
}

Monday, November 27, 2017

Artificial Intelligence and Following Instructions

Artificial intelligence isn't true intelligence.  Computers do not yet have the ability to think; to learn.  A computer is only able to do what it is told.  If you're playing a game, the character in the game basically follows a flow chart to know what to do.  If you walk into the virtual room, the character you encounter will react in certain ways -- if you have already found the magic sword the guard may attack... or if you are a magician the guard may run afraid... or if you have joined a guild the guard may welcome you in and show you the attack plans.  The guard will only follow the instructions given.  The guard will never think of something on his own... or be in a bad mood and act a certain way...  or decide to take the treasure for himself.

As a programmer, you have to think of all of the possibilities and program for those choices.  We aren't [yet] making a cool video game where characters are interacting with each other, but we will be creating programs with logic problems.  Flowcharting helps, but we have to remember to be specific.  If you have ever used Siri on an iPhone or iPad, you're probably encountered this.

You may have also played with "bots" in "shooter games" (like Counter Strike or Team Fortress) where the bots get confused over simple situations.  Sometimes you'll find them running at full speed, but they are stuck in a corner or behind a box.  The programmer neglected to write a "what if" scenario for whatever got them stuck.  Computers (and "artificial thinkers") can only do what you tell them to do.

For example, there's an old joke about a man who discovers a Genie in a bottle.  For one of his wishes, the man says, "Genie -- make me a chocolate milkshake."  Poof -- the Genie turned him into a chocolate milkshake.

Here's an example [from a JAVA for Dummies book] illustrating this principle:

Just yesterday, I was chatting with my servant, RoboJeeves. (RoboJeeves is an upscale model in the RJ-3000 line of personal robotic life-forms.) Here’s how the discussion went:
Me: RoboJeeves, tell me the velocity of an object after it’s been falling for three seconds in a vacuum.
RoboJeeves:
All right, I will. “The velocity of an object after it’s been falling for three seconds in a vacuum.” There, I told it to you.
Me:
RoboJeeves, don’t give me that smart-alecky answer. I want a number. I want the actual velocity.
RoboJeeves:
Okay! “A number; the actual velocity.”
Me:
RJ, these cheap jokes are beneath your dignity. Can you or can’t you tell me the answer to my question?
RoboJeeves:
Yes.
Me:
“Yes,” what?
RoboJeeves:
Yes, I either can or can’t tell you the answer to your question.
Me:
Well, which is it? Can you?
RoboJeeves:
Yes, I can.
Me:
Then do it. Tell me the answer.
RoboJeeves:
The velocity is 153,984,792 miles per hour.
Me:
(After pausing to think . . .) RJ, I know you never make a mistake, but that number, 153,984,792, is much too high.
RoboJeeves:
Too high? That’s impossible. Things fall very quickly on the giant planet Mangorrrrkthongo. Now, if you wanted to know about objects falling on Earth, you should have said so in the first place.
Your Challenge: Write Exact Instructions for Making a Peanut Butter & Jelly Sandwich:

  1. Get a piece of paper and a writing implement ready.
  2. Create a list (set) of instructions for making a PB&J
  3. Label your instructions "PB&J Alpha"
  4. Exchange instructions with a partner and exchange feedback for possible problems.
  5. Create a new list (set) of instructions to fix any possible problems from before.
  6. Label your instructions "PB&J Beta"
  7. Exchange instructions with a new partner and exchange feedback.
  8. Create a new list (set) of instructions to fix any possible problems from before.
  9. Label your instructions "PB&J Beta 2"
  10. Watch the following video:


  11. Make adjustments to your previous instructions to eliminate potential issues.
  12. Label your instructions "PB&J 1.0"
Here's an interesting video from a game developer doing "AI":

Flow Charting: An Intro to Coding

The first example is lengthy, but the first 6+ minutes are the part I want you to focus on -- unless of course you want to learn C++ programming.  The professor does a great job of demonstrating a basic problem that we need to solve, lays it out in steps, and then applies to steps to a flow chart.





This is a flow chart of making decisions in your life:
This is a useful tool for figuring out what to do:

Here's a funny flow chart in action:  http://www.youtube.com/watch?v=k0xgjUhEG3U


Programming is about solving problems.  The entire purpose of writing a program is to solve a problem which, in general, consists of multiple steps:
  1. Understanding the problem.
  2. Breaking the problem into manageable pieces.
  3. Designing a solution.
  4. Considering alternatives to the solution and refining the solution.
  5. Implementing the solution.
  6. Testing the solution and fixing any problems.
After we understand a given problem, we can break the problem into manageable pieces and design a solution.  For example, if we wanted a program to figure out the least possible number of coins to give a customer as change, we might want to first subtract the amount owed from the amount paid, then figure out how many quarters would go into that, take the remainder and figure out how many dimes would go into that, and then move on to nickels and then pennies.  For more complex problems, making a flow chart can help to organize your thoughts and identify potential issues before you begin programming.

Below are some potential "problems" for you to solve using flow charts.

Flow Chart Practice: 
  1. A movie theater wants a program that will show admission price based on age.  They want to charge children (under 12) and seniors (65 and older) $5.25.  Everybody else will pay $9.25.  They want to ask "How old are you?", let the person put in their age (in years), tell them the price, then tell them to "Enjoy the show!".
  2. A daycare provider wants to give gumballs to their kids, but they want a program that will ask the worker, "How many gumballs?" and then "How many kids?".  Then it should divide the gumballs per kid (gumballs/kids).  Finally it should say, "Each kid gets X gumballs."
  3. You decide to write an app for a SmartPhone.  You want to do a Magic 8 Ball app where you ask a question and it gives you a "Yes" or "No" answer.
  4. You want to write a program that will pick a random number between 1 and 1000.  Ask the player to guess a number and tell them if they are too high, too low, or if they get the number correct.  The program should keep running until they guess the number correctly.

Tuesday, November 7, 2017

Getting Started with TinkerCad


Download the Instruction Guide: (HERE)


Finally, click on: Enter Invitation Code and enter Z2HI9DF


Thursday, November 2, 2017

Bryce: Landscape - Lake or Pond

Today we will use the Bryce Terrain editor to create a lake scene:
  • Insert a Terrain
  • Paint the entire Terrain with a dark gray (very low elevation)
  • Use the soft-edged, smaller brush on the lowest (black) elevation to paint a lake shape
  • Exit the Terrain editor (check mark) to view your new Terrain
  • Click EDIT and drag the Y Axis (Resize) down to flatten your terrain
  • Add a Water Plain and use the  Y Axis (Reposition) to move the water to the appropriate level (so that it shows inside your lake cut-out but doesn't cover the entire Terrain
  • Add finishing touches (additional Terrains for background, adjust textures, change your sky, etc.)
When finished:
  • Save As (as a .BR7 file) to your Thawspace
  • Render your picture
  • When finished Rendering, "Save Image As" and  select JPEG
  • Upload your JPEG to your portfolio blog

Tuesday, October 31, 2017

Bryce: Landscape 1: Island Sunset

Today we will be using Bryce to create a basic island.  You will need to include some of the basics here including the flat plane, the "mountain" terrain, and water.  We will also be editing the "mountain", changing textures, and adjusting the sky/environment.  I will give some specific direction for this project in class.

SET UP BRYCE:

Go to: \\JHS-LAB-M16\Users\LabSoftware
Run: br_ap003_Bryce55

What I would like from you is the following:
  • Change the texture of the first Plane
  • Add a "Mountain" (Terrain)
    • Adjust it so it sinks slightly below the Plane
    • Edit the Terrain (click the "E")
      • Adjust the shape of the mountain
      • Add some Erosion
    • Change the texture of the Terrain
  • Add a Water Plane
    • Edit the texture of the Water
  • Change the Sky
    • Be creative and adjust fog, haze, colors, etc.

Also, if you would like to view a "video tutorial", I am including one below [if you can view the video inside the schools firewall].

Monday, October 30, 2017

One More Project!

I'm sorry that I am out another day.  I will be here tomorrow. 

Today I want you to create a project fully (see last weeks instructions), save images/screen shots/etc., and upload them to your portfolio.

Next, email me (askgriff@gmail.com) and let me know:

  1. What projects or programs have been your favorite so far?
  2. What sorts of projects or software applications would you like to explore?
  3. What can we do to make the class better?
Thanks for your patience!

Griff

Monday, October 23, 2017

Independent Projects: Your Choice

I apologize for being out this week.  I am hoping to be back Thursday, but there's a possibility that I will not be back until Monday.  That being said, I am giving you a choice of projects this week.

Software Address:  \\JHS-LAB-M16\Users\LabSoftware
Your options:
  • Use Sculptris to make some holiday models
    • Halloween could be a ghost or bat or monster or pumpkin or something.
    • Christmas could be a Christmas tree or ornaments or snow man, for example.
    • Easter could be a bunny or chick or Easter eggs or whatever.
    • A birthday could be a cake or a wrapped present
  • Use Sculptris to make a Jellico Blue Devil bust. (Download Head)
    • Add a flat base to the bottom so it could be an actual statue or bust
    • Pay attention to details (wrinkles, veins, hair, etc.)
  • Use Sculptris to make a famous person model. (Download Head)
    • Find some good source pictures on the Internet to model from
  • Use Sculptris to make a pendant model. 
    • Create some sort of model that you [or someone you know] would wear as a pendant -- but make sure to include a loop for a chain to go through.
I will look at the completed models and may bring in a 3D printer to print out some of the good designs.  Maybe we can get you started as a model designer on Thingiverse.
  • Use Sweet Home 3D to create your dream house.
  • Use Sweet Home 3D to create a business you would like to own.
  • Use Sweet Home 3D to create a Zombie Survival Bunker.
When finished... update your Portfolio Blog by putting pictures and a write-up about what you made.  I will be grading the rest of this course on class participation and your Portfolio Blog.  If you don't have a blog (or don't put your finished assignments on your blog) you will NOT get credit for the assignments.

Make Sure you have a finished Sea Creature.  When we get to Bryce, we will need that model.

Finally:  If you finish your project, start another one.  There's no reason to waste lab time when you could be making something.  Let's say you make a cool ghost model for Halloween -- make him a friend.  Maybe you make a cool pumpkin -- so make one with a carved out face.  You make a Christmas ornament -- make a set of them.  Be creative.  Be a maker.

Wednesday, October 11, 2017

Sculptris: Full Body

Download Body Model (If Desired): Click Here

If you want to import the head model you created yesterday:

  • CTRL+O (to open model)
  • Drag the mouse to create one sphere and left-click to place it in the scene
  • Use the SCALE tool to size your head
  • Move the head onto the shoulders 


Tuesday, October 10, 2017

Check Your Work

Before you get going today, please do the following:
  1. Look at the list of portfolios above to make sure I have your portfolio address. (If not, let me know what your address is -- ______________.blogspot.com)
  2. Make sure you have the following assignments on your portfolio:
    1. Veggie Head
    2. Sweet Home 3D House (3 pictures and a floor plan)
    3. Sweet Home 3D House from Floor Plan (3 pictures and a floor plan)
    4. Sculptris: First Project (anything creative)
    5. Sculptris: Sea Creature (with background)
    6. Sculptris: Head (todays project)
    7. Sculptris: Full Body (tomorrows project)
  3. Make sure your Google Drive (http://drive.google.com) is organized into folders.  You may want a folder for "Job Portfolio", "Sweet Home 3D", Sculptris, etc.  

Sculptris: Head

In our last assignment we used a program called Sculptris to create a water creature which we will be importing into an underwater scene in Bryce later on.  Today we are going to continue exploring Sculptris by creating a 3D head.

Although we learned the basics of drawing a human head/face, we don't HAVE to make our creations human.  Be creative.

In these examples (right) I created an alien, a human, and an elf-like head.

Remember to:
  • Save the Sculptris file to your folder.
  • Save the image (PNG or JPG) file to your folder
    • Click OPTIONS > SAVE IMAGE
  • Upload your PNG/JPG file to your Blogger
Download Model: Head



Monday, October 9, 2017

Drawing: Human Heads and Bodies

No, this isn't a drawing class -- but like the "Rule of Thirds" this technique can apply to many of our projects and designs.  Almost everybody who draws a face draws them out of proportion -- usually by placing the eyes too high on the head.

Please follow along with my presentation on the whiteboard so you have a better understanding of facial structures before you begin working on the head in Sculptris.
Notice that if you look at the human skull and divide it into a 4x4 grid, the eyes are directly in the center of the face.
By applying that same division to a human face, we can see that the line appears right on the top of the eyeball in most faces.
You may also notice that the width of the eyes usually equal the distance between the eyes -- and really, on the sides of the face as well.  This diagram shows 5 eye widths on the face.
Another interesting observation is that the center of the eye roughly lines up with the edges of the mouth, and the edges of the nose generally line up with the inside corners of the eye.

Notice in the finished drawing that the same line (now invisible) that ran across the top of the eyes also indicates where the ear joins the head.  Also notice that the eyebrows are not directly centered above the eyes.
You should keep these lines in mind if your figure is not looking directly at you.  Also remember that the head is really skull-shaped with "attachments" (nose, lips, hair, etc.).
While we are on the subject of proportions, this is an interesting general diagram showing human [male] body proportions.  Notice that "one head" is the unit of measure.  At the "second head" the line intersects the models chest -- at the 3rd, across the top of his naval... etc.
And this "sewing guideline" chart shows a few variations to the original.

Finally, here's a video demonstrating the facial proportions:


Friday, October 6, 2017

Sculptris: Sea Creature

Today we are going to be using Sculptris to create a "Sea Creature" -- or some other thing that we can put into our "Under Water Scene" when we get to Bryce.  There's really no right or wrong way to do this assignment (other than, "Oh, look... it's a bubble."), so get creative.

You can see from the examples below that there were several different approaches to this project -- some went for real creatures and some went for fanciful.  Notice the first picture in the set has an underwater background.  That is achievable by changing your background picture in Sculptris.

 


A student designed the following creepy creature in Sculptris...
Then put it in an under water scene in Bryce (another 3D program) later on.

IMPORTANT: I suggest saving regularly as Sculptris has a tendency to crash.  To do so, simply click the SAVE button (or do a CTRL+S) and save it to your Thawspace.  This will save it as a Sculpture file (.sc1).

When finished with your model, I would also like you to Export the file as an Object which we can use in other programs (such as Bryce).  To do so, simply click the EXPORT OBJ button (or do a CTRL+E) and save it to your Thawspace.  This will save it as a Wavefront (.obj) file.

Finally, I would like you to save an image of your file to include on your Blog Portfolio and your deviantART page.  Simply go to OPTIONS and then click on SAVE IMAGE and save it to your Thawspace.  This will save it as a PNG file.

So for each project you should have an SC1, an OBJ and a PNG file.

Thursday, October 5, 2017

Getting Sculptris

Sculptris is an interesting approach to 3D model creation -- sculpting.  Sculptris is a free program (download here) which helps you create models that you can import into other programs (like Bryce, for example).

Today we will be creating an organic shape with Sculptris.  Mostly we will be exploring the different tools, settings, and options -- but you will be turning your project in.

Begin by opening the Sculptris application from your desktop.

When finished, you can save an image by clicking Options (I don't know why) and the Save Image.

Here's a video tutorial (not by me) for beginning Sculptris -- although I will demonstrate at least this much during class.  I am providing it so students who are absent or need a refresher can watch again.



Next we will be attempting a head (monster, human, or otherwise).

Thursday, September 28, 2017

Photo Editing #7: The Gondola

Assignment:  We have accepted an assignment from a client to take a dull, scanned photograph and improve it for use in a poster, brochure, web site, etc.  The client has scanned a photograph of a gondola, but they think it is too hazy... and they don't like the speedboat in the center of the picture... and "the colors are a little blah".  We will use PhotoShop to correct these issues... and more.

Photoshop Tools/Options Used:
  • Ruler
  • Rotate Canvas
  • Crop
  • Levels
  • Clone Stamp
  • Dodge
  • Burn
  • Replace Color
  • Magic Wand
  • Paste Into
  • Free Transform

We will be using the following images to create our final project:
(Right-click each image and save to your computer, then open them in Photoshop.)



Part I: We will begin with the Gondola picture (p_start.psd):
  • Select VIEW > FIT ON SCREEN (shortcut is CTRL+0) to see the image as large as possible
  • Select the RULER tool (sometimes it's hidden under the EYEDROPPER) -- a shortcut is SHIFT+I which toggles through that toolset.
  • Drag the ruler along an edge that should be straight (i.e. the edge of the tower).
  • Select IMAGE > ROTATE CANVAS > ARBITRARY...
  • A suggested rotation is already in place based on your ruler line (this tool is trying to make the ruler line vertical or horizonal)... so click OK.
  • Use the RECTANGULAR MARQUEE tool (the box shape) to select as much of the picture as possible without including the black border (it's okay if you don't get all of the photo in the square).
  • Select IMAGE > CROP
  • Select VIEW > FIT ON SCREEN (again, to see the maximum image size)
  • Select IMAGES > ADJUSTMENTS > LEVELS
  • Drag the "black triangle" in toward the very beginning of the "mountain range" -- and do the same for the "white triangle" (click the "Preview" box to toggle this change to preview what it is doing) then click OK.
  • You now have a brightened, cropped image to work with for the next part.
Part II: Removing the Motor Boat / Using the Clone Stamp
  • Click the CLONE STAMP tool
  • Move your pointer over to a clear area of water -- about the same distance/depth as your motorboat (i.e. somewhere in the same horizontal line) and ALT+CLICK.
  • Move your mouse over to the center of the motorboat and slowly paint over the boat.  Notice the "+" shape where the CLONE STAMP is copying from.
Part III: Adjusting Highlights and Shadows
  • Click the DODGE tool (it looks like a black pushpin) and set the Range for HIGHLIGHTS and the Exposure to around 10%.
  • Adjust your brush size as necessary with the [ and ] keys.
  • Brush over the red and white striped tarp and notice how the highlights are getting brighter.  Try this on other tarps and the side of the boat which seems to get shinier.
  • Click the BURN tool (it looks like a hand pinching and is found under the DODGE tool) and set the Range for SHADOWS and the Exposure to around 5%.
  • Adjust your brush size as necessary with the [ and ] keys.
  • Brush over the boats/tarps just to get a little contrast.
Part IV: Replace the Orange Tarp
  • Use the ZOOM tool (it looks like a magnifying glass) to zoom in on the orange tarp -- making sure you can see the entire thing.
  • Use the LASSO tool and draw around the orange tarp (making a selection)
  • Select IMAGE > ADJUSTMENT > REPLACE COLOR
  • Click on the orange part of the orange tarp.  You should see a faint "mask" of the orange shape appear in the Replace Color box.
  • Hold down the SHIFT key and Click and Drag around the orange tarp trying to select ONLY the orange areas.  If you over-select (i.e. you accidentally go into the black) you can start this step over.
  • When you feel like you have a nice, sharp "mask" of the orange tarps shape, drag the HUE slider left and right.  Notice the colors changing on your image.
  • If you adjust the SATURATION slider and the LIGHTNESS slider, you can actually match the colors of the other tarps on the boat.
Part V: Make Blue Skies From Gray
  • Open the Clouds picture (p_clouds.psd).
  • Click on SELECT > ALL (or do CTRL+A)
  • Select EDIT > COPY (or do CTRL+C)
  • Go back to your Gondola picture.
  • Click the MAGIC WAND tool (SHIFT+W toggles this)
  • Click in one of the "gray" areas of the sky and notice how it selects some of the building tops.  We don't want that.
  • Drop your TOLERANCE down to 10 and see how that works.  Notice that it [probably] doesn't select the entire piece.  We can compensate for that by holding SHIFT and clicking in the "unselected" areas.
  • Continue SHIFT-Clicking the other "gray" areas of the sky throughout the picture.
  • Select EDIT > PASTE INTO (not PASTE)
  • Notice how ugly and unnatural this looks?  Don't worry -- go over to the OPACITY setting (above your LAYERS) and drag that down until it looks natural.  Mine is about 37% [this time].
  • When you are satisfied with your final product, select LAYER > FLATTEN IMAGE.
Part VI: Make the Before and After
  • Go to IMAGE > CANVAS SIZE
  • Change "inches" to percent and change the width (since this is a picture that is taller than it is wide, a side-by-side comparison works best -- so we will adjust the width) and change the 100 to 200 (making it twice the width).
  • Click on the Right Arrow (this means you want your current picture -- the "after" -- to be on the right) and click OK.
  • Copy your original image (in this case, p_start.psd) and Paste it into your finished image.  Use the MOVE tool (the black arrow) to drag it to the left side.
  • You may want to use your FREE TRANSFORM to rotate and resize the original so it fits better.
  • Add your name to the finished image.
  • Save your completed file as a JPEG image to your Thawspace. 
Part VII: Add to Your Portfolio
  • Go to your Blog (http://www.blogger.com/) and sign into your account.
  • Click New Post and make sure "Compose" is selected.
  • Click the IMAGE/PICTURE button.
  • Browse for your picture (from your Thawspace).
  • Add a description about the steps you completed or the process you used in putting this together.  You could even add the reason you did the project (e.g. A virtual client wanted you to clean up an image to use for print/online media).
  • Click PUBLISH POST.
  • Click VIEW BLOG.
If you have difficulty following along and would like to work on this from home, here is a tutorial using the same images:


Wednesday, September 27, 2017

Photo Editing #6: Facebook Cover Photo

Today we will be creating a cover photo for a Facebook page:
  • Width: 851 Pixels (NOT Inches)
  • Height: 315 Pixels (NOT Inches)
  • Resolution: 100 PPI (Pixels Per Inch)
Here's a Facebook Cover Photo template:

Here is the cover photo I created for my Facebook:
 Notice, however, that you have to keep your profile picture in mind when designing your picture:

Tuesday, September 26, 2017

Test



By adding a ground (grass) and sky texture:


\\JHS-LAB-M16\Users\LabSoftware