Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.lang.javascript > #20
| X-Received | by 2002:a37:660e:: with SMTP id a14mr22756472qkc.330.1605980475552; Sat, 21 Nov 2020 09:41:15 -0800 (PST) |
|---|---|
| X-Received | by 2002:a25:2f51:: with SMTP id v78mr33664278ybv.235.1605980475364; Sat, 21 Nov 2020 09:41:15 -0800 (PST) |
| Path | csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail |
| Newsgroups | alt.comp.lang.javascript |
| Date | Sat, 21 Nov 2020 09:41:15 -0800 (PST) |
| In-Reply-To | <7d9bb0bf-0d27-4786-b7ae-665f35b8abbcn@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | google-groups.googlegroups.com; posting-host=85.253.192.47; posting-account=rGv05goAAABnbWq5PzJ_7qClHxxqxw-_ |
| NNTP-Posting-Host | 85.253.192.47 |
| References | <7d9bb0bf-0d27-4786-b7ae-665f35b8abbcn@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <0c602bfa-360f-4c7c-976c-05bdcab79257n@googlegroups.com> (permalink) |
| Subject | Re: All given colors to picture, so that neighbor color total difference is minimum |
| From | Aman Livinginviljandicity <he12457@hotmail.com> |
| Injection-Date | Sat, 21 Nov 2020 17:41:15 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 38 |
| Xref | csiph.com alt.comp.lang.javascript:20 |
Show key headers only | View raw
Here is my startpoint code for those, who would like to help me with programming it.
<html>
<body>
<canvas id="canvas" width="2000" height="1100"></canvas>
<script>
function draw() {
var ctx = document.getElementById('canvas').getContext('2d');
var a=new Array();
for (var i = 0; i < 256; i=i+2) {
for (var j = 0; j < 256; j=j+2) {
for (var k = 0; k < 256; k=k+1) {
a.push('rgb(' + i + ', ' + j + ', '+k+')');
}
}
}
var c1=0;
for (var i = 0; i < 2000; i++) {
for (var j = 0; j < 1100; j++) {
ctx.fillStyle=a[c1];
ctx.fillRect(i,j,1,1);
c1++;
}
}
}
draw();
</script>
</body>
</html>
Khristjan Robam
Phone number: 372 57865442
E-mail: he12457 hotmail com
Back to alt.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
All given colors to picture, so that neighbor color total difference is minimum Aman Livinginviljandicity <he12457@hotmail.com> - 2020-11-21 09:39 -0800
Re: All given colors to picture, so that neighbor color total difference is minimum Aman Livinginviljandicity <he12457@hotmail.com> - 2020-11-21 09:41 -0800
Re: All given colors to picture, so that neighbor color total difference is minimum Aman Livinginviljandicity <he12457@hotmail.com> - 2020-11-21 09:58 -0800
Re: All given colors to picture, so that neighbor color total difference is minimum Aman Livinginviljandicity <he12457@hotmail.com> - 2020-11-21 10:17 -0800
csiph-web