Possible Charged Particle Field

Page 25 of 29 Previous  1 ... 14 ... 24, 25, 26, 27, 28, 29  Next

Go down

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

Post by LongtimeAirman on Sat Dec 15, 2018 10:16 pm

.
Possible Charged Particle Field  - Page 25 Proton10
Given a little energy, it appears the neutron will eventually be bounced out of the proton sphere.

Oh, I should show this one too. That's where I get the idea of a neutron oven, near the start of the scenario, before the proton emissions become more randomized. Is there a way to freeze a proton's spin axis? As though it were channeling a strong straight-through pole-to-pole charge current? The three EQS (46,130,406) spheres are nice in that their vertices (here - particles) comprising the spherical array are already positioned in longitudinal lines.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Sun Dec 16, 2018 4:33 pm

Airman wrote:Any chance of providing larger random sized (say 1<=r<=5) particles?

No, of course it can be done, but there is no Physics behind it. Unless you mean that the radius of all particles are still the same, but they are a random value between 1 and 5.

What I think we will want, at some stage, is a way to create a particle with a given number of stacked spins. The appropriate radius will be calculated.

Airman wrote:Is there a way to freeze a proton's spin axis?

Yes, just set the spinable property to false:

Code:

var p = factory.createProton();
p.spinable = false; // should that be 2 n's?
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Sun Dec 16, 2018 9:11 pm

.
Airman wrote: Any chance of providing larger random sized (say 1<=r<=5) particles?

Nevyn wrote: No, of course it can be done, but there is no Physics behind it. Unless you mean that the radius of all particles are still the same, but they are a random value between 1 and 5.

What I think we will want, at some stage, is a way to create a particle with a given number of stacked spins. The appropriate radius will be calculated.

Airman. ‘There is no Physics behind it.’(?) In my opinion, it's wrong to have all photons the same size, electrons and protons come in a wide variety of sizes. The entire electromagnetic spectrum shows a large variation in energy – or radius dimension - reflecting the b-photon’s particular energy level (size) at a stacked spin level; let’s assume the first AXYZ b-photon spin set. Most photons are infrared. White light is a mix of colors. What is the difference in radius between an infrared versus an ultraviolet photon? They are at the same b-photon spin level, yet each color must amount to a different radius.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Sun Dec 16, 2018 11:38 pm

Photons yes, protons, neutrons, and electrons, no. We don't deal with photons in this app. At least not yet.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Mon Dec 17, 2018 6:40 pm

.
I missed your convincing argument. If photons come in different sized radii, how can one conclude that all electrons (or all protons or all neutrons for that matter) have the same radius?

Ok, I dumped the Cyclic Polygon algorithm to the bottom of spherical.js scenarios. Please forgive the mess.

Is this some sort of HTML language? It appears @interface KTCyclicPolygon is a program that requires the number of edges(n), the lengths of each edge (*edges), and the location of the longest ledge in the edges array (ledge). I guess if *edges is the array of n values, NSInteger must be a label. I’ll delete spherical line 1272.

I’m up to - (NSInteger)largestEdge. I don’t see any sorting, the code doesn’t make sense to me; I suppose it must be called before it does.

I’ll see what damage I can do.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Mon Dec 17, 2018 10:46 pm

If there are only 3 or 4 spin levels between an electron and a proton/neutron, then there isn't any room for varying sizes. I'm not even sure if I would call those between levels an electron or not. You might call it an electron with a bit more energy, but you might call it some other particle too. I guess it depends more on how it behaves, rather than where it came from. Photons are a bit different. For a start, the name photon is not really a single particle, but a family of them. Not exactly the same as the name electron or proton, etc, which define a single particle. None of this is set in stone though, and there is so much that I haven't figured out. I really want to create a chart of particles to spin levels, but am not sure where to start.

That code is written in Objective-C, which is a newer variant of C and is what is used for iPhone development. The NSInteger title actually goes further back than Objective-C or Apple, who use it in their Cocoa framework, but the @interface gives it away as Objective-C. I have some experience in Objective-C, although it has been quite a while since I used it and I didn't get that far into it. If you post the code I can try to port it to JS.

