Spinning Particle Language

Go down

Spinning Particle Language

Post by Nevyn on Thu Jan 10, 2019 9:49 pm

SPL


A language to express a series of stacked spins in order to create a particle. The syntax is very simple and yet more powerful than any of my previous stacked spin applications. It has been intentionally designed to allow all possible combinations of spins, even if they are illogical or illegal.

The basic construct of an SPL expression is a spin. A spin is specified by the axis that it rotates around. You can also declare an axial spin which, by default, will rotate around the Y axis. This gives us 4 spin types:

AAxial spin
XX spin
YY spin
ZZ spin
We create a series of spins like this:

AXYZ

White space will be ignored and the expression is exactly the same as without it. Therefore, the following expression is equivalent to the last:

A XY Z

This allows us to group spins into spin sets:

A XYZ XYZ XYZ

which helps to keep track of the spins in a large particle.

Each spin level can be declared positive or negative, which specifies the direction that the spin level will rotate. By default, all spins are positive. We use a + or - sign after the spin axis to declare the spin direction:

A X-Y+Z

A spin level may also be given a starting angle. This sets the initial position of the node that the spin level contains. It must be a positive floating point number between 0 and 360 inclusive, and will be interpreted as the number of degrees around the spin level axis.

A X90 Y-180 Z+12.5

Note that we only use positive numbers, so the Y axis in the last expression is not to be read as -180°. It is a negative spin level that is offset by 180°. If you want to avoid confusion, then just add in some white space.

A X Y- 180 Z

There are no restrictions on what axis you put any spin level in a series. Every spin level is treated individually and can spin on any axis. This allows you to create illegal particles but it also allows you to use higher axial spins or non-alphabetical series.

AXYZ AXYZ
AZYX

For long expressions, you can use multiplication groups to shorten things up a bit. Surround the desired sequence of spins with ( and ), followed by a positive integer to set the number of times it should be multiplied.

A (XYZ)2 X-Y+Z-

You can play with it at www.nevyns-lab.com/mathis/app/spl/spl.html


Last edited by Nevyn on Thu Jan 10, 2019 9:57 pm; edited 3 times in total
Nevyn
Nevyn
Admin

Posts : 1540
Join date : 2014-09-11

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

Back to top Go down

Re: Spinning Particle Language

Post by Nevyn on Thu Jan 10, 2019 9:54 pm

You may be wondering why I didn't call it the Stacked Spin Language, which was my first thought as well, however that would contract to SSL, which is already used within the IT industry and I didn't want it to be confusing, so I named it Particle Spin Language instead. It had that name through all of the development until I realised that I had named my source code files spl instead of psl, and renaming them was a lot harder than renaming the language. So it became Spinning Particle Language.
Nevyn
Nevyn
Admin

Posts : 1540
Join date : 2014-09-11

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

Back to top Go down

Re: Spinning Particle Language

Post by Nevyn on Thu Jan 10, 2019 10:39 pm

Live Particle Visualizer


The current SPL app uses a visualizer that shows a particle as it is spinning. It allows you to record the path to see where it goes. The frequency setting can be used to determine the resolution of the path. A higher frequency will reduce the time between measurements. Large particles may require a low frequency to capture their size.

You can choose the marker type between lines and cubes. Lines are always visible and should be used for large particles but also small ones if it covers your needs. The cubes give more information than the lines, because they can show orientation as well as position, but they are 3D objects that have size. This causes them to reduce in size as you zoom out to see a large particle. There is a setting to change the size of the marker cubes, but it can only do so much.

The Marker Limit control can be used to increase/decrease the number of markers that are recorded. This can be between 100 and 10,000. For large particles, even 10,000 will not be enough to capture their size. You must also reduce the frequency to stretch out the space between markers.

Nevyn
Nevyn
Admin

Posts : 1540
Join date : 2014-09-11

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

Back to top Go down

Re: Spinning Particle Language

Post by LongtimeAirman on Fri Jan 11, 2019 7:57 pm

.
Nevyn, you’re on a roll, it's hard to keep track. This latest spin stacking application - Spinning Particle Language - is the easiest to use yet.


For some reason I was compelled to create an image. Good thing, it turned out to be a complete surprise, I would have bet that each of the six images shown would be a torus, but clearly that is not the case. Why is that? How can A,x,y,z,x, .. be positive, and A,z,y,x,z, ... be negative unless the axial spin is coming into play?

I saw a bug yesterday, an erroneous line from (0,0,0) to the start of the marked positions, but since I haven’t seen it today, you probably corrected it in the meantime.

