From: Randolph Wang <rywang@CS.Princeton.EDU>
Date: Sun, 22 Feb 2004 08:19:14 -0500 (EST)
To: tbroderi@Princeton.EDU
Cc: randy_class@CS.Princeton.EDU
Subject: your Turtle exploits
Thanks.
Just for the heck of it, here's a modified version to make it prettier.
http://dsh.cs.washington.edu:8000/Projects/04s126/upload/040222-080808.cgi-lib.16703.1.potential.jpg
Red: high potential, Blue: low potential, White lines:
equi-potentials. My laptop is slow and I didn't have the patience to
wait for it to converge so it's only 2000 iterations.
http://dsh.cs.washington.edu:8000/Projects/04s126/upload/040222-080911.cgi-lib.16829.1.Laplace4.java
I'm putting this up on the "precept6" web site and I'll make you say a
few words about it on Monday :)
Cheers,
Randy
> I can't say the picture is half so exciting as the planets with crazy music, but here's the picture and code :)
>
> -Tammy
>
> P.S. Again, the code calculates equipotentials for a given fixed potential of 0 on the outer square and 100 on the inner by diving the area to be considered into a finite number of points. In each iteration, it takes for the new potential value at a given point the average of the surrounding 4 potential values (right,left,above,below).
your Turtle exploits / Randolph Wang