Miles Mathis' Charge Field
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Possible Charged Particle Field

4 posters

Page 12 of 15 Previous  1 ... 7 ... 11, 12, 13, 14, 15  Next

Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Nov 18, 2018 1:51 am

No, it would be this one https://git-fork.com/.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Nov 18, 2018 12:03 pm

.
Possible Charged Particle Field  - Page 12 Newfor10
Fork is installed. I 'dropped' my local repository into it and it looks up to date. It's not as polished as sourcetree, but I don't need polish. It tried to Fetch, no joy, I believe the next step would be for me to load the bitbucket source file https://bitbucket.org/Nevyn2k/chargedparticleinteractionmodel, but I haven't found where to load the address yet. Maybe I should try to find some instructions or readme files.  

Any suggestions? Like starting over by cloning? You indicated your interest in Fork, have you installed or tried it?
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Nov 18, 2018 5:21 pm

I just installed it and it took a bit of effort, but got it hooked up to BitBucket.

Fork does not come with a built-in GIT system, so it assumes you have that installed on your system. I think you already did anyway.

I don't think it saves your credentials, so it is always asking you to enter in your password. A bit of a pain. There is an option in the preferences to turn off automatic fetches, I recommend you turn that off as it brings up a password dialog for every single repository you have open. That may not be so bad for you, but I can have quite a few open at any given time.

Did it give you an error message when you tried to fetch?
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Nov 18, 2018 6:50 pm

.
Possible Charged Particle Field  - Page 12 Fetcho10
Yes, it errors while fetching. In exlorer, I took the chargedparticle.. folder which was inside my GIT folder,  C:\Users\Robert\Documents\GitFolder\ChargedParticleInteractionModel and dropped it where Fork said to 'drop here'. I didn't load the bitbucket address anywhere. The Fork 'process' seems a little different, https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/ more interesting process than I realized. I haven't looked at it yet since we're entertaining the kids today. affraid  I gotta share the machine now.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Nov 18, 2018 8:30 pm

Well, that is an incredibly unhelpful error message! That could be anything. I suggest you just clone the repo again and see if that helps. Maybe move your existing one in case something goes wrong.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Nov 18, 2018 10:05 pm

.
I suggest you just clone the repo again and see if that helps. Maybe move your existing one in case something goes wrong.
What you're saying is way scarier than the kids, I'm going to have to go to bed early now. I haven't cloned anything yet. I think that's my problem.

I realize I left something out - important, probably. Fork asked where I wanted to place a repository, so I created a new folder; C:\Users\Robert\Documents\New Fork. I didn't see anything in the folder, then or now - I thought it was a bust. Now I'm thinking that when Fork asked me to 'drop here', I should have given it the bitbucket repository address. When I gave it my chargerparticle... folder, I identified my own folder as the origin/remote repository. Maybe Fork is trying to get in touch with the GitFolder and failing to create a Fork clone in the New Fork folder? I haven't had to enter any userID or password during any of the Fetch requests. Again, I don't see how or where to enter the bitbuket html address, so I probably did it wrong.

Does that sound reasonable? I would really prefer we maybe run through the proper Fork settings without worrying about backing up my GitFolder before I do what exactly? Writing this, I've convinced myself Fork hasn't cloned anything, that image I showed you just shows the Git commit history from the GitFolder repository. Should I backup my GitFolder? It includes the duplicate folders with altered chargedparticlenames alongside chargedparticle..., still available to Git if they were properly addressed. I suppose I should have thrown them out.

Anyway, if all I need to do is relocate my origin and local repositories so that I may do a proper clone. Switch New Fork with chargedparticle, or a copy of chargedparticle... . Then How would I link to the Git application? Could we do that from the app itself?

Forgive my desperation. I appreciate your expertise. Direct, simple instructions, are most welcome.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Nov 18, 2018 11:25 pm