NSInteger is just a class that encapsulates an integer value. Usually an integer, or int, is a primitive value, meaning that it can only store what it is designed to store, in this case it is a whole number up to some limit (imposed by the number of bytes used to store it). Sometimes you don't want an int, you need to be able to nullify it (yes, back to the null concept) which tells you if you have a value or not. An int can only store a value, it can not store null, so you either choose an integer, such as 0 or -1, to represent no-value, or you use an object like NSInteger or Integer in Java. Javascript does not have primitives, so everything is already an object (although that statement could cause some good fights to break out in some developer circles).

By the way, I'm not opposed to having photons in this engine, or even discussing a new engine just for them, if we want to. Hell, why not have both? A photon engine could be a good way to investigate their properties and figure out their spin levels, etc. We just need to be careful about size. There is a very large size difference between the first photon and a proton. You would not be able to view both on screen at the same time. If you were looking at the proton, then the photons will be too small to see and if you were looking at the photon, then the proton is so large that it would cover everything.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Tue Dec 18, 2018 12:21 am

.
I understand the size difference between electrons to protons (or photons to electrons) as a roughly 1820 times increase in volume. I thought that meant that the electron radius is between 10 to 20 times smaller than the proton's. Electrons may be 1820^2 larger than photons. Do you agree? It's not so much the size difference causing difficulties in combining both types of particles in any scenarios, I believe the main difference is the fact that smaller particles, say electrons are so much faster than protons. Let's say we've created electrons and nectrons, then include an 1820x larger particle that can move no faster than ten percent our current speed limit of 60.

Constructing a cyclic polygon given the edge lengths https://chaosinmotion.blog/2016/10/02/constructing-a-cyclic-polygon-given-the-edge-lengths/ led me to, Visualizing quaternions . An explorable video series. Lessons by Grant Sanderson. Technology by Ben Eater. Check out the competition, interactive youtube videos. Quaternions and 3d rotation https://eater.net/quaternions
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Tue Dec 18, 2018 4:54 pm

I thought it was 1820 times the mass, not volume. It is probably more correct to say that it is 1820 times the energy. Miles has explicitly stated that the proton is 4 spin levels, or 1 spin set (so it would be 3 if no higher axial spins, or it spans more than 1 spin set if it needs to be 4), larger than the electron. That means it is only 8 times the radius at best.

I'm not worried about velocity, that is easy enough to deal with. We will need to introduce velocity limits for each particle type, as a percentage of c.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Tue Dec 18, 2018 10:11 pm

.
Possible Charged Particle Field  - Page 25 Cyclic10
I'm making some progress with the cyclic polygon. I think I can do this, thanks for the suggestion. Now with console.log points. I believe I need to make two functions to return a series of updating radius and angle values next.

I exaggerated a bit when I said the radial size difference between electrons and protons is between 10 to 20 times - feeling certain the difference is closer to 10. A field with particles spanning radii from 1 to 8 (or 9, neutrons should be larger than protons) sounds like a good mix to me, obviously not as extreme as the photon to proton size scale you described. We will of course want to fill the interval - I hope we can do so with stacked spins. Modifying CPIM, or perhaps beginning a new photon simulator if you’d like, I’d beg to help.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by LongtimeAirman on Thu Dec 20, 2018 7:25 pm

.
Update on the poly cyclic algorithm. Everything seems to be working ok up to the for (mida; mina; maxa) loop.

Code:

      var mina = 0;
      var maxa = Math.PI*2;
      var mida;
      var counter = 0;
      console.log( ' mina: '+ mina + ' mida: '+ mida + ' maxa: '+ maxa );//
      console.log( ' angle: '+ a + ' counter: '+ counter );//

      //for (;;) {

      var f;
      //for (mida; mina; maxa)
      for (mida; mina; maxa)
      {
             mida = (mina + maxa)/2;
             //var f = [self f:mida]; //calculate f's gap for angle mida.
             f = sum - mida; //calculate f's gap for angle mida.
             if (Math.abs(f) < epsilon) break; // a solves our solution
             if (f < 0) {
                   // Angle too small; we need a larger angle
                   mina = mida;
             } else {
                   // Angle too large; we need a smaller angle
                   maxa = mida;
             }
       };
      a = mida;                        // to within epsilon.
      console.log( 'angle gap: '+ gap + ' rads, angle: '+ mida );//
      console.log( 'angle: '+ gapDeg + ' deg, angle: '+ f );//
      console.log( ' angle: '+ a + ' counter: '+ counter);//
      // At this point the angle a has been found to within
      // the error specified in our constant epsilon.

