CSC 220.010CPVL - Object Oriented Multimedia Programming, Fall 2018, TuTh 12-1:20 PM, Old Main 158.
CSC 220.020CPVL - Object Oriented Multimedia Programming, Fall 2018, TuTh 1:30-2:50 PM, Old Main 158.

Class will meet in the Kutztown University Planetarium (Grim 100) during our final exam periods.
    Attendance is mandatory and is worth 10% of the final project.
    The noon class exam time is Tuesday the 11th at 8-10 AM.
    The 1:30 class exam time is Thursday the 13th at 11 AM until 1 PM.

My office hours for final exams week December 10-14 are:
Monday 12:30 - 2:30 PM (normal hours)
Wednesday 3:30-5:30 PM (half hour later than normal)
Thursday 2:30-3:30 PM (no Tuesday)

There is not going to be a final exam, except for students who request one. I assume no one will. For everyone else, from the first day handout:
Midterm exam 15% of grade
Final exam 15% of grade (non-cumulative exam)
Projects 70% divided among the project assignment deliverables
I will take those 15% from the final exam and distribute them across your 3 best assignment grades, 5 points for each. With 4 assignments, the three best grades will contribute 22.5% of your grade; the worst will contribute 17.5%; the midterm 15%. This works to your benefit.

I would like to promote two 1/2-semester courses being offered by Communication Design in Spring 2019
That have CSC220 as a prereq: CDE 349 – Physical Computing and CDE 348 – VR/AR/Mixed Reality.
    The courses run Mon/Wed 12-3.
Physical Computing will be an introduction to electronics using input/output hardware with Arduinos and some projection mapping. VR/AR will focus on building interactive environments in VR or AR using either web-based tools (like a-frame) or native games using Unity. We purchased new equipment for both of these courses over the summer, so we should be set for whatever the students want to build.
Both courses are project-based, they will work like the Team Project course (could be group work), so after discussing and pitching an idea, students will spend the semester building their project.

Dr. Dale E. Parson
Fall 2018 Office Hours (Old Main 260): Mon 12:30-2:30, Tu 3-4, Wed 3-5, or by appointment
First day handout (syllabus that is specific to this semester).

RESOURCES & HANDOUTS

Why Love Generative Art? is extremely well written, comprehensive, and worth reading.

Shiffman's textbook's website including Examples and Exercises that will familiarize you with Processing.
    On overnight reserve in Rohrbach Library.
Software setup instructions:
    1. On your Windows U:\ drive, create a new folder called Processing.
        U:\ is available anywhere on campus and does not auto-delete files.
        Do not store files on your PC desktop. They will be gone after you log out.
    2. Use the Windows Explorer to create folder U:\Processing.
    3. Every time you start Processing, go to Preferences and change the Sketchbook location to U:\Processing.
        You must create folder U:\Processing the first time you want to use it.
        To run Processing, find Processing under S:\ComputerScience on your PC.
    5. All of your practice and assignment sketches must reside under U:\Processing.
    6. If you Download & Install Processing on your home machine, use the latest version Processing 3.x, currently 3.4.
        I don't usually upgrade the version mid-semester, in the interest of stability, unless I need a specific bug fix.

The official Processing website has many examples and library documentation.
Here is the Library Reference. Keep this handy at all times!
The Reas & Fry book, Second Edition. (On overnight reserve in Rohrbach Library.)
We will occasionally import classes from the Java class library, which comes with all standard Java installations.

p5.js and the Getting Started pages.

Java class library https://docs.oracle.com/javase/8/docs/api/index.html
MIDI Fanatic's Technical Brainwashing Center is the best site for MIDI specifications.
        Follow Technical Docs and Programming -> The MIDI Specification from that page.

My slides on MIDI and PCM (Pulse Code Modulation) Digital Audio.

MY HANDOUTS

We'll use my solution to spring 2018 csc120cpvl assignment 3 as an intro to interfaces & classes.
Spring 2014 Java slides on exceptions

Spring 2014 Java slides on generics


MIDTERM PREPARATION
The exam will take place on Tuesday, October 23.
    The 1:30 section will meet in Old Main 299 on the day of the exam.