You can just keep Fork pointed to that new folder and work from there. Clone the repo from BitBucket, you will need to enter in the Bitbucket URL (https://Nevyn2k@bitbucket.org/Nevyn2k/chargedparticleinteractionmodel.git) for the project at this step and your credentials.

Or you can point Fork to your previous GIT folder (File -> Preferences -> Default GIT folder) and it will pickup the existing projects. This is probably easier and you keep working in the same folders that you were before.

If you take the second option, then you will need to enter your credentials when you Fetch.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Mon Nov 19, 2018 11:11 am

.
I used sourcetree to Fetch and Pull your latest checkbox addition. No problem.

Possible Charged Particle Field  - Page 12 Noclon10
Fork status. I went with your first paragraph first and requested that a clone of chargedparticles... be placed in New Fork. I specified the bitbucket address and received the error output shown. I added the clone details on top to show I used the correct bitbucket address. I did not see any log-in or password request from Fork or bitbucket so I think I may need to enter my credentials into Fork before making any other bitbucket requests - just guessing.

There's no rush. I'll work on the program before going back to Fork. When I do I'll try your next suggestion.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Mon Nov 19, 2018 7:04 pm

Do you have a Firewall that is stopping Fork from accessing the internet?

It is such a low-level and generic error that it is very hard to have any idea of what the problem could be.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Mon Nov 19, 2018 10:30 pm

.
Do you have a Firewall that is stopping Fork from accessing the internet?
Good question, that's a real possibility that would never have occurred to me. I pay for Webroot Security(?). I'll check with my support team - my son and his wife will stop by for Thanksgiving on Thursday. There's a lot happening real world here - family mainly. A lot of unplanned changes. Software changes are also a negative stresser.  

With respect to the program, I enjoy it and like showing it to family and friends. So what they think I'm a bit crazy, it's not political. Don't worry about my slow motion, Two Body UI allows the opportunity to learn and understand the difference between spin and orientation and axisangle; before I can code with confidence. It's not difficult, again, once you get it. I expect to be moving onto Three Body UI tomorrow or so.

Would it be too difficult to add the ability to change the UI values to the last values selected (during that session)? One wouldn't need to re-enter all the changed particle parameters every time - you could just change the one you want.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Mon Nov 19, 2018 10:50 pm

I'm not worried about pace. I haven't done much on it lately either.

Now that you are getting familiar with the UI changes, have you given any thought to any new scenarios that could be created because we can ask the user for input? Has it changed the way you think about scenarios at all?

I know exactly what you mean about the UI values being saved. It would be nice, however, most things reload the page which loses all changes made by the user. I don't want to encode those values into the URL, as that would be a pain, but we could maybe create a new button along-side Reset and Reload that will Reconfigure by showing the dialog again and resetting the model. Any values changed in the dialog controls will remain as-is until the page is reloaded.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Wed Nov 21, 2018 7:32 pm

.
I missed your post, and have just now read it.

I definitely believe that it's possible for the user to generate new scenarios using a UI. For example, The Two Body UI could (with a little more control over the 0,0,0 particle) allow the user to recreate any of the Two Body scenarios. But while those scenarios are limited to x and y alignments and a few orientations and spins, the UI allows particles to be placed anywhere the user wants with any spin or orientation desired. Why not allow them to substitute neutrons or electrons instead of the protons? And construction rules. That sounds like a new atom builder. Though I would suppose we would need neutrons with pole to pole charge currents first. I'll give the idea of User generate scenarios more thought. 

A new Reconfigure button sounds interesting.

Two Body UI is still giving me problems:

1. Currently, var q = new THREE.Quaternion().setFromAxisAngle( axisA,  Math.PI/2 );//
Obviously it must always rotate 90 degrees around axisA. I’ve tried various ways to try and get the proper user entered axisAngle angle into q[3]; nothing worked so I substituted Math.PI/2 for the time being.

2. Use the checkbox. It is checked; the message reads - Uncheck to remove the 0,0,0 particle spin. I created var centerSpin = new Boolean(null); but no matter whether the console showed centerSpin to be true or false, I haven’t come up with a means of using it to apply the factory spin.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Wed Nov 21, 2018 7:48 pm

var centerSpin = new Boolean(null);

That doesn't look right. If you just want to set it to something, then just set it to true or false

var centerSpin = true;

The values you get back from the UI are already sanitized, so it will be either true or false, depending on the state of the control. Assuming you created a checkbox control with an id of myCB, then you just use it in the success function like this:

var centerSpin = values.myCB;

or just use values.myCB directly.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Wed Nov 21, 2018 9:38 pm

.
I usually make it a point to make the effort and suffer before asking for help. I was close to burning myself out a few days ago.  

Your solution, var centerSpin = values.myCB;

worked perfectly. That is, of course, after I changed the checkbox id from centerSpin to myCB.

I was under the impression that the control .id(‘whatEvah‘) must also be a declared variable, var whatEvah; else there would be no way to transfer the user values across the success, createForm and the twoBodyUI functions. I see I was incorrect.

Thank you. With that new understanding, I’ll give the axisAngle another whirl. I believe I might even get so far as to include that degree to radian calculation I'd been waiting to try.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Wed Nov 21, 2018 10:32 pm

The id of the control is used as the name of a variable in the values object passed in to the success function.

So if you have 3 controls with ids: ctrl1, ctrl2 and ctrl3, then the object passed in to success will look like this:
Code:
{ ctrl1: <some value>, ctrl2: <some value>, ctrl3: <come value> }

Code:

var success = function( values )
{
   // if ctrl1 is a checkbox
  if( values.ctrl1 )
  {
    // ctrl2 is a number control
   for( var i=0; i<values.ctrl2; i++ )
   {
      // ctrl3 is a vector
      var v = new THREE.Vector3(
         values.ctrl3[0] * ( Math.random() - 0.5 ),
         values.ctrl3[1] * ( Math.random() - 0.5 ),
         values.ctrl3[2] * ( Math.random() - 0.5 )
      );
   }
  }
};
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Fri Nov 23, 2018 1:39 pm

.
Thanks, your 'control values' explanation did the trick, both the Two and Three Body UI scenarios are initially complete. I’m sure I’ll want to add additional (0,0,0) particle controls, probably with additional checkboxes on the Overview tab in order to minimize the tab space needed. And then on to Four Body UI. I didn't see a need to eliminate any Two or Three Body scenarios; if you feel we should pare the scenario list down a bit, please say so, and I will.

Git Status. I Pushed the latest changes with Sourcetree without any terminal problems - to be honest I still have no desire to use the interface beyond Commits. I realize I've put a crimp in working this project by sticking to the Main, thanks for your patience and cooperation. Fork. Fork is waiting for me to Commit my latest changes that I already Pushed in Sourcetree. My latest clone requests were unsuccessful, with errors - not labeled fatal this time, while watching my security app, which doesn't seem to be interfering with Fork. There is now a 19 KB .git folder in the New Fork\chargedparticleinteraction folder.  
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Nov 25, 2018 12:03 am

.
Possible Charged Particle Field  - Page 12 Fourbo11
Update. Four Body UI is initially complete. I added Checkboxes for protons (check) or neutrons (uncheck); and small random values to each particle position. I suppose I should let the max random value be user selectable. Not much room left. Should velocities be included? The Body 3 and Body 4 tabs are the same as Body 2’s tab. Feel free to critique.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Nov 25, 2018 11:34 pm

"Check for Proton, Uncheck for Neutron"

Checkboxes are for enabling/disabling something, not selecting between 2. In the code it might be doing just that, but it should not appear that way to the user. If you have to explain the 2 options, then a checkbox is the wrong control to use. Radio buttons would be better, but I haven't implemented that yet, so use a dropdown list. A dropdown list will also make it easier to add new types, for example, electrons.

"0, 0, 0 Particle"

Give it a name. Central particle, maybe. And give it its own tab.

"Select the spin axis. X, Y or Z"

Don't specify the options in the title. They can drop the list down to see what they are.

"Particle spin speed, ..."

Don't put math in the titles.

"Axis"

Isn't very descriptive and it isn't an axis. It is an axis angle, but what is it being used for? The spin axis and speed have been set above that, so what it this doing? I guess it is the orientation, but I only know that because I know the underlying code.

In general, try to be descriptive, but concise. Not easy, I know, but it is a goal to aim for, if not actually reach.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Mon Nov 26, 2018 4:25 pm

.
Possible Charged Particle Field  - Page 12 Fourla10

Thank you very much. I believe I’ve ‘corrected’ all the problems you’ve identified. Converting the ‘central particle’ into the first of four particles resulted in cleaner code, making it easy to find and correct a couple of mistakes. Overall, Four Body is improved.

Any other comments or suggestions? Replacing four particle's worth of data for one small variable change from last time is a pain; is Reconfiguration - updating default tab data with previously entered data - still an option?  

Two, Three, and Four Body UIs lead me to the Nth Body UI function. I can either a. replace Two and Three Body UIs with slimmed down copies of the improved Four Body version, or b. create a new Nth Body UI function and replace the Two, Three, and Four Body UI functions with Nth Body UI function calls. Unless it makes a problem with the UIs. I suppose the question almost answers itself, the Nth Body UI function is the way to go; that is, unless you think it's unnecessary.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Mon Nov 26, 2018 4:58 pm

Remove the '.' at the end of each control title. If you want something, then use a colon ':' instead. I will make the titles bold soon, so they stand out a bit more and also allows them to be differentiated from the sub-titles such as 'Angle:'. I also want to see if I can provide a way to use short controls that will be in a single line. This will help with the dropdown lists, as in the above example, the whole line is taken up just for a dropdown that contains single letters. I'm not sure if it will look consistent or not yet, but I think it is worth a try.

Yes, reconfiguration is still on the table, I just haven't picked it up yet.

Creating an Nth body function is good and worth while, a UI to handle it is not quite so easy. To do that, we need a way to add any number of particles and to show them in the UI. I think I can create a control that is a list of particles and an add button. The add button will allow the user to specify everything for a new particle and add it to the list. I just need to figure out how to do that, because it is bad form to use more than 1 modal dialog at the same time.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Wed Nov 28, 2018 9:38 pm

.
Update. Given your clear instructions and the fact that the Nth body function is not an option at this time, I went ahead and reloaded the Two and Three Body UIs with slimmed down copies of Four Body UI. I also added Checkboxes for showing grid lines, target boxes, and post collision trajectories in most all the Collision group UI scenarios. I added offset and velocity controls for Two Body UI. If it seems I keep going over the same functions, it’s true. It's also true that every go round has improved things. I'll keep at it.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Wed Nov 28, 2018 10:41 pm

The iterative approach. Tried and true.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Tue Dec 04, 2018 8:27 pm

.
Possible Charged Particle Field  - Page 12 Pstack10
Back to the salt mine. The Proton Stack scenario group now has a user interface choice. The above image is a screen shot of 90% on my browser size scale.

Possible Charged Particle Field  - Page 12 Pstack11
This output agrees with the UI shown, unfortunately, the stacks don’t generally last very long. I don’t believe CPIM allows stable alphas or Proton stacks. Do you agree? Is there anyway to change that?

Oh, I recall unbraking the lattice 03 spins on 5 November. It seems I promptly rebroke it. Embarassed I think it's fixed now.  
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Tue Dec 04, 2018 9:12 pm

Most of the stacked spin scenarios don't work very well. It actually depends on how many protons are in it as odd and even stacks behave differently. The problem is that we have not balanced charge and gravity yet. Even just the charge calculations are not dropping off as they should at the moment.

By the way, I did have a look into the reconfiguration functionality, but it turns out that a lot of the code relies on the page being refreshed (which I usually try to avoid, but didn't this time). So I need to find all of those parts and rewrite them to be more reconfigurable.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Wed Dec 05, 2018 8:28 pm

I have implemented re-configuration. Is that even a word? It is now!

I am not convinced that everything is being disposed of correctly, but I think I have most, if not all, of it. If you notice crashes after re-configuring many times, let me know as it most likely means something is not being released.

My site has been updated with the latest code: https://www.nevyns-lab.com/mathis/app/cpim/test.html
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Wed Dec 05, 2018 10:49 pm

.
I have implemented re-configuration. Is that even a word? It is now!

I am not convinced that everything is being disposed of correctly, but I think I have most, if not all, of it. If you notice crashes after re-configuring many times, let me know as it most likely means something is not being released.

My site has been updated with the latest code: https://www.nevyns-lab.com/mathis/app/cpim/test.html

Possible Charged Particle Field  - Page 12 Destro10
MotionEngine.prototype.destroy. "This method is called to destroy an engine and is only used once per engine" - sounds seriously cool.

Reconfiguration it is; its working perfectly.

I've been trying the Reconfigure button for a few scenarios at your Lab and at home, back and forth and back and forth between changing a value on the User Interface parameter page and viewing the changing output with my browser console open - no errors observed. Your change appears to work for all UIs so far. Why did you make a change - adding the 'gravityForm' label to the gravity scenario only? You indicated that the label is optional, so why would one want the label? In any case I'll be happy to make that change across all the scenarios if you'd like, repetition is the only way I seem to learn anything.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 5:00 am

Oh, I forgot to tell you about that. You can now set an ID on a form. It is optional and a default will be applied. At first I used that to store the form in the UIManager because I couldn't get a nice expression to determine if the form was already created using JQuery. So I store the form in an object, which is a property of the UIManager class (called forms). When I realised that you didn't really need to specify the ID, I just left it in but made it optional.

You can use it to create multiple forms. You define all of the forms you want in the scenario init function, but you only call show() on the first one. In the success function of that, you show the second form and in its success function you show the next, etc, etc.

It would look something like this:

Code:

var form1 = ui.createForm( 'form1' );
var form2 = ui.createForm().id( 'form2' );
form1.title( 'Form One' ).blah blah blah
form2.title( 'Form Two' ).blah blah blah
var suc1 = function( values )
{
   // use values
  ...
  // show next form
  form2.show();
};
form1.success( suc1 ).show();

I haven't actually tried it yet, but it should work (famous last words).
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 5:04 am

And, it turns out, the destroy method is actually being used multiple times per engine (every time you press reconfigure). It is considered the end of life for the engine, but the init method can be called again to start a new life, so to speak. This allows some things to be reused and others to be released and recreated.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Thu Dec 06, 2018 1:50 pm

.
Possible Charged Particle Field  - Page 12 Offset11
We have a set of Reconfiguration errors after using Reconfigure 3 times to vary Offset Pair UI's moving particle's offset distance. At first I thought I needed to repair the collision scenario; until I saw that each new Reconfiguration added a new set of post collision lines.

In the Collision group scenarios the user has the option to turn on/off lines and target boxes. If no lines or target boxes are selected, all well and good. When one does select lines, additional Reconfigures will not remove those lines.

I especially like the fact that Reconfigure defaults to a Reload when there is no user interface for that scenario. I use the left arrow to Reset the scenario, is there a single key for Reconfigure so one can do so without opening the control panel?

Adding to my short term to-do list: updating the Help pages. It's missing several things like the vectors or the Reset, Reconfigure and Reload buttons.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 5:04 pm

You are going to have to deal with that in the scenario init function. Any objects you add to the scene, apart from the Particles themselves (which strictly speaking, you don't add to the scene graph), you will need to keep a reference to them in the scenario and check to see if they exist prior to creating and adding them.

Code:

(function( ScenarioJS, PIM, THREE )
{
   var ZERO = new THREE.Vector3( 0, 0, 0 );
   var AXIS_X = new THREE.Vector3( 1, 0, 0 );
   var AXIS_Y = new THREE.Vector3( 0, 1, 0 );
   var AXIS_Z = new THREE.Vector3( 0, 0, 1 );
   
   var myLines = null;
   
   var initRandom = function( factory, ui )
   {
      // only create lines if they do not already exist
      // this code could be in the success function
      if( myLines != null )
      {
         myLines = ...
         scene.add( ... );
      }
      
      // we can use only the success callback because we have specified a default value on the control
      var success = function( values ) {
         ...
      };
      // create a form for user input
      ...
      return null;
   };

   var group = 'My Scenario';
   
   ScenarioJS.addScenario( group, 'Random', initRandom );
   
}( ScenarioJS, PIM, THREE ));
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 5:18 pm

You also may need to remove them from the scene if you determine that they already exist, rather than just leave them there. It depends on what you are using the objects for. If they depend on values supplied by the user, then remove and recreate them, otherwise they can just be added once and forgotten about.

Code:

(function( ScenarioJS, PIM, THREE )
{
   var ZERO = new THREE.Vector3( 0, 0, 0 );
   var AXIS_X = new THREE.Vector3( 1, 0, 0 );
   var AXIS_Y = new THREE.Vector3( 0, 1, 0 );
   var AXIS_Z = new THREE.Vector3( 0, 0, 1 );
   
   var myLines = null;
   
   var initRandom = function( factory, ui )
   {
      // only create lines if they do not already exist
      // this code could be in the success function
      if( myLines != null )
      {
         for( var i=0; i<myLines.length; i++ )
         {
            scene.remove( myLines[i] );
         }
      }
      myLines = [];
      myLines[0] = new ...
      for( var i=0; i<myLines.length; i++ )
      {
         scene.add( myLines[i] );
      }
      
      // we can use only the success callback because we have specified a default value on the control
      var success = function( values ) {
         ...
      };
      // create a form for user input
      ...
      return null;
   };

   var group = 'My Scenario';
   
   ScenarioJS.addScenario( group, 'Random', initRandom );
   
}( ScenarioJS, PIM, THREE ));
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 5:21 pm

Technically, reconfigure does not default to reload, it just equates to almost the same thing.

No key binding at the moment, hadn't thought about it. Not sure what key to put it on yet, maybe the Home key.

Yeah, that's the problem with documentation, you have to keep it up-to-date.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Thu Dec 06, 2018 6:28 pm

.
I'll study your directions and see what happens next.
 
Possible Charged Particle Field  - Page 12 Unmove11
In the meantime, I tried to make an unmoveable UI scenario using the hosohedron configuration but it was too easy for unmoveable neutrons to be placed in overlapped positions near the top and bottom positions - sometimes freezing the screen. Ok, no Unmoveable UI yet, I simply added a new non interactive Unmoveable scenario - Hosohedron.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Thu Dec 06, 2018 7:10 pm

That is a problem with the hosohedron algorithm. The top and bottom get very crowded because they contain the same number of particles as any other latitude. That is why I stopped using it for the charge points and found an algorithm that attempts to make equal areas between points, rather than equal numbers of points.

The collision code should separate them, but it can take quite a few iterations before they are all separated. It is all of those collisions that cause it to slow down.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Fri Dec 07, 2018 12:20 am

.
You "found an algorithm that attempts to make equal areas between points, rather than equal numbers of points" eh? Excuse me for asking - which algorithm is that? The .js file and line numbers would be perfect. Actually I was thinking a 60 vertex icosa based configuration might work best for the Unmoveable UI, all 60 may fit inside the proton's emission radius.  

With respect to lines, grids, targetboxs, trajectories and whether they exist or not, I haven't tried any coding yet. I'm trying to wrap my mind around null. I see where your instructions involving these new or existing lines is an expansion of the Gravity scenario: var initRandom = function ( factory, ui ).  Thanks, that's probably all I should need. I'll be able to play with it a bit before crying uncle.

In case you might otherwise miss it for a few days, I sent you an unrelated PM.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Fri Dec 07, 2018 2:12 am

Ah, null. Such a simple, yet strange concept. I take it for granted these days and don't even think about how others might not understand.

Null was invented to solve a very simple problem. It is the answer to a very simple question: Do I have a value?

We usually think of variables based on what they store and what we use it for. An integer is going to store a number and we can do things with it like increment and decrement, add and subtract, etc. Sometimes, we need to think about a variable in a more abstract way. We need to know if the value stored in that variable is actually a valid value.

We use null to say: No, there is no value here, do not use it.

In Javascript, you can always use null. JS actually takes it a step further and defines another type of null, called undefined. I'm not sure why, but there is a difference. A default, unassigned, variable will be undefined. You have to set it to null explicitly. You can't do this:

Code:

var unassigned;
if( unassigned == null )
{
  // will not go into here
}

But you can accomplish the same thing with the typeof operator. This instruction will return a string that tells you the type of a variable.

Code:

var unassigned;
if( typeof unassigned === 'undefined' )
{
   // will go into here
}

However, this is easier:

Code:

var assigned = null;
if( assigned == null )
{
  // will go into here
}

This is even easier and will actually work with either null or undefined:

Code:

var assigned = null;
if( !assigned )
{
  // will go into here
}
var unassigned;
if( !unassigned )
{
   // will go into here
}

Sometimes you need it to work a specific way, and other times it really doesn't matter. You might come across all of them though, so it was worth showing the different ways this might be done.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sat Dec 08, 2018 2:36 am

.
Possible Charged Particle Field  - Page 12 Trunci10
A view looking down at the latest Unmoveable.

First things first, I had to replace that awful unmoveable hosohedron I made yesterday with a 60 vertex truncated icosahedron. This configuration lets more neutrons get closer to the central proton without overlapping positions like the hosohedron did. It's still not a user interface, but I believe the 'association football'/buckyball is much better.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sat Dec 08, 2018 3:23 pm

.
Possible Charged Particle Field  - Page 12 Unmovp10
We have an Unmoveable UI.

Beginning with the truncated icosa configuration, the user selects a few proton parameters: position ( inside the neutrons or not ), y-axis spin velocity, and spin axis orientation. If there’s an overlap, Reconfigure makes repositioning the proton easy. For the accompanying image, I turned on the spin vectors to show which neutrons were being effected – the spin vectors do act strangely at times.

Anyone, Please feel free to comment, suggest or criticize. Additional scenario suggestions are welcome.

Unless I think of something else real soon, I’ll look at my collision line null assignments next.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sat Dec 08, 2018 6:14 pm

LongtimeAirman wrote:.
You "found an algorithm that attempts to make equal areas between points, rather than equal numbers of points" eh? Excuse me for asking - which algorithm is that? The .js file and line numbers would be perfect.

In the js/engine/eqs.js file, there are 3 versions of the algorithm that you can use, each having more points than the last. Here's how you use it:

Code:

var locator = new EQS.LocationCreator( EQS.ANGLES_46 );
var points = [];
var radius = 100;
locator.createLocations( radius, points );
// at this stage, points contains THREE.Vector3 objects where each one refers to a point on the sphere at the given radius.

You can use EQS.ANGLES_130 or EQS.ANGLES_406 in place of EQS.ANGLES_46 if you want more points. Unfortunately, you can't choose an arbitrary number of points.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Dec 09, 2018 1:47 am

.
Here's a simple temporary spherical scenario init46PointSphere01, I put it together with your instructions included in order to see the output for the algorithm you mentioned.
Code:

var init46PointSphere01 = function( factory ) {
       camera.position.set( 10, 10, 10 );
       var locator = new EQS.LocationCreator( EQS.ANGLES_46 );
       var points = [];
       var radius = 10;
       locator.createLocations( radius, points );
       // at this stage, points contains THREE.Vector3 objects where
        //each one refers to a point on the sphere at the given radius.
       var particles = [];
       var p;
       p = factory.createProton().place( 0, 0, 0  )
       .spin( 0, 1, 0, Math.random()*Math.PI/2 )
       .get();
       particles.push( p );
       for( var i = 0; i < 46; i = i++ ) {
             p = factory.createNeutron().place( points(i)).get();
             particles.push( p );
       };
 var particleArray = new PIM.ParticleArray( particles );
 return particleArray;
 };

No joy. I believe something is wrong with .place( points(i)). It's causing the browser as well as my system to freeze up. Same when I replace .place( points(i)) with .place( points[i]). The function is properly registered at the bottom of the 'Spherical' scenarios list so that's not the problem.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Dec 09, 2018 1:50 pm

.
No change. I’ve made several more efforts. EQS apparently requires a pointer/function call. I noticed its absence, and tried placing EQS in the spherical.js function argument list - here it is in the fourth position.

Code:
(function( ScenarioJS, PIM, THREE, EQS )

I tried that yesterday too, but this morning I was more organized/systematic. There are errors for each position: the spherical group goes missing from the scenario listing; EQS.LocationCreator is not a function; EQS is not a constructor; points is not a function. EQS is undefined when I remove it.  I tried it in the init46PointSphere01 function call too with no better results – I had to try.

Code:
var init46PointSphere01 = function( factory, EQS )

I’m good with a constant degree of difficulty in working toward a positive outcome, it comes with the territory. You cause me great pain and joy Sir.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Sun Dec 09, 2018 4:57 pm

Sorry, I forgot about the EQS reference and just assumed it would be available.

You did the right thing by putting the EQS reference in the top function declaration:

Code:
(function( ScenarioJS, PIM, THREE, EQS )

but you also need to put it into the invocation of that function, which is at the very bottom of the file:

Code:
}( ScenarioJS, PIM, THREE, EQS ));

You will need to remove it from the init function declaration:

Code:
var init46PointSphere01 = function( factory, EQS )

should be

Code:
var init46PointSphere01 = function( factory, ui )

You must use the points as an array:

Code:
.place( points[i] )

Don't iterate over a literal number, use the length property of the points array so that it will work regardless of how many points are in there:

Code:
for( var i = 0; i < 46; i = i++ )

should be

Code:
for( var i = 0; i < points.length; i++ )

notice I also remove the i = i++ part, as that would not work as you expect and i would not increment. That is because there are 2 versions of ++. There is the post-increment, where the ++ comes after the variable, and there is the pre-increment, where the ++ goes before the variable.

Code:

var i = 10;
var post = i++;
var pre = ++i;

After that code has executed, you might expect post to equal 11 and pre to equal 12, but they won't. post will equal 10 and pre will equal 12.

That is because var post = i++; will execute the = operator before the ++ operator, hence why it is called post-increment.
However, using the pre-increment will do it the other way around.

Actually, I was wrong, your original code would have worked, but only inadvertently. The reason it would work is because you are using i in both places, so it would execute like this:

i = 0
execute loop
evaluate i = i++ --> set i to current value of i (which is 0), then increment i, which makes it equal to 1.

So inefficient, but it wold work.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sun Dec 09, 2018 6:32 pm

.
Possible Charged Particle Field  - Page 12 Nothin10
There's nothing amiss here - a brief moment in time.

Joy.

The Unmoveable UI uses unmoveable neutrons; here, in the sphericals, the particles are free to accelerate together. The 130 particles were initially placed an emission radius ( r=10 ) from a proton at (0,0,0) where they were well placed and close together. The started accelerating together - the image shows them a little bit overlapped - that's part of a collision simulation - just before they begin to burst apart. Needless to say, your directions worked perfectly; I spat ( a small mess) when the mass burst apart.

The 130 spherical works much better than the C60. I'll go back and to finish the Unmoveable UI again. This has been a long term discussion - the number and distribution of charge points on a sphere - that I can follow. I do seem to recall seeing that algorithm in a search for this project a few months ago, in any case it's nice to see you've implemented them. Maybe C60 should be placed with the EQS group.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Tue Dec 11, 2018 1:27 pm

.
Update. initOffCollisionPairUI2. The line problem. How do we remove prior scene lines after Reconfigure changes the scene?

I haven’t gotten your directions to work yet.

Before I could even begin I needed to add the array myLines. Now all lines are added to myLines before they are added to the scene. That alone is progress. I see that adding an array to contain all the lines is a code improvement, adding an array of lines to a scene is more efficient and better practice than adding each individual line as they are made to the scene. That works and I pushed it. Since then, myLines is now declared in the initOffCollisionPairUI2, success function, and the lines are still calculated and added to myLines in the initOffsetPairUI2 function. I haven't pushed that myLines change yet.  

The problem is a bit different than I first thought. After any Reconfiguration – restart the scene by removing all the previous scene lines. Note that the total number of lines in this case is just 1 or 2, the post collision trajectories of the initially moving and stationary particles. Later, I could avoid removing lines by checking whether the offset value changes, along with the state of the show post collision trajectories checkbox; but for the time being keep it simple – restart the scene by removing all the previous scene lines first.

That’s where I’m at, crawling, creeping along quite slowly. The if( myLines != null ) doesn’t work yet. Maybe because I shouldn’t make that test until after a Reconfigure has occurred. I'll try that next.  
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Tue Dec 11, 2018 3:03 pm

.
Not trying to change the subject, just making an observation.

Possible Charged Particle Field  - Page 12 130pol10
130 Neutrons UI. The array ( radius 8 ) as seen from the array center to one of the array 'poles'.

What's the practical limit - the maximum number of neutral particles in a spherical array - without overlap - at a given radius? I believe spherical arrays are not idle mathematical questions but are real particle configurations that our engine might someday show to be possible. There is also the related question what is the best distribution of charge points about a spherical surface. I believe we share that interest. The minimum spherical array radius limits in the two new Unmoveable UIs was determined by the need to avoid the three each pole particles from coming into contact. I'm not suggesting that that's any problem whatsoever.

When I suggested that C60 be added to the EQS group I realize that the C60 is a different type, C60 is x,y,z listed in terms of phi, while ( I assume ) the EQS group is tabulated in polar coordinates. A x,y,z/polar converter should be an easy matter - for you. Or how about axis angling spherical arrays?

Ok, I'll get back to work.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Tue Dec 11, 2018 5:15 pm

It's not that simple, I'm afraid. The EQS algorithm is not exactly mathematically generating the points. It uses some pre-configured values to generate them, but those pre-configured values are not mathematically generated. I'm sure it could be done, but the paper I got them from did not present it explicitly. They gave the method, but it was still a bit human oriented, and I couldn't see a way to do it in code and didn't see the need to waste the time trying it.

This is the data driving the algorithm:

Code:

var CELL_ANGLES_46 = [
  [ 31.449, 30 ],
  [ 60.4082, 45 ],
  [ 90, 120 ]
];
var CELL_ANGLES_130 = [
  [ 17.9202, 18 ],
  [ 35.7758, 20 ],
  [ 54.6254, 24 ],
  [ 72.5248, 40 ],
  [ 90, 120 ]
];
var CELL_ANGLES_406 = [
  [ 10.2148, 10 ],
  [ 20.7738, 10 ],
  [ 30.1631, 12 ],
  [ 40.5602, 12 ],
  [ 50.2170, 15 ],
  [ 60.1113, 18 ],
  [ 70.2010, 24 ],
  [ 80.1375, 40 ],
  [ 90, 120 ]
];

Each of these arrays contains more arrays and each of those contains an angle and the number of points at that level. The angle represents the distance, in latitude, from the north pole. Notice that the last entry is always 90°, which represents the equator. The number of points is used to divide 360° into, giving us an angle of longitude.

This is the general algorithm:

We work on one hemisphere only, and just copy and adjust the latitude values for the other half.

Code:

For each item in the data array
 Use the angle to find the latitude of this level.
 Use the number of points to determine the change in longitude: 2PI/count
 Create a point for each longitude at current latitude and 180 - current latitude (for the other hemisphere).

That is it, in a general sense. The actual code is more complicated, but that is what it is doing.

Note that the points are not actually at the latitude specified in the data arrays. They are half way between the previous latitude and the current. That is because the algorithm is designed to create equal areas, or as close as is possible, rather than points. So I placed the points at the center of those areas. If I was using it to create the geometry of a sphere, then I would place them at those angles and use 4 points to generate a face (where a face is the flat part of a surface, think of each hexagon on the surface of a soccer ball).

So it isn't a matter of just converting something else to this. It also shows why we have a set number of points and can't just specify the amount to generate.

However, it is possible to give it your own data array. I needed the equal-area property of this algorithm, but you may not. So you can do something like this:

Code:

var angles = [
  [ 20, 10 ],
  [ 40, 20 ],
  [ 60, 40 ],
  [ 70, 60 ],
  [ 80, 90 ],
  [ 90, 120 ]
];
var locator = new EQS.LocationCreator( angles );
var points = [];
locator.createLocations( 30, points );

Then just play with the angles and counts to get what you want.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Thu Dec 13, 2018 11:30 pm

.
Then just play with the angles and counts to get what you want.
Thanks for the great detailed descriptions. The EQS.ANGLES group is fun to play with. The EQS.ANGLES_130 spherical array is a fine standard for a large number of particles closely packed at the proton emission radius. I think I understand the basic algorithm now, but I’m nowhere near understanding the code. Your application of the algorithm to charge points on a sphere makes good sense – depending on computational complexity. I should know but I must ask - Does CPIM actually use these EQS charge points (EQS.ANGLES_46, EQS.ANGLES_130, and EQS.ANGLES_406)? Do they fit in the Cardinal point continuum?

While a spherical array of neutrons makes perfect sense in the Unmoveable group; we know of no such particle configurations in nature. Or do we? Ken Shoulders proposes Exotic Vacuum Objects * which he believes consist of various large numbers of electrons although I don’t believe he gives those numbers any forms. I suppose the simplest physical configuration of large numbers of particles we may encounter would be strings of particles, linear arrays channeling mostly straight through charge. Next in complexity - planar arrays and lattices seem a safe bet. It may be wild speculation on my part, but the next thing that occurs to me are bubbles – empty spherical arrays, valid objects – inside or out. Protons outside are gravitationally attracted to the center of the bubbles - easily penetrating the spherical boundary.

Looking at the EQS group totally diverted me - thanks - from my unsuccessful collision group trajectory removal problems. I couldn’t get the myLines commands you provided to work so I included a copy of myLines called theseLines. I included creating lines only when requested – that didn’t help, so I went back to making all lines every scene. I could see the scene.remove command remove those lines in the current scene, but my code hasn’t removed those lines from subsequent scenes.  I’m afraid I may have to leave it alone till I figure what else to do with it or you put me out of my misery.

* http://blog.hasslberger.com/2007/10/ken_shoulders_evos_exotic_vacu.html
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Fri Dec 14, 2018 4:40 pm

.
Airman wrote.I should know but I must ask - Does CPIM actually use these EQS charge points (EQS.ANGLES_46, EQS.ANGLES_130, and EQS.ANGLES_406)? Do they fit in the Cardinal point continuum?
Du’oh! The Precision group – Low, medium, high and overdrive is the charge points continuum - Cardinal, EQS.ANGLES_46, EQS.ANGLES_130, and EQS.ANGLES_406. I was already embarrassed to report no progress with collision line removal. Plus I was worried about your possible reaction to the blasphemous proton boundary I was playing with; your sharing the EQS algorithm seemed like tacit approval.

Unmoveble group, 130 Neutrons UI. I added motion to the central proton. The 130 neutrons are still fixed in position and can spin, they now act as a proton cage. At low velocities the proton generally makes orbital type motions inside the Neutron spherical array, is the scenario still an Unmoveable?   

Please excuse the chattering, I’ve been watching the spin vector distortions again – I’m certain they are renormalization errors – say by a missing renormalization somewhere in the charge calcs; I don’t believe I’ve shared that strong opinion before.
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Nevyn Fri Dec 14, 2018 5:06 pm

LongtimeAirman wrote:
Update. initOffCollisionPairUI2. The line problem. How do we remove prior scene lines after Reconfigure changes the scene?

I haven’t gotten your directions to work yet.

Sorry, Airman, I seem to have missed this post.

My best guess as to why the myLines array is not working for you is that the declaration of it is in the wrong place.

Here is my original outline:

Code:


(function( ScenarioJS, PIM, THREE )
{
   var ZERO = new THREE.Vector3( 0, 0, 0 );
   var AXIS_X = new THREE.Vector3( 1, 0, 0 );
   var AXIS_Y = new THREE.Vector3( 0, 1, 0 );
   var AXIS_Z = new THREE.Vector3( 0, 0, 1 );
  
   // declared outside of the initRandom function so that
   // it is available every time initRandom is called and
   // will still contain the same values created in previous invocations of it
   var myLines = null;
  
   var initRandom = function( factory, ui )
   {
      // only create lines if they do not already exist
      // this code could be in the success function
      if( myLines != null )
      {
         for( var i=0; i<myLines.length; i++ )
         {
            scene.remove( myLines[i] );
         }
      }
      myLines = [];
      myLines[0] = new ...
      for( var i=0; i<myLines.length; i++ )
      {
         scene.add( myLines[i] );
      }
      
      // we can use only the success callback because we have specified a default value on the control
      var success = function( values ) {
         ...
      };
      // create a form for user input
      ...
      return null;
   };

   var group = 'My Scenario';
  
   ScenarioJS.addScenario( group, 'Random', initRandom );
  
}( ScenarioJS, PIM, THREE ));

Note that the myLines variable is declared outside of the initRandom function, definitely not inside of it.

LongtimeAirman wrote:What's the practical limit - the maximum number of neutral particles in a spherical array - without overlap - at a given radius?

You actually sent me the link to the answer to that in the MBL thread: https://milesmathis.forumotion.com/t464p25-molecular-bonding-language#3694.

Use the diameter of the neutron/proton as the edge length. If you want a bit of space between the particles, add it to that diameter.

If you get stuck, I'll go through the MBL code and see how to adapt it to this problem.

I was just about to write about the precision settings, but you beat me to it. Well done.

I created the Unmovable scenario because I wanted to see the spin on the neutrons by the central proton to make sure that it was being applied correctly and highlight any issues with it. Initially, the central proton was movable, but then I added gravity and it started to move away, so I also made that unmovable to retain the original purpose of the scenario. I don't think it matters too much if some of the particles are movable.
Nevyn
Nevyn
Admin

Posts : 1887
Join date : 2014-09-11
Location : Australia

http://www.nevyns-lab.com

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by LongtimeAirman Sat Dec 15, 2018 7:34 pm

.
Possible Charged Particle Field  - Page 12 Neutro13
130 Neutrons UI. Now with a ‘Reverse particle types’ checkbox; in addition to the proton cage, we can choose a neutron oven. I wanted to see how a central neutron would react to both gravity and charge. Watching the proton spin adjustments is of course, extremely interesting. Please excuse the somewhat repetitive images, I think they’re better than family photos.

Use the diameter of the neutron/proton as the edge length. If you want a bit of space between the particles, add it to that diameter.

If you get stuck, I'll go through the MBL code and see how to adapt it to this problem.
MBL is Great Guns Nevyn. The cyclic polygon algorithm is necessary to cope with varying ring molecule component lengths. For example, say there’s a ring created by 2,3,4, and 5 alpha long sets of stacks – the cyclic polygon algorithm allows one to calculate the various stack positions on the ring(within a given tolerance).

In CPIM, protons and neutrons have the same diameter. The cyclic polygon problem reduces to simply dividing the circumference (at the desired radius) by an integer number of angular particle widths ( n plus gap) in the ring - the N-gon. So I can imagine producing an N-gon ring (a spherical array will come later) according to the radius and minimum particle gaps selected by the user. With that understanding, I suppose I can start with the cyclic polygon algorithm. Is that close to what you thought I was thinking? Any chance of providing larger random sized (say 1<=r<=5) particles?
.

LongtimeAirman
Admin

Posts : 2015
Join date : 2014-08-10

Back to top Go down

Possible Charged Particle Field  - Page 12 Empty Re: Possible Charged Particle Field

Post by Sponsored content


Sponsored content


Back to top Go down

Page 12 of 15 Previous  1 ... 7 ... 11, 12, 13, 14, 15  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum