project 0
Part A. Noll Pattern
/* @Cheng @Jan 11, 2010 Ninety Parallel Sinusoids With Linearly Increasing Period https://ems.andrew.cmu.edu/2010spring/projects/project-0/ */ import processing.pdf.*; float altitude=20.; // altitude of sine wave float gain = .0038; // how fashttps://ems.andrew.cmu.edu/2010spring/wp-admin/media-upload.php?post_id=576&TB_iframe=truet the period grow float period ; // float initialPeriod = .55; int LeftMargin = 0; // white space int upperMargin =5; int x ; float y ; smooth(); size (400,410,PDF,"NollSine.pdf"); background (255); noFill(); strokeWeight(.7); for (int i =0; i<90; i++){ //point() could induce discrete point;vertext works better beginShape(); for (x=LeftMargin; x<degrees(width); x++){ period = initialPeriod+gain* float(x) ; //increase period //notice y axis direct downwards; sine wave needs to be reversed y = upperMargin + altitude*(-sin(2.*PI*radians(x-LeftMargin)/period)+1.); vertex (x,y+i*4); } endShape(); } |
GDE Error: Unable to load profile settings
Part B. Pong Game
WordPress has been constantly deleting the iFrame code, so just click on the link
Comments Off on project 0