Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #21192
| From | Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral |
| Date | 2013-09-07 21:21 +0100 |
| Organization | Home |
| Message-ID | <4L3Y5fIEr4KSFwEb@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <2c5d4c48-eb2b-4ade-9a00-6dc5f50c8c87@googlegroups.com> |
In comp.lang.javascript message <2c5d4c48-eb2b-4ade-9a00-6dc5f50c8c87@go oglegroups.com>, Fri, 6 Sep 2013 01:12:03, jonas.thornvall@gmail.com posted: >What i basicly want to do is to call the function anime plotting it again and again from different offsets -> numberGlobal. ( The divisor set >size of square, font) > >But i can not get it to work, anyone good at canvas? > The first thing you should do is learn how English should be written. The second is to read the newsgroup FAQ and see how to write questions for the group. And the third is to start with the simplest possible Canvas and draw the simplest lines on that, getting that right and advancing stepwise whenever your understanding increases. For your primes, I suggest the Sieve of Eratosthenes; on my P4/3G WinXP PC, that takes about 4ms in FF23 & 1ms in Opera 12.16 to calculate primes up to 11111. Consider also those of Atkin and Sundaram, if more speed is needed. FOR OTHERS ALSO : My pages contain shown code actuated by buttons. Usually, it is thought to be obvious that a given button just calls a certain function, but sometimes that is not the case, even though onClick has been set to a shortish string. I **NEVER** like to duplicate code so that one change needs two edits. I have something partly like the following Form, in js-misc0.htm#SE : <form action="#"> <input type=text name=X size=6 value=333> <input type=button value=" B " onClick="TA1.value=EratoB(+X.value)"> <input type=button value=" ? " onClick="TF=this.form ; eval(this.title)" title="TF.TA1.value=EratoB(+TF.X.value)"> <br><textarea name=TA1 rows=6 cols=66 readonly></textarea> </form> There, the buttons do the same when clicked, except that the second pollutes TF, wherever that may be, and hovering over the button reveals its effective code. Of course, 'value' can be used instead of 'title'. Untested : I suppose that I can use onClick="Oozlum(this)" and define Oozlum elsewhere. Any suggestions for improvements? TNNR. FYI - Jibbering may be slow, but patience is a rewarded virtue. -- (c) John Stockton, nr London UK Reply address via Home Page. news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>. <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources. <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral jonas.thornvall@gmail.com - 2013-09-06 01:12 -0700
Re: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral Ken <usenet-so@abdiassoftware.com> - 2013-09-06 18:37 -0500
Re: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral jonas.thornvall@gmail.com - 2013-09-06 23:15 -0700
Re: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-09-07 21:21 +0100
Re: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral Stefan Weiss <krewecherl@gmail.com> - 2013-09-08 02:04 +0200
WAS: Make an anime that draws primes different from offsets number++ , it's a variant of ulam spiral Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-09-09 19:38 +0100
csiph-web