Weeks 3 and 4
Assignment #2
-- Due Friday, September 15 Wednesday, September 20th.
a) Make a web page (html) containing a 600 px by 600 px
<canvas>.
Use canvas commands to draw a house with pitched roof, a door and two
windows. Color the roof and the walls of the house with different
colors.
b) Make another page with a canvas element and a collection
of four radio buttons (with values first. second, third and fourth). As
the mouse moves over the canvas make it so that the nth control point (based on the selected radio button)
of a cubic Bezier curve is positioned at the current position of the
mouse.
CSS: The W3C's Working Group
examples
futures: filters and shapes
Putting something where the mouse clicks (old approach)
Adding new stuff to a document (using DOM)
Getting rid of something in the DOM (using removeChild())
cowmove.html (from Friday's class)
form elements (including handling radio buttons)
Assignment #3 -- Due Wednesday September 27
(20 pts total)
Make a page that
- adds a new <div> element, whenever the user clicks anywhere, at a random position within the browser window (all places within the window should be equally likely) (10 pts)
- places
a randomly chosen English word (from among a predefined list of 30
words chosen by you) within that div element. (4 points)
- animates
the positions of all current div tags by having the nth element move
(at some speed chosen by you) in the direction of the n-1st element;
the first <element> should move some proportion (chosen by you)
of the distance between its current position and the position of the
mouse. (4 points)
- whenever a particular element is clicked
upon, it is deleted, but all the others remain, with that element's
follower now instructed to follow the element that the deleted one had
been following (before deletion). (2 points)