Skip to content

Commit 3ec9cf3

Browse files
authored
Update README.md
1 parent b802530 commit 3ec9cf3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ The following educational video provides the code walkthrough and illustrates it
1010
m = document.getElementById("gardun").getContext("2d")
1111
atom = function(x,y,c){m.fillStyle=c; m.fillRect(x,y,3,3)}
1212
for(y=1; y<1000; y++){
13-
for(x=1; x<1000; x++){
14-
dx = (x-500)/2000-0.12
15-
dy = (y-500)/2000-0.82
16-
a = dx
17-
b = dy
18-
for(t=1; t<200; t++){
19-
d = (a*a)-(b*b)+dx
20-
b = 2*(a*b)+dy
21-
a = d
22-
H = d>200
23-
if(H){atom(x,y,"rgb("+ t*3 +","+ t +","+ t*0.5 +")"); break}
13+
for(x=1; x<1000; x++){
14+
dx = (x-500)/2000-0.12
15+
dy = (y-500)/2000-0.82
16+
a = dx
17+
b = dy
18+
for(t=1; t<200; t++){
19+
d = (a*a)-(b*b)+dx
20+
b = 2*(a*b)+dy
21+
a = d
22+
H = d>200
23+
if(H){ atom(x,y,"rgb("+ t*3 +","+ t +","+ t*0.5 +")"); break }
2424
}}}
2525
</script>
2626
```

0 commit comments

Comments
 (0)