Art 101, Spring 2015: Homework 04

NOTE:
M1 = Myers, Smarter Way HTML & CSS
M2 = Myers, Smarter Way JavaScript

Assignments, posted Monday, 4/20

A. From M1, read the text, Chs. 34-40, and do the corresponding online exercizes.

B. Update the website for your homework for this course.

  • B1. Create a folder in your website for your homework for this week, named "week-04"
  • B2. Edit your homepage, choosing fonts, colors, borders, margins, etc, as you please.
    Include an image on the page.
    A list of links on your homepage should point to your assignments, including the new one.
  • IMPORTANT: The link for week-04, should be to the FOLDER "hw-04"
    and NOT to any HTML page contained therein.
  • B3. Create an index file, "index.html" for the new folder.
  • Include links to the HTML, CSS, and JS files for you solution to part D of this assignment.
    Include an image on the page, relevant to part D.
    Include a detailed description of part D (variables, functions, etc).
    Include a list of your team members with URLs.
    Include brief indications of the contributions of each team member.
  • NOTE (added on Friday, 4/24)
    If your description is rather long (which is fine) you may prefer to write it to a separate file,
    such as "readme.txt", or "about.html", and inclde a link to this file on the page "index.html"
    after the links: HTML, CSS, JS.
  • C. From M2, read the text, Chs. 31-38, and do the corresponding online exercizes.

    D. Create a triple (hw-04.css, hw-04.html, and hw-04.js) to exhibit drawing to the canvas element.

  • D1. The HTML page (hw-04.html) should include:
    • The link to the JS code shoulld be in the head section (see example 4-06).
    • The elements: header, section#graphics, and footer.
    • The header section should include the title of the project.
    • The graphics section should show a drawing of the "hsuan thu" diagram from
      the chinese proof of the pythagorean theorem, created in a canvas element by JS code.
    • The footer section should incliude the date and time last modified (see example 4-05).
  • D2. The CSS page (hw-04.css) should control the position of the canvas element (see example 4-06).
  • D3. The JS page (hw-04.js) should include:
    • A window.onload method.
    • A globalApp function (see example 4-06).
    • The definition of a function "drawtri" with six arguments, (x1, y1, x2, y2, x3, y3)
      which draws a triangle with vertices (x1, y1), (x2, y2), and (x3, y3) (improving on example 4-03)
    • The definition of a function "drawfig" which draws the "hsuan thu" figure, using the function "drawtri"
    • Extend the figure by making each of the four triangles a different color
    • HINT for coordinates for this assignment.
  • D4. Post your homework D in the folder for this week.

  • Revised 24 April 2015 by Ralph