Arch227B/D242/D142
Work in groups of two.
Ask questions to Grace (grace_tsai@yahoo.com) or Kostas (kostas@ucla.edu)
Objective:
Write the source code (with comments) for an applet that will display a 100x100 cloud of points created through assigning z values (height) as shown in the code below. Fill in the c1, c2, and c3 variables using mathematical functions to create interesting patterns (for example c1 may look like: int c1 = (int)(255. * Math.sin(Math.PI/180. * i));. ). Then rotate the cloud structure and take snapshots of the display:
. . . .
//*****************************************
public void init(){
MyPoint[] points;
Points = new MyPoint[100*100];
for(int i=0; i<100; i++)
for(int j=0; j<100; j++){
int c1 =
int c2 =
int c3 =
points[i*100+j] = new MyPoint((double)i, (double)j,
(double)((c1+c2+c3)/3));
}
}
. . . .
Bonus:
Excessive creativity will be kindly appreciated and highly rewarded.
Deadline:
Thursday Jan 25, 2001 (midnight)