For which I get the following output.

Possible Charged Particle Field  - Page 25 Partia10

I believe that mida is an angle, and it is varied from Pi to 0 or 2Pi until it is within epsilon of sum - but I see no evidence that mida converges on sum.

I'll carry on. Please feel free to point out any errors.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by LongtimeAirman on Fri Dec 21, 2018 1:00 am

.
I think I've got good numbers now. Putting console points inside the for loop allowed me to find my code errors.
Code:

      var f;
      for (;;) {  
           mida = (mina + maxa)/2;
           //var f = [self f:mida];
           counter = counter + 1;
           f = gap + mida; //
           console.log( ' f: '+ f + ' counter: '+ counter+ ' mida: '+ mida);//
           if (counter > 50) break;//
           if (mida < 0.000001) break; // a solves our solution
           if (Math.abs(f) < epsilon) break; // a solves our solution
           if (f < 0) {
                // Angle too small; we need a larger angle
                mina = mida;
           } else {
                // Angle too large; we need a smaller angle
                maxa = mida;
           }
      };
      a = f;    // to within epsilon.

Possible Charged Particle Field  - Page 25 Partia11
If these numbers are correct, I should be calculating the vertices tomorrow.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by LongtimeAirman on Sat Dec 22, 2018 3:57 pm

.
Cyclic polygon Update. Reference https://chaosinmotion.blog/2016/10/02/constructing-a-cyclic-polygon-given-the-edge-lengths/ My last Push included uncommented Objective C code that would need to be commented out before the js code can run, such as, within spherical.js: 1. Add in blank line 1432 the comment start, /* .2. And in blank line 1461 add the comment end, */ . I didn’t deem that worthy enough for its own Push, I’ll include it in the next.

Possible Charged Particle Field  - Page 25 Partia12
At some point yesterday I picked up the yellow Source map error included in the image above. I couldn’t get rid of it, so I ended up reverting to my last Push.

Possible Charged Particle Field  - Page 25 Exampl10
The angle gap, 0.1070895 radians shown in the top image (bottom left corner) is correct. The second image shows how the gap is calculated. I also verified gap calculations with excel. There is an error - Reconfiguring to different lengths fails to update the gap; Cyclic polygon UI needs to be reloaded and lengths selected with the UI for the gap to be properly calculated. For the time being, the program’s good up to the gap determination. Although failure to update the gap may be a problem with my trying to calculate F(a) properly.   

Line 1366, the author wrote: // At this point we can easily calculate a value a between 0 and 360°:
The easily throws me. My previous post showed f converging on the same gap. I need a better understanding of the algorithm. If you’d be so kind, please define this objective code.

Code:

// double f = [self f:mida];
// if (fabs(f) < EPSILON) break;

How is f = [self f:mida] determined exactly? Is it a call or a function, I suppose it should be summing across the four edge angles to find a new angle for edge 2, from the 180 degree initial estimate to 174 degrees? I'll keep at it.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Sat Dec 22, 2018 6:37 pm

Don't worry about that yellow source map error. That file is useful for debugging, but not required for the code to work.

[self f:mida] is a method call on the current object. The self token is the same as this in other languages (but for some reason the designers needed to be different). The f signifies a method on the self object. The mida is a value that is being passed to the f method, so it must be declared in your code somewhere.

Effectively it is just doing this: var f = this.f( mida );

I don't know what this is, or what the f method is doing. That is a strange name for a method, since it doesn't tell you what the method is doing or why you would use it.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Mon Dec 24, 2018 12:29 am

.
Possible Charged Particle Field  - Page 25 Polyou10
Thanks Nevyn, I stuck with the "method", being as careful as I could. The algorithm appears to be working. Here's the latest output, including the console log, using the example I showed yesterday. I admit, the output isn't very impressive, and the code looks positively ugly. It took a lot more effort than it may appear, and it works - Joy.

I'll Push the current changes shortly. Next I'll clean it up and maybe include a circle to go along with the edges. I'm sure there's plenty to do before it's finished. Any suggestions?  
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by LongtimeAirman on Mon Dec 24, 2018 3:25 pm

.
Possible Charged Particle Field  - Page 25 Curren10
The current output. The user selects five edge lengths.

