Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32609 > unrolled thread
| Started by | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| First post | 2017-02-11 20:46 -0800 |
| Last post | 2017-02-14 18:27 -0800 |
| Articles | 9 — 3 participants |
Back to article view | Back to comp.lang.javascript
Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-02-11 20:46 -0800
Re: Field Collisions Anime... jonas.thornvall@gmail.com - 2017-02-11 23:00 -0800
Re: Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-02-13 16:15 -0800
Re: Field Collisions Anime... jonas.thornvall@gmail.com - 2017-02-12 01:27 -0800
Re: Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-03-05 18:47 -0800
Re: Field Collisions Anime... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-02-12 07:59 -0800
Re: Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-02-12 20:00 -0800
Re: Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-02-14 18:16 -0800
Re: Field Collisions Anime... "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-02-14 18:27 -0800
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-02-11 20:46 -0800 |
| Subject | Field Collisions Anime... |
| Message-ID | <o7op8l$otg$1@dont-email.me> |
Here is the non-interactive pre-alpha test origin of a "collision avoidance system" based on vector fields. Its meant to be a fun, hopefully interesting, experiment. So far, the damn field lines just want to help the vehicles in circles avoid crashes. In this crude setup, a collision will make the anime flash, and tangentially move the colliding agents out of the way. The crude online example is here: http://funwithfractals.atspace.cc/ct_gf_explore (does this work for you at all?) Fwiw, I first posted about this here: https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf (has a screenshot of the program...) Can you please give it a go? Is it slow as shi%? Crap? Any radical bugs in the JavaScript? ;^o Thanks.
[toc] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2017-02-11 23:00 -0800 |
| Message-ID | <3941dd1c-5151-4a4b-a2d1-b2f5f7021fd5@googlegroups.com> |
| In reply to | #32609 |
Den söndag 12 februari 2017 kl. 05:47:02 UTC+1 skrev Chris M. Thomasson: > Here is the non-interactive pre-alpha test origin of a "collision > avoidance system" based on vector fields. Its meant to be a fun, > hopefully interesting, experiment. So far, the damn field lines just > want to help the vehicles in circles avoid crashes. In this crude setup, > a collision will make the anime flash, and tangentially move the > colliding agents out of the way. The crude online example is here: > > http://funwithfractals.atspace.cc/ct_gf_explore > (does this work for you at all?) > > Fwiw, I first posted about this here: > > https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf > (has a screenshot of the program...) > > Can you please give it a go? Is it slow as shi%? Crap? > > Any radical bugs in the JavaScript? ;^o > > Thanks. It work fine for me, but as you say flashes a bit.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-02-13 16:15 -0800 |
| Message-ID | <o7ti39$sfb$1@dont-email.me> |
| In reply to | #32611 |
On 2/11/2017 11:00 PM, jonas.thornvall@gmail.com wrote: > Den söndag 12 februari 2017 kl. 05:47:02 UTC+1 skrev Chris M. Thomasson: >> Here is the non-interactive pre-alpha test origin of a "collision >> avoidance system" based on vector fields. Its meant to be a fun, >> hopefully interesting, experiment. So far, the damn field lines just >> want to help the vehicles in circles avoid crashes. In this crude setup, >> a collision will make the anime flash, and tangentially move the >> colliding agents out of the way. The crude online example is here: >> >> http://funwithfractals.atspace.cc/ct_gf_explore >> (does this work for you at all?) >> >> Fwiw, I first posted about this here: >> >> https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf >> (has a screenshot of the program...) >> >> Can you please give it a go? Is it slow as shi%? Crap? >> >> Any radical bugs in the JavaScript? ;^o >> >> Thanks. > > It work fine for me, but as you say flashes a bit. > Thank you for trying it out. The flashes are the points I need to refine, wrt choosing other field lines that do not produce collisions. ;^)
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2017-02-12 01:27 -0800 |
| Message-ID | <bd9689e5-2321-4bcc-b09c-ccbc6eda3a25@googlegroups.com> |
| In reply to | #32609 |
Den söndag 12 februari 2017 kl. 05:47:02 UTC+1 skrev Chris M. Thomasson: > Here is the non-interactive pre-alpha test origin of a "collision > avoidance system" based on vector fields. Its meant to be a fun, > hopefully interesting, experiment. So far, the damn field lines just > want to help the vehicles in circles avoid crashes. In this crude setup, > a collision will make the anime flash, and tangentially move the > colliding agents out of the way. The crude online example is here: > > http://funwithfractals.atspace.cc/ct_gf_explore > (does this work for you at all?) > > Fwiw, I first posted about this here: > > https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf > (has a screenshot of the program...) > > Can you please give it a go? Is it slow as shi%? Crap? > > Any radical bugs in the JavaScript? ;^o > > Thanks. But you can't see the code from browser, but i seem to remember something similar getting stucked in a loop toggle forw, back not able to leave. Because the conditions for the loop.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-03-05 18:47 -0800 |
| Message-ID | <o9iiep$vtq$1@dont-email.me> |
| In reply to | #32614 |
On 2/12/2017 1:27 AM, jonas.thornvall@gmail.com wrote: > Den söndag 12 februari 2017 kl. 05:47:02 UTC+1 skrev Chris M. Thomasson: >> Here is the non-interactive pre-alpha test origin of a "collision >> avoidance system" based on vector fields. Its meant to be a fun, >> hopefully interesting, experiment. So far, the damn field lines just >> want to help the vehicles in circles avoid crashes. In this crude setup, >> a collision will make the anime flash, and tangentially move the >> colliding agents out of the way. The crude online example is here: >> >> http://funwithfractals.atspace.cc/ct_gf_explore >> (does this work for you at all?) >> >> Fwiw, I first posted about this here: >> >> https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf >> (has a screenshot of the program...) >> >> Can you please give it a go? Is it slow as shi%? Crap? >> >> Any radical bugs in the JavaScript? ;^o >> >> Thanks. > > But you can't see the code from browser, but i seem to remember something similar getting stucked in a loop toggle forw, back not able to leave. Because the conditions for the loop. > You can see the code from the browser.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2017-02-12 07:59 -0800 |
| Message-ID | <0161d58e-ee3e-408b-aa2d-aa7b0247767d@googlegroups.com> |
| In reply to | #32609 |
Chris M. Thomasson wrote: > Here is the non-interactive pre-alpha test origin of a "collision > avoidance system" based on vector fields. Its meant to be a fun, > hopefully interesting, experiment. So far, the damn field lines just > want to help the vehicles in circles avoid crashes. In this crude setup, > a collision will make the anime flash, and tangentially move the > colliding agents out of the way. The crude online example is here: > > http://funwithfractals.atspace.cc/ct_gf_explore > (does this work for you at all?) > > Fwiw, I first posted about this here: > > https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf > (has a screenshot of the program...) > > Can you please give it a go? Is it slow as shi%? Crap? > > Any radical bugs in the JavaScript? ;^o > > Thanks. averaging about 16 FPS. Nearly 20% of the time spent on Garbage Collection. There are a significant number of optimizations that could be done here, such as double-buffering, not drawing in Immediate Mode, and others. Missing 'use strict' pragma JSHint shows a number of minor issues you should handle: <http://jshint.com/> Aside: You seem to write JavaScript like a C or C++ programmer which is a little strange.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-02-12 20:00 -0800 |
| Message-ID | <o7rate$c6c$1@dont-email.me> |
| In reply to | #32616 |
On 2/12/2017 7:59 AM, Michael Haufe (TNO) wrote: > Chris M. Thomasson wrote: >> Here is the non-interactive pre-alpha test origin of a "collision >> avoidance system" based on vector fields. Its meant to be a fun, >> hopefully interesting, experiment. So far, the damn field lines just >> want to help the vehicles in circles avoid crashes. In this crude setup, >> a collision will make the anime flash, and tangentially move the >> colliding agents out of the way. The crude online example is here: >> >> http://funwithfractals.atspace.cc/ct_gf_explore >> (does this work for you at all?) >> >> Fwiw, I first posted about this here: >> >> https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf >> (has a screenshot of the program...) >> >> Can you please give it a go? Is it slow as shi%? Crap? >> >> Any radical bugs in the JavaScript? ;^o >> >> Thanks. > > averaging about 16 FPS. Nearly 20% of the time spent on Garbage Collection. Yup. Its because of all the damn arrays. The code uses them in the animation loop. Fwiw, this is in relation to: https://groups.google.com/d/topic/comp.lang.javascript/dgakiMzhgv0/discussion I did a benchmark, and the array version is slower. > > There are a significant number of optimizations that could be done here, such as double-buffering, not drawing in Immediate Mode, and others. > > Missing 'use strict' pragma > > JSHint shows a number of minor issues you should handle: <http://jshint.com/> Thank you Michael. Will study the problems. > > Aside: You seem to write JavaScript like a C or C++ programmer which is a little strange. > Big time. I am actually not all that used to JavaScript. However, its a nice little medium to get some quick, hopefully portable, animations up, to see whats going on.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-02-14 18:16 -0800 |
| Message-ID | <o80di7$lle$1@dont-email.me> |
| In reply to | #32617 |
On 2/12/2017 8:00 PM, Chris M. Thomasson wrote: > On 2/12/2017 7:59 AM, Michael Haufe (TNO) wrote: >> Chris M. Thomasson wrote: >>> Here is the non-interactive pre-alpha test origin of a "collision >>> avoidance system" based on vector fields. Its meant to be a fun, >>> hopefully interesting, experiment. So far, the damn field lines just >>> want to help the vehicles in circles avoid crashes. In this crude setup, >>> a collision will make the anime flash, and tangentially move the >>> colliding agents out of the way. The crude online example is here: >>> >>> http://funwithfractals.atspace.cc/ct_gf_explore >>> (does this work for you at all?) >>> >>> Fwiw, I first posted about this here: >>> >>> https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf >>> (has a screenshot of the program...) >>> >>> Can you please give it a go? Is it slow as shi%? Crap? >>> >>> Any radical bugs in the JavaScript? ;^o >>> >>> Thanks. >> >> averaging about 16 FPS. Nearly 20% of the time spent on Garbage >> Collection. > > Yup. Its because of all the damn arrays. The code uses them in the > animation loop. Fwiw, this is in relation to: > > https://groups.google.com/d/topic/comp.lang.javascript/dgakiMzhgv0/discussion > > > I did a benchmark, and the array version is slower. > > >> >> There are a significant number of optimizations that could be done >> here, such as double-buffering, not drawing in Immediate Mode, and >> others. >> >> Missing 'use strict' pragma >> >> JSHint shows a number of minor issues you should handle: >> <http://jshint.com/> > > Thank you Michael. Will study the problems. error 132 is serious, undefined variable.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-02-14 18:27 -0800 |
| Message-ID | <o80e7b$n33$1@dont-email.me> |
| In reply to | #32636 |
On 2/14/2017 6:16 PM, Chris M. Thomasson wrote:
> On 2/12/2017 8:00 PM, Chris M. Thomasson wrote:
>> On 2/12/2017 7:59 AM, Michael Haufe (TNO) wrote:
>>> Chris M. Thomasson wrote:
>>>> Here is the non-interactive pre-alpha test origin of a "collision
>>>> avoidance system" based on vector fields. Its meant to be a fun,
>>>> hopefully interesting, experiment. So far, the damn field lines just
>>>> want to help the vehicles in circles avoid crashes. In this crude
>>>> setup,
>>>> a collision will make the anime flash, and tangentially move the
>>>> colliding agents out of the way. The crude online example is here:
>>>>
>>>> http://funwithfractals.atspace.cc/ct_gf_explore
>>>> (does this work for you at all?)
>>>>
>>>> Fwiw, I first posted about this here:
>>>>
>>>> https://plus.google.com/101799841244447089430/posts/JmbpLWvdJEf
>>>> (has a screenshot of the program...)
>>>>
>>>> Can you please give it a go? Is it slow as shi%? Crap?
>>>>
>>>> Any radical bugs in the JavaScript? ;^o
>>>>
>>>> Thanks.
>>>
>>> averaging about 16 FPS. Nearly 20% of the time spent on Garbage
>>> Collection.
>>
>> Yup. Its because of all the damn arrays. The code uses them in the
>> animation loop. Fwiw, this is in relation to:
>>
>> https://groups.google.com/d/topic/comp.lang.javascript/dgakiMzhgv0/discussion
>>
>>
>>
>> I did a benchmark, and the array version is slower.
>>
>>
>>>
>>> There are a significant number of optimizations that could be done
>>> here, such as double-buffering, not drawing in Immediate Mode, and
>>> others.
>>>
>>> Missing 'use strict' pragma
>>>
>>> JSHint shows a number of minor issues you should handle:
>>> <http://jshint.com/>
>>
>> Thank you Michael. Will study the problems.
>
> error 132 is serious, undefined variable.
>
>
Fixed it. The problem did not hit because that code path was not taken
for this experimental online code. Hit refresh, and look at line 140.
____
if (! aratio)
{
this.m_xstep = axes.width() / ((width > 1) ? (width - 1) : width);
this.m_ystep = axes.height() / ((height > 1) ? (height - 1) :
height);
140: //this.m_xstep /= m_aratio;
//^^^^^^^^^^^^^^^^^^^^^^^^
this.m_xstep /= this.m_aratio;
return;
}
____
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web