I know it couldn't be easier, but please consider adding an information key.
.

LongtimeAirman
Admin

Posts : 1196
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Spinning Particle Language

Post by Nevyn on Fri Jan 11, 2019 8:33 pm

The main aim of my language series is ease of use. It represents a transition of my thinking from personal usage to providing something for others to use. As I was working on AML the other day, I realised that I could do the same thing for stacked spins, so here we are. I wanted it to be able to allow a lot of freedom in the expressions because I want us to use it to compare ideas. People often ask about the order of spins, should it always be XYZ or is ZYX or XZY or any other combination allowed. I wanted them to be able to see for themselves that the dimensions don't really matter as much as you would think.

I think the reason for your image differences is the axial spin, which is always on the Y axis. I couldn't think of a nice way to express the axial spin dimension in the expression, because it would require a second use of X, Y or Z and that would get confusing. I could provide a setting to choose it, but it would still always be the same dimension for a given rendering.

That bug is not fixed. I thought I did fix it the other day, but I have seen it since. I think it is a timing issue. When you switch marker types or rebuild the model it can record a marker before motion begins. I'll look into it a bit deeper.

I thought about an information dialog, since I copied the code from AML which already had one. What sort of info would it show?

I will be developing a new visualizer soon, one that uses the code from Spin Path Generator to just calculate the points rather than watch the particle spinning. Initially I thought I would put them both into the same app, but I think I will create a new version instead. Keeps the settings cleaner if nothing else.
Nevyn
Nevyn
Admin

Posts : 1540
Join date : 2014-09-11

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

Back to top Go down

Re: Spinning Particle Language

Post by LongtimeAirman on Sat Jan 12, 2019 1:34 pm

.

Here’s what we see when we open the Spinning Particle Language, https://www.nevyns-lab.com/mathis/app/spl/spl.html. The same applies to the Atomic Modeling Language, https://www.nevyns-lab.com/mathis/app/aml/aml.html.

There's something missing. I try clicking everything and see that the bottom right has four buttons. The only one that seems to do anything is the … , I can change parameters, but doing so has no effect - there’s no output on the screen. If I arrived at the site by accident, aside from changing the html address to Nevyn's lab, I would have no idea how to proceed. As yet, even that doesn't directly help.

Recommend adding a button containing some of the information you provided in your initial post above. Perhaps include "Type and enter A to see the particle’s Axial spin. We can then add orthogonal X, Y, or Z spins, resulting in: AX, or AY, or AZ. etc." I believe adding an SPL tutorial to that info key would be ideal.

Alternatively, recommend adding a default particle, and change the message from “Enter SPL for particle” to “AXYZ is shown, enter SPL for a new particle".

White space will be ignored and the expression is exactly the same as without it.

Comment. White space doesn’t appear to be working properly, or rather, one can screw up white space by using small letters instead of caps. Axy, Axz, Ayx, Ayz, Azx, Azy all result in the output A - the particle is axially spinning. Putting spaces between the letters has some problems, for example, Az y ‘works’ but A zy doesn’t. I carefully used spaces between all spins (i.e. A x y z) in my previous post of the six axial plus two orthogonal spins in my previous post.

That's all the critique I've got at the moment. I like it.
.

LongtimeAirman
Admin

Posts : 1196
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Spinning Particle Language

Post by Nevyn on Sat Jan 12, 2019 6:11 pm

I added an initial dialog to explain the app if there is no SPL expression supplied on the URL.

The bug you found was not caused by white space, but lower case letters. The tokenizer wasn't seeing them as delimiters, only the upper case versions. Adding whitespace probably helped, as it would see them as delimiters.

I also let you hit the enter key to generate an expression. I've been meaning to add that for a while.
Nevyn
Nevyn
Admin

Posts : 1540
Join date : 2014-09-11

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

Back to top Go down

Re: Spinning Particle Language

Post by Jared Magneson on Tue Jan 15, 2019 3:07 am

This is excellent work, yet again! Very cool. Thanks for all your efforts, Nevyn!

Jared Magneson

Posts : 490
Join date : 2016-10-11

View user profile

Back to top Go down

Re: Spinning Particle Language

Post by Cr6 on Mon Feb 04, 2019 2:38 am

Jared Magneson wrote:This is excellent work, yet again! Very cool. Thanks for all your efforts, Nevyn!

I concur... ace work guys!!!

Cr6
Admin

Posts : 1149
Join date : 2014-08-09

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

Back to top Go down

Re: Spinning Particle Language

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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