ZOOM video recording of exam overview from Oct. 16, may require you to download/install Zoom app.
Key Object-Oriented Concepts for the fall 2018 midterm.
    Understand the linked diagram and concepts covered for assignments 1 and 2.
    Interface inheritance allows a Java interface to specify methods supplied by subclasses (a.k.a. derived classes).
    Polymorphism allows a local variable, a method parameter, or a field in an object that is declared as an interface or base class type, to take "many forms" by taking on references to objects of derived classes.
    Reuse is simply using a class, method, or data field in more than one place without recording it.
    Implementation Inheritance allows a Java derived class to inherit working methods and data fields from its base class.
        The derived class can reuse, or redefine, or extend methods found in its base class, and add new data fields and method.
    Encapsulation is the containment and access control associated with putting data and code into a method or class.
        Local variables and code within a method are not visible outside of the method.
        Class data fields and methods have the following access modifiers in Java.
            public means that a data field or method can be accessed by any code with a reference to its object.
            private means that a data field or method can be accessed only within its class.
            protected means that a data field or method can be accessed only within its class or subclasses of its class.
            package-private (no keyword) means that a data field or method can be accessed only within its class or classes in its package.
    Introduction to PShapes for vector graphics (e.g., SVG files), and PImages for raster files.
    Vector graphics describe shapes and text mathematically.
        They do not lose detail when scaled up, and do not create pixels until rendered on a screen or projector.
        The laser projector in the planetarium is a vector display.
    Raster graphics are collections of picture elements (pixels), i.e., images such as PImage.
        We are using only raster displays this semester. They have pixels.
    Basic Processing library functions -- know what they do. I will not ask detailed questions about parameters, etc.
        setup(), draw(), width, height, rect(), ellipse(), quad(), line()
        fill(), stroke(), strokeWeight(), tint()
        Know how to use fill-stroke() to set gray scale (monochrome) using 1 or 2-argument calls (0 is black, 255 is white, 1..254 are shades of gray). An optional second argument is alpha.
        2D Geometric primitives: pushMatrix(), translate(), rotate(), scale(), popMatrix()
        3D extensions: translate() with 3 parameters, scale with 3 parameters, rotateX-rotateY-rotateZ(), sphere(), box()
        This section of the exam will come right out of the work you do on the assignments.
    The exam is a closed book, conventional exam on paper.
    Types of questions include multiple choice, one-word fill in the blank, & short sentence answers.


Introduction to 3D graphics, images, PShapes and groups.
Copy & paste into Processing sketch & run.
    GeoCSC220Intro3D.txt and GeometricDealy.txt go into a GeoCSC220Intro3D sketch together as .pde files.
            Just copy the text & paste into Processing.
    PShape3DGroups.txt becomes PShape3DGroups.pde, requires Window250x250.png.
    PShape3DGroupSquares.txt uses 2D squares of vertices to create a 3D composite PShape, from 2/15 Wed evening class.
        No PNG image file is needed for
PShape3DGroupSquares.
    PShape3Spring2016.txt becomes PShape3Spring2016.pde, requires Window250x250.png.

Introduction to PShapes for SVG files and other vector graphics, PImages for raster files, and text display.
    PNGandSVG.txt source requires GetToWork.svg and atom2g.3.png in the sketch directory.
    PowerPoint slides from 3/1 (whiteboard illustration on 2/28).
    If you use Illustrator to capture a SVG file, use these Save As options! Processing loses color info with some other settings.

Musical Instrument Digital Interface (MIDI) examples. Copy & paste into Processing sketch & run.
    DemoMidiSpring2016.txt demonstrates the Java MIDI API for output.
    MidiKBSpring2016Parson.txt demonstrates laptop keyboard-as-output-instrument.

ASSIGNMENTS

Assignment 1, due by 11:59 PM on 9/22 via D2L.
See spring 2018 csc120 page for instructions on zipping multi-file sketches & on using Illustrator SVG files.

