





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































During the last lecture we discussed Event handling
Event Driven Programs
JavaScript’s Handling of Events
In-Line JavaScript Event Handling (2)
Usage Guideline
onLoad & onUnload
A Note on Syntax (1)
Today’s Goal (Mathematical Methods)
But first, let’s plot the sine function…
Let’s first take a look at the plot, and then we will discuss how to draw it
Sine Function Plot
(^19)
function plotSine( ) {
var ht, wd, rowN ; // rowN is the row number ht = 15 ; // height of the half cycle wd = 90 ; // width of the plot
document.write( "sin(x)" ) ;
for( rowN = ht; rowN >= -ht; rowN = rowN - 1 ) { plotRow( rowN, ht, wd ) ; } } (^20)