I've thrown out the draft notes and tripping hazards leaving the code a bit cleaner. Still, there are plenty of niceties violated, such as variable declarations everywhere. The user isn't able to to select the number of edges (>3, it's currently set to 5). How about adding the ability to enter number lists into the UI? If I knew how to print text to space we could do without the console.

My best to everyone for the holidays.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Jared Magneson on Thu Dec 27, 2018 8:24 am

Yet again, I'm here watching and cheering you both on. This is some good stuff and I can't imagine any harder work being done on this topic right now. Just wish I knew how to help, but it's beyond me. I keep trying to think of ways I could simulate such things inside my own program (Maya) and failing, because I'm just not that good at coding. Practice would help.

Regarding the scale difference from photons to protons, could it be shown another way inside this framework? Instead of particles, could it be drawn as simple color gradients showing the potentials? I'm working on that right now myself and hope to get some results soon. My recent work in fluid/liquid dynamics in RealFlow might help in this and it's how I got the idea.

Chiefly, when you attack attributes to a particle's COLOR, it sure helps visualize things. If you give the velocity a gradient, or the splash, or whatever, you can see what's going on a lot better than if it's just a colored particle with no variation:

https://vimeo.com/302801955

Regardless, you guys are doing great stuff and I keep checking in to see what's happening. No pressure. Just, it's impressive.

Jared Magneson

Posts : 518
Join date : 2016-10-11

View user profile

Back to top Go down

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

Post by LongtimeAirman on Thu Dec 27, 2018 2:31 pm

.
Thanks Jared. Nevyn must speak for himself, I'm happy with it. I’m sure our possible charge field particle engine (CPIM) progress isn’t keeping many readers on the edge of their seats. The addition of a cyclic polygon to a particle engine is of questionable value. Your positive feedback is greatly appreciated, feel free to be more critical.
   
For example, I'd say you're learning, don't be so modest. Your Realflow Cliff Waves test is quite nice. The physics of water flow is - I assume - ridiculously complicated. I can see the volume of water released onto the shore, unseen barrier walls prevents any water from escaping in any direction other than to the right. The water distribution is very convincing, the varying water colors definitely make the water easier to see. Please excuse my critical presumption, if you can, expand your coding skills a bit, try turning the promontory rock formation into the prow of a trireme ship; see if you can get the water to lift the ship.

I hadn’t seen your most recent vimeo postings, more good stuff.  

Photon_Gravity Demo. https://vimeo.com/277391470. This vimeo shows photons– with differing spin directions - traveling side by side, brought together – collisions - by gravity – definitely worth studying.

PhotonStory (A1, X1, Z1, Y1 spins) Pt3_trails_web. https://vimeo.com/276665562 . I like your photon trails.

CO2_Vectors_PB1. https://vimeo.com/221169462. Very interesting. CO2 migration above the planet? Care to elaborate?

I like your gradient/color ideas. Of course CPIM is a particle engine, the only color gradient I can imagine it would allow would be due to the presence of varying numbers of particles. I’m certain CPIM doesn’t allow trail creation. I recall asking if you had any scenario ideas that we might include in CPIM - I’m greatly tempted to turn your Photon_Gravity Demo vimeo into a new CPIM scenario. If you don’t object, please share your technical details.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by LongtimeAirman on Sat Dec 29, 2018 8:01 pm

Jared Magneson wrote:
LongtimeAirman wrote:I recall asking if you had any scenario ideas that we might include in CPIM - I’m greatly tempted to turn your Photon_Gravity Demo vimeo into a new CPIM scenario. If you don’t object, please share your technical details.

No problem, I believe we made that one together (Nevyn, you guys) here on another thread but I'm not certain. I may have made it specifically for a certain debate; I can't recall right now. But it seems like something I would have needed Nevyn for, in terms of theory (and Miles too obviously). I'm not always very good at that stuff and get stuck a lot.

I pulled up the file. If I recall, we were trying to show that even if two photons traveled side-by-side due to gravity at the very quantum level, their tangential velocities could prevent them from ever "sticking" together, or accreting. Once contact is made, their spins (even only at the A1 axial level) would launch them apart quite rapidly, if not immediately upon contact with each other. I'm not sure how useful it actually is, just a concept diagrammed into motion for further analysis.

Possible Charged Particle Field  - Page 25 Partic10
Showing a section of a train of 150 or so neutral particles headed this way.

I remember the discussion. I created a new scenario, that sort of resembles your side by side traveling photons, a particle stream. The orbital camera of the particle engine doesn't allow us to travel along with the particle as your vimeos show; so I ask the user to select 5 to 125 groups of pairs or triplet particles that will stream through or past a the center viewing area.  A parade of particles with plenty of built in randomness to prevent too many simultaneous collisions.

This new scenario shows the neutral particles generally experiencing many side collisions. I can't say how true or useful it is; but I believe it helps my understanding.
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Cr6 on Sat Dec 29, 2018 10:22 pm

I concur with Jared.... really, really impressive work guys! People get really wowed by it when I show them a demo. And what you guys are working through is well thought out. Smile

Cr6
Admin

Posts : 1155
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

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

Post by Nevyn on Mon Dec 31, 2018 10:21 pm

Airman wrote:How about adding the ability to enter number lists into the UI?

Done.

You can now create another type of control that will use a text control to enter a list of items.

Code:

ui.createForm( 'gravityForm' ).title( 'Gravity Scenario' )
    .control().id( 'array' ).message( 'An array of items' ).array().add()

By default, items can be separated by a comma, colon, semi-colon, pipe or any white space character. You can set your own tokenizer function though, so if you want something more specific then it is easy to do. Even better than that, I have supplied some default implementations to cover the basics.

To create a custom tokenizer function, you just declare a function like this

Code:

function( val ) { return val.split( '-' ); }

That would split items separated by a dash character., So the input text 1-23-456 would split the string up into 3 items: 1, 23, 456.

Supplied tokenizers:

Utils.TOKENIZER.DEFAULT
Utils.TOKENIZER.COMMA
Utils.TOKENIZER.WHITESPACE
Utils.TOKENIZER.COLON
Utils.TOKENIZER.SEMICOLON
Utils.TOKENIZER.PIPE

You set the tokenizer like this:

Code:

ui.createForm( 'gravityForm' ).title( 'Gravity Scenario' )
    .control().id( 'array' ).message( 'An array of items' ).array().tokenizer( function( val ) { return val.split( '-' ); } ).add()

Or use a supplied implementation:

Code:

ui.createForm( 'gravityForm' ).title( 'Gravity Scenario' )
    .control().id( 'array' ).message( 'An array of items' ).array().tokenizer( Utils.TOKENIZER.WHITESPACE ).add()

There is also a helper function that will create a tokenizer function given a string or regular expression. You use it like this:

Code:

// split on a dot character
var tok = Utils.createTokenizer( '.' );
// split on a dot or comma using a regular expression
var tok = Utils.createTokenizer( /[\.,]/ );

You can also specify a formatter that will be applied to each item in the array. A formatter is a function that looks like this:

Code:

function( val ) { return Number( val ); }

That would convert the incoming string value into a number.

Supplied formatters:

Utils.FORMATTER.Number
Utils.FORMATTER.Boolean
Utils.FORMATTER.UpperCase
Utils.FORMATTER.LowerCase

You set a formatter like this:

Code:

ui.createForm( 'gravityForm' ).title( 'Gravity Scenario' )
    .control().id( 'array' ).message( 'An array of items' ).array().formatter( function( val ) { return Number( val ); } ).add()

Or use a supplied implementation:

Code:

ui.createForm( 'gravityForm' ).title( 'Gravity Scenario' )
    .control().id( 'array' ).message( 'An array of items' ).array().formatter( Utils.FORMATTER.Number ).add()

Airman wrote:If I knew how to print text to space we could do without the console.

Putting the text in the universe is more of a pain than it is worth. You are limited to very small amounts of text and you really don't want to be updating it if you can help it. If you just want some labels to place near things, then I will write a helper function for it. But if you want to use it for debugging, then I recommend looking elsewhere. The console is best for that, especially if you are looking at messages written per frame (although that is its own sort of pain).


Last edited by Nevyn on Tue Jan 01, 2019 3:54 am; edited 1 time in total
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by Nevyn on Mon Dec 31, 2018 10:33 pm

Thanks for the praise guys, we've put a lot of work into this, especially Airman, and it is good to know if it is helping people. I just wanted to say that I know this thread is very technical and it probably makes some feel that they can't contribute, but that is far from the case. Creating a program is not just about coding. We can use your help with the direction of the app or scenarios. Maybe you see a way to use it in a larger piece of work, such as an article, paper or web-page. We are creating a tool, so any ideas on how to make the best use of it are certainly welcome.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Wed Jan 02, 2019 1:31 am

.
Cyclic Polygon Status - When I copy the typed numeric array into the edges array the result is mostly NaN's. I've tried a few different ways, here's one.
Code:

//////////////////////////////////////////
// spherical.js lines 1401-1407

     for ( i = 0; i < numEdges; i++ )
     {
          edges[i] = array[i];
     }
     edges.length = numEdges;
     ///console.log( 'array: ' + values.array.length + ' - ' + values.array );// when uncommented, there is no output, values is undefined.
      console.log( edges.length + ' edges with lengths: ' + edges ); //

////////// Console Output

THREE.WebGLRenderer 88                   three.js:21191:3
4 edges with lengths: ,,,                spherical.js:1408:3
P1: x = NaN, y = NaN                     spherical.js:1552:4
P2: x = NaN, y = NaN                     spherical.js:1552:4
P3: x = NaN, y = NaN                     spherical.js:1552:4
P0: x = NaN, y = NaN                     spherical.js:1552:4
array: 4 - 5,4,3,2                       spherical.js:1361:4
////////////////////////////////////////////////
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Wed Jan 02, 2019 3:02 am

You're not setting the value of the array variable. You set it to an empty array, but do not set it to the value from the controls. You should have something like this:

Code:

var array = values.array;

or just use values.array directly. No need for a local variable to reference it.

The value for numEdges should be set from values.array.length. You can't rely on the user entering the correct number of edges and the correct number of edge lengths to match. Although you could use that value as a minimum and add default edge lengths if the array is not long enough.
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by LongtimeAirman on Wed Jan 02, 2019 8:59 pm

.
Possible Charged Particle Field  - Page 25 Cyclic11
Cyclic Polygon radius finder.

Thank you Sir, edges[] is now set equal to values.array[i], and numEdges to values.array.length. Cyclic Polygon appears to be working perfectly. I suppose I should try breaking it next – or should we trust the users?

This latest Parameters tab is a real improvement. Without the new numeric list, each number entry on the UI’s parameters tab increased the tab’s vertical dimension by two extra lines – forcing an edge upper number limit due to the tab dimensions alone. Now that that isn’t a problem, I suppose the upper limit is related to the single UI numeric list entry line - open wide.

You’re right, it’s enough to ask the user to provide the edge lengths without asking for the number of edges as well. Text in space does sound like a problem, the console is preferable, I'm afraid the average user doesn't know where to find the browser console - I guess I should work up the additional instructions.

The diagram might be improved with P1 - P0 labels but I'm not insisting on it.  
.

LongtimeAirman
Admin

Posts : 1306
Join date : 2014-08-10

View user profile

Back to top Go down

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

Post by Nevyn on Fri Jan 18, 2019 5:02 pm

Airman wrote:Text in space does sound like a problem

Text can be a pain, but it really depends on what you want to do with it. Putting a label, like 'A', at a point is feasible. Writing the coordinates of those points is not.

Airman wrote:the console is preferable, I'm afraid the average user doesn't know where to find the browser console

The console is there for the developer. It is a debugging tool. Never, ever, expect the user to use it or even know what it is. They won't, and shouldn't.

I will have a look into writing a helper function to place a label. I'll try to keep it the same as the ParticleFactory, maybe even put it into that class, since it is already available. Usage will be something like this:

Code:

// set the current font
factory.font( 'sans serif' ).size( 10 ).style( 'bold' );
// create all labels which will use the above font and settings
var label = factory.createLabel( 'A' ).place( 10, 5, 3.4 ).rotate( 0, 1, 0, 45 ).get();
// TODO add label to scene
label = factory.createLabel( 'B' ).place( -1, 3.25, -30 ).rotate( 1, 1, 0, 90 ).get();
// TODO add label to scene
Nevyn
Nevyn
Admin

Posts : 1684
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

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

Post by Sponsored content


Sponsored content


Back to top Go down

Page 25 of 29 Previous  1 ... 14 ... 24, 25, 26, 27, 28, 29  Next

Back to top


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