Prep for Assignment 2 - we will go over these in class starting September 18.
    Vis4CSVWater is a data visualization sketch that uses VIS4CSV2012.csv as data.
    Shape3DDemo demos a 3D box, sphere, and a custom pyramid made of a GROUP PShape.
    avatarClassIn2DRoom is a halfway step from my Assignment 1 handout to 3D Assignment 2.
    avatarClassIn2_5DRoom completes the main avatar in 3D, not the room, useful for debugging its body.
    avatarClassIn3DRoom is my complete working solution. Your requirements are in comments at the top.
        TriTexture.jpg is the image I am using to texture the planar side of a custom PShape.
    Differences between avatarClassInAvatarRoom (<) and avatarClassIn2DRoom (>).
    Differences between avatarClassIn2DRoom (<) and avatarClassIn2_5DRoom (>).
    Differences between avatarClassIn2_5DRoom (<) and avatarClassIn3D room (>).
    LittleBoxes2017Parson.txt and its required image file for applying 2D textures.
    My video work [De]Fragmenting Architecture for examples of perspective projection.
Assignment 2 handout, due by 11:59 PM on Saturday October 13.
    There is a video on how to start Assignment 2 if you haven't yet. You'll need to download the Zoom app when prompted.
    Another Zoom video, from 10/18, on how the camera() point of view and world rotations work in assn2.

Assignment 3 handout, due by 11:59 PM on Tuesday November 20.
    There is mandatory attendance in planetarium test session on November 15 worth 10% of the project.
    Handout starting code PaintDomeAndroid2018, its added tab Menus, and PaintDomeServer2018.
    PaintDomeServer2018 needs to have CenteredClippingCircle.png in its sketch directory.
    Zoom Recording of 10/30 introduction to PaintDomeAndroid2018 & PaintDomeServer2018
    Zoom Recording of 11/01 on student-related code in base class Menu above.
        At the 14:25 minute mark in that last recording is the start of explanation of code in tab Menus.
    Zoom Recording of 11/06 goes over Assignment 3 handout.
BUG FIX TO abstract class Menu 11/11/2018
On 11/11 I have re-posted handout Menus.pde at http://faculty.kutztown.edu/parson/fall2018/Menus.txt because there were some bugs in handout abstract class Menu when the number of brush names differ from the number of brush commands. The original handout PaintDomeServer2018 has exactly 25 brush names and exactly 25 commands, so the bugs in abstract class Menu did not cause any problems. However, when there were more or fewer brush names than commands, ArrayIndexOutOfBoundsExceptions  and NullPointerExceptions were happening in the client. It showed up on my Android device, but I was able to debug it running the client on a laptop. You should be safe if you don’t change PaintDomeServer2018 to have a mismatch between number of brushes and number of commands, but if you want to play it safe, just use your mouse to copy ONLY all of the code in abstract class Menu and then paste that code over top of abstract class Menu code in your client sketch in Menus.pde. DO NOT copy&paste either class ResponsiveText (although it did not change) or anything below abstract class Menu. DO NOT paste over top of your work. Make sure the to refresh your browser page for Menus.txt. It should contain some comments like this:
// DEBUG 11/11/2018
11/14/2018:
All assignments are due via D2L by the due date end of Tuesday. If you are programming in a team, put both team member names in comments AT THE TOP OF Menus.pde, since Menus.pde is the only file you need to turn in. A team needs to turn in only 1 copy of Menus.pde.

Assignment 4, PaintDomeServer2018B and an image file due by 11:59 PM on Saturday December 8 via D2L.
    Here is the Zoom video recording of my 11/18 lecture on Assignment 4. We will not have class on 11/20. View this instead.
    Starting code for the 12:00 PM 010 class section f
or Assignment 4.
    Starting code for the  1:30  PM 020 class section for Assignment 4.
    Here is an updated PaintDomeAndroid2018B and Menus-tab file that improves the GUI & changes the OSC application protocol.
    PaintDomeServer2018 needs to have CenteredClippingCircle.png in its sketch directory.
    My unfinished example class needs file junior.png in the server sketch directory as well.
    The Zoom recording of 11/27 covers using Processing's filter() function or Photoshop to boost color contrast in your PImage.
    Zoom recording of 11/29 on manipulating pixels to make part of a PImage object transparent.
        My demo sketch ColorPosterizeDemo2018 and DrParson06112018.jpg built in these 2 Zoom recordings.