Atomic Model Editor

Page 3 of 7 Previous  1, 2, 3, 4, 5, 6, 7  Next

View previous topic View next topic Go down

Re: Atomic Model Editor

Post by Nevyn on Sun Sep 20, 2015 7:41 am

I have made another update, this time to show charge that flows across a proton stack as a result of through charge from an adjacent stack. I'm not sure I have all of the motions correct yet, but it is pretty close. With this enabled, you can completely turn off the charge discs and still see the atom.

The graphics performance setting now changes the types of charge particles that are shown. The default setting will only show charge emission. Higher settings will enable intake and through charge. You can always go to the setting yourself and turn them on/off so you can choose a low graphics setting and then turn on the particles to your liking. For the best performance, assuming your graphics system can handle shaders, it is probably best to use the minimum graphics setting and then turn off the charge discs and turn on all charge particles. This will move nearly all processing to the graphics card.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Cr6 on Tue Sep 22, 2015 12:38 am

Nevyn wrote:I have looked into hosting arrangements but have not chosen a particular set of technologies that I may need in the future which makes it difficult to select a specific host. I am looking at 2 different kinds of hosts. The first is the normal web hosting setup where you usually have access to a web server running PHP and a back-end database, usually MySQL. The other hosting type is called Linode and basically gives you a Linux Virtual Machine that I can do whatever I want with. This is my preferred option since it gives me complete control over what I want to use. However, it also gives me complete responsibility to keep it running, secure it, etc. Public sites get attacked all the time and it can be a real time waster dealing with it.

The costs of the basic hosting arrangement is about US$8 a month. I can get it a bit cheaper at the moment as they have a special on and it is about $5 a month but that will eventually run out and it will go back up to the higher amount. There are also some hidden costs (that I can choose) for extra security, auto backups, etc, so it adds up in the end. The Linode cost is US$10 a month, no specials, and while this is a bit more expensive, it does provide me with much more power (but with great power comes great responsibility) and if I want more security, then I just implement it myself, same with backups, etc.

That's a great goal Nevyn. I think the Linode long-term might be the better and most flexible choice for web-server/mysql database. But that would require more work for upkeeping the server and preventing hacks. By all means look at getting a minimal income stream to at least upkeep the site.

I've been looking at Apache Drill or Apache Spark lately. They could work with a php/MongoDB combo -- they seem to be very json friendly. Might be a lot of configuration work over a simpler php/mysql start when including the on-going maintenance/security.

https://www.mongodb.org/downloads
https://github.com/mongodb/mongo-hadoop/wiki/Spark-Usage
https://drill.apache.org/
https://spark.apache.org/

Cr6
Admin

Posts : 656
Join date : 2014-08-09

View user profile http://milesmathis.the-talk.net

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Tue Sep 22, 2015 7:44 pm

Hmmm, non-relational databases? Didn't we throw those out in the 80's?

I am so used to working in relational databases I don't see how to use a non-relational one effectively. I've only spent about 10 minutes looking at it but at the moment I can't determine exactly what they mean by non-relational. Does it just mean that the database does not store any relationship information but you can still link things together in your SQL (like inner joins, etc)? Can a "table" contain child records directly instead of linking to another table? I'll have to look into it a bit deeper. Thanks for the links and getting me thinking in a new direction.

I don't have any ties to PHP. In fact, I've never built a site with it. I have fixed bugs in someone else's PHP code but there's a lot I don't understand with it (although it's just a matter of learning their syntax and function names, etc). My preference would be to use Java as my server language which would run inside Apache Tomcat which would be hidden behind an Apache Web Server (more secure and faster for basic file transfers). I would still do most of the coding in Javascript and only use the back-end server where it is absolutely needed. I was only thinking PHP/MySQL because nearly all hosting environments have those already (but that also makes it a more likely target to hack).

I do have to get things moving though as Miles has offered to put a link on his site to the AV app. I am 90% certain that I will go with Linode at this point. It may cause me some pain but at least I can figure out what it happening and apply fixes, etc. While a more standard web hosting system does provide some security, it is also a little sandbox where you don't always have access to what you may need to fix a problem. They are designed to make is easy for (almost) non-technical people to get up and running.

So my plan of attack is:

1) Clean up the interface. Dialogs, selecting elements, etc.
2) Find a way to separate viewing from editing such that they share code, not copy it.
3) Restructure the settings into a more coherent hierarchy.
4) Write some help pages within the app and some informational pages along side of it.
5) Apply code licensing. Not sure about this now, since it is moving away from an open source model.
6) Buy hosting environment.
7) Setup back-end services on host.
8) Secure services.
9) Setup backup regime.
10) Setup site monitoring system. Checks for dead processes, file changes, etc.
11) Buy domain name and link to host.
12) Research e-commerce frameworks, select one and set it up.

It will probably take me a few months to get all of this done so I am thinking of a new years launch.

Now, if I can just stop playing the new Metal Gear Solid game so much, I might find some time for all of this!
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Thu Oct 01, 2015 12:10 am

I have updated AV to version 0.7 which is basically some bug fixes in the dialogs to select elements and define JSON objects and some lighting settings. The directional and spot lights still do not work properly and I think I will drop these as they are not really needed and were only in there because I wanted to play with them in the beginning of development of this app. I have also changed the navigation system back to the original Orbital type as this works better for 1 or 2 models and my alternate version had some issues that annoyed me every now and again.

I am trying to clean up the code so that I can split it into a Viewer and an Editor while also trying to figure out how I can use a common code base for both of them. I know how I can do this easily with a back-end server but not so easy without one. I think I really need to bite the bullet and just use one. It will open up a few possibilities that have sat in the back of my mind for a while. Might be a good opportunity to learn a bit more PHP. I keep thinking of Java technologies that I could use but something still tells me not to tie myself into such a hosting arrangement, even though I am nearly certain that I will go with a Linode VM.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Mon Oct 26, 2015 12:21 am

I am a little over half way through Metal Gear Solid V and am really enjoying it, hang on, that's not why I'm here...

I haven't been putting much time into this project over the last few weeks, which I feel a bit guilty about since I had just committed myself to getting all of this set up, but I have now made some progress on the hosting arrangement. Last night, I bought a Linode VM, setup a Linux distribution, installed a Web Server, secured it as far as I want to at the moment and installed a copy of my site. It all came together very easily. Linode provides many great tutorials on how to get started and I only had one problem during the entire setup. I suspect that problem was a result of the Linux distro I chose as I went for the more up-to-date version rather than the recommended one. The VM is currently configured as I want it, but I don't think it will survive a reboot because of that error. I will try to track down and fix the problem but I may need to start all over again with the older Linux distro. Unix administration is not my forte, although I have done bits and pieces over the years.

So my updated plan of attack is:

1) Clean up the interface. Dialogs, selecting elements, etc.
   I have done some, but there is more to do.
2) Find a way to separate viewing from editing such that they share code, not copy it.
   I have PHP now so I think I will try to use that to bring all of the pieces together based on whether
   the user is viewing or editing. I could also setup a database and have formal users/groups that
   restrict access. Needs some thought on what is feasible in a small time frame.
3) Restructure the settings into a more coherent hierarchy.
4) Write some help pages within the app and some informational pages along side of it.
5) Apply code licensing.
   I have had a quick look into this but nothing substantial at the moment.
6) Buy hosting environment.
   Done.
7) Setup back-end services on host.
   Done.
8) Secure services.
   Done.
9) Setup backup regime.
   I had a look at my options but need a formal backup regime.
10) Setup site monitoring system. Checks for dead processes, file changes, etc.
11) Buy domain name and link to host.
   I have researched domain name registrars but have not decided on one yet.
   This is tricky because there are some real dodgy operators out there.
12) Research e-commerce frameworks, select one and set it up.
   I will probably not worry about this for now. Maybe later when I have something worth paying for.

So, in spite of not putting much effort into this lately, everything is coming along nicely enough. I really did need a break from it. The first 50% of a project is usually the easiest as you have that drive based on all of your ideas. The next 30% goes ok because of the momentum you build during the first half. But that last 20% is a killer. A lot of personal projects get left at this stage. Even in the professional world, that last bit requires so much work and you don't have the option to just walk away. I'm trying to keep that mind-set with this project because I think it deserves a professional attitude. I didn't intend for it to go this far but now that it is getting close, I really want to push it over the finish line and let it out into the world. For better or worse!
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Fri Oct 30, 2015 10:25 pm

I now have my very own domain name! It took some thought to come up with one (that was also available) as I don't really know what this site is going to end up as. I settled on a more personal touch as I can always buy more domains later for different purposes and point them all to the same system (but completely separate in the web server).

I'm really struggling with an identity for the site. Right now, it is for these applications, but I am not limited to that or to Miles work. I feel like everything has opened up before me and I just don't know where to go. But I am a believer in an evolutionary approach to these things, so time will tell. I do feel that I need more pages around these apps and certainly more pages that describe the apps and how to use them. However, it is the front page that worries me. It really needs to set the scene.

I'm not used to creating this side of a system, usually I am creating the server side components with a bit of HTML/Javascript as an interface. It is good to be learning though, and I do like to be creative.

It's been great setting up the server. I expected a lot of it to be painful, finding info on the web that doesn't quite work, dependency conflicts, security holes, but it has been very easy with my compliments going to both the Linux OS and to Linode for their tutorials. Linux really has stepped up and fixed issues that I have had with it in the past and I really can't say enough good things about Linode. Great platform for anyone with some administration skills or the desire to learn them. Only slightly more expensive than other hosting sites but you get all the power that others don't provide.

So, without further ado, I present to you: Nevyn's Lab.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Fri Oct 30, 2015 10:33 pm

Updated plan of attack is:

1) Clean up the interface. Dialogs, selecting elements, etc.
  I have done some, but there is more to do.
2) Find a way to separate viewing from editing such that they share code, not copy it.
  I have PHP now so I think I will try to use that to bring all of the pieces together based on whether
  the user is viewing or editing. I could also setup a database and have formal users/groups that
  restrict access. Needs some thought on what is feasible in a small time frame.
3) Restructure the settings into a more coherent hierarchy.
4) Write some help pages within the app and some informational pages along side of it.
5) Apply code licensing.
  I have had a quick look into this but nothing substantial at the moment.
6) Buy hosting environment.
  Done.
7) Setup back-end services on host.
  Done.
8) Secure services.
  Done.
9) Setup backup regime.
  I had a look at my options but need a formal backup regime.
10) Setup site monitoring system. Checks for dead processes, file changes, etc.
  I have setup system monitoring, not site content monitoring.
11) Buy domain name and link to host.
  Done.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Sat Oct 31, 2015 4:51 pm

Nevyn, I’m not qualified to offer you any feedback in your server development, but it sounds like you’ve got the technical side nailed. Of course, the biggest costs are time and energy. You hinted at other interests; anything to do with World Domination? Maybe (Nevyn’s) Nefarious Laboratory.  I can help with a share and modest efforts but I’m glad I’m not here for the money.

I went looking for the Lab in the usual spot, but of course, it isn’t there yet. So I played with the… Periodic Table (PT), and AV0.7.

1)  PT. It’s really convenient to be able to go back and forth from the Periodic Table to the Atomic Model Editor (AV0.7). I can now easily dial through rows or columns and clearly understand the organization of the table, which, I'm sure you'll agree, has never been possible before.

2) PT, AV0.7. Control Settings are reset each time the Table accesses it. Any chance those settings, if changed, could remain constant?

3) AV0.7 I see that you have divided your view space, top and bottom, left and right, with the Hydrogen proton at the center. This center never changes - except to translate to the midpoint between the carousel alpha protons in the majority of elements - however the atomic structure grows, mostly up. Or with meta data on top. Please consider re-centering the vertical camera space as necessary.

4) You indicated the need for help pages or additional information. I second that. It could be meta data too.

5) PT. Currently, you can display the element’s details when you hover over the element, or hold shift down to keep the detail from changing. I think you can improve the page by displaying a reduced image of the element along with the details.

(5b) Alternatively, if you’re really in with threejs, why not use their famous floating transparent periodic table complete with your models?)

Spaater

Oh. http://www.nevyns-lab.com/

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Sat Oct 31, 2015 11:00 pm

LongtimeAirman wrote:
2) PT, AV0.7. Control Settings are reset each time the Table accesses it. Any chance those settings, if changed, could remain constant?

Yeah, that is a good suggestion. Now that I have PHP I can look into these types of things. Currently, it is stateless, so there is no way to remember the settings. It could probably be done through cookies but I already plan on having session code in the PHP so I will do it all there.

LongtimeAirman wrote:
3) AV0.7 I see that you have divided your view space, top and bottom, left and right, with the Hydrogen proton at the center. This center never changes - except to translate to the midpoint between the carousel alpha protons in the majority of elements - however the atomic structure grows, mostly up. Or with meta data on top. Please consider re-centering the vertical camera space as necessary.

I'm not sure what you mean here. I assume it is a result of the change in navigation controls which now lock on to the center, unless moved with a right-click+drag.

You also might be referring to how zoomed in the camera is when you select a large element from the PT page. Yes, these need adjusting and it is entirely possible now, I just haven't gotten around to it.

Can you try to describe the problem again for me? I just went to the PT page and selected Platinum and it was very close to the atom so I think this is what you are referring to. I will fix it.

LongtimeAirman wrote:
5) PT. Currently, you can display the element’s details when you hover over the element, or hold shift down to keep the detail from changing. I think you can improve the page by displaying a reduced image of the element along with the details.

Another good suggestion. I need a way to generate the images which, again, now that I have PHP I can do this more easily. You've given me the idea to generate a slide show of images of all the elements in a table.

LongtimeAirman wrote:
(5b) Alternatively, if you’re really in with threejs, why not use their famous floating transparent periodic table complete with your models?)

This is an even better idea and I might be able to find a way to incorporate both the periodic table and the selected element into the same scene. It might be a bit tricky on screen space but it is worth a try.

I've been thinking of having as much of my site in Three.JS as possible. Long term goal, but if I can do it right, will work out well, I think. The onus then becomes creating the artwork for 3D environments which is not really my forte. I'll keep the idea in the back of my mind and see if anything pans out.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Cr6 on Sun Nov 01, 2015 11:17 pm

Sorry not to comment more frequently Nevyn and LTAM.  

Looking over things, it is really very impressive what you have done Nevyn.

I too, like LTAM, find this a great tool to see the structures by flipping the Atomic editor and Periodic table.

The PHP looks like a great option to try.

As for MongoDB, it allows JSON rendering to "tables" in a virtual way. Basically, a JSON atom could be stored in single line of text that can be auto-rendered into a table format from just a single database entry.  I was thinking down the road when Atom Bonding Mathis style is on the horizon, it could allow a full "molecule" to be rendered from a single database entry rather than combining tables with joins (though still available).  Don't want to sidetrack too much on the non-table entities. It might provide fast flexibility in JSON when needed rather than adjusting table structures with alters and such.  Just a thought.

This image relates the story:

http://drill.apache.org

The site looks very nice and presentable.


Last edited by Cr6 on Tue Nov 03, 2015 2:01 am; edited 1 time in total

Cr6
Admin

Posts : 656
Join date : 2014-08-09

View user profile http://milesmathis.the-talk.net

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Mon Nov 02, 2015 11:02 pm

I spent some time back in the code for AV last night. I updated the PT page so that it sets the position of the camera better when it goes into AV. It could probably still use some fine adjustment, but it is pretty close. This is working on the new site now.

I have also added in PHP so that I can do all sorts of things I couldn't before, but I have not updated the server with these updates yet. PHP is a server-side scripting language. It allows me to put logic into the existing HTML/Javascript source code to control what parts of it get served to the user or maybe alter those parts based on settings in a database, etc. It does plenty of other things but that is generally what I will be using it for in this project.

All previous versions were just straight HTML/Javascript so the app was completely client-side. Once the files were served to the browser, there was no server interaction at all. Now, I am using PHP and a database (currently just for user/role information) to send back code for either a Viewer or an Editor. It is all in the same source files, but PHP allows me to choose which parts I want to serve for a given request. If the user has the 'editor' role, then they will get extra bits of code that implements that functionality. There is no way to actually login yet, so the user is selected by me in the source code, but I will get to that eventually. I don't actually need an editor at the moment so it is really just for my own testing to make sure the code works as both a viewer and an editor.

Right now, I just want to get a viewer up and running so that I can give a link to Miles to publish. This will be a very cut-down version of what you guys have seen so far. I am thinking of removing all of the Graphics Settings and only leaving the Performance selector. Any settings related to the actual parts of the element, such as rotating neutrons/electrons, will remain, but moved somewhere else in the menu structure. I have removed backgrounds and element positioning since these aren't needed and I may have some licencing restrictions on some of the textures I have used. They were all free ones, but often you need to acknowledge the author on your site somewhere and I don't have that information at the moment. It will take a bit of a search to find it.

The other thing I have done with PHP is to save the performance settings so that when you come back to the page it will set it again for you. This is stored as session data on the server and will expire after a certain amount of time. Usually this is set to 30 minutes, I haven't looked to see what my value is, and I think that it expires 30 minutes after it was last used, not 30 minutes since you created it. In the future, these will be saved in the database so that they work all of the time if you are logged in. Might be one of those nice features you have to pay for. I don't wan't to hold back functionality to force people to pay for the system but I think this is a nice middle ground.

I am still working on this. I have the performance setting working but I also wanted to add in whether it shows the metadata or not (atom name, symbol, number, etc). I am thinking of changing how it works so that it can save all of the settings but I think I will have to re-organise some of the settings to make this effective. Basically, there is data in the settings object that are actually values used by the settings rather than actually being settings and I need to move these out so that they are not saved with the settings which would be a waste of space and network IO. This is data like links to background textures, positioning algorithms, etc.

I find myself thinking about things like network, cpu and memory usage on my server. I usually don't have to worry too much about these things because my clients can afford nice powerful systems. Ask any system administrator and they will tell you the developer solution to performance problems is always 'give it more hardware' while the admin is thinking 'make your app work more efficiently'. Now I find myself being both of these roles and stuck somewhere in the middle. I can give it more hardware, but it will cost me more per month. Oh, yeah, I'm the treasurer too.

So I have to really think about what I am going to implement and how that affects the system. It might work fine with 100 users but not with 1000 while an alternative implementation might work better at that scale. I have to think about these things now because I will be charged extra if my server uses more resources than I am allowed, whether that be download quota, cpu usage or memory. I don't expect too much load, but there could be a sudden influx of users when Miles publishes a link to it. I am actually really interested to see those numbers so I better find a way to record them.

A quick search later and I have a solution for that, too.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Tue Nov 03, 2015 12:37 am

Cr6 wrote:
As for MongoDB, it allows JSON rendering to "tables" in a virtual way. Basically, a JSON atom could be stored in single line of text that can be auto-rendered into a table format from just a single database entry.  I was thinking down the road when Atom Bonding Mathis style is on the horizon, it could allow a full "molecule" to be rendered from a single database entry rather than combining tables with joins (though still available).  Don't want to sidetrack to much on the non-table entities. It might provide fast flexibility in JSON when needed rather than adjusting table structures with alters and such.  Just a thought.

I understand the attraction of these flexible data structures, reducing the need to change rigid database schemas. My worry is that query performance will suffer because of it. Also, the SQL needed to query these sorts of tables can become horrendous. I was thinking of a schema that would facilitate nice, or at least effective, queries but maybe I shouldn't worry about that. Horrible SQL can always be hidden behind views, stored procedures (I assume procedures are available in these databases) or in the application code (but preferably not). And maybe I was creating horrible SQL by trying to split it into a few tables in order to reduce data redundancy. I was dealing with quite complex data (our element JSON structure) so I will assume that I am at fault, for now.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Tue Nov 03, 2015 6:00 pm

I got the persistent metadata settings working last night and updated the site which is now at version 0.8. I also spent some time minifying and collating the Javascript files in order to reduce network IO and loading time. It also obfuscates the code, which makes it difficult to read and figure out what is going on. That wasn't really my aim but I don't mind either.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Lloydd on Thu Nov 05, 2015 9:08 pm

Sorry I missed out on your progress till now, but maybe I can catch up a little. Looks interesting.

Lloydd

Posts : 15
Join date : 2015-11-05

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Thu Nov 05, 2015 9:37 pm

Hey Lloyd, welcome back! We were getting a bit worried about you for a while there.

We've made some great progress lately. It seemed a real shame to me that you weren't here for it because you were the real driver for this kind of stuff. Trying to get us organised and productive. Glad your back and I am looking forward to hearing your input. There's plenty for you to look over and absorb, most of my apps are on my new website (www.nevyns-lab.com) except the Solar System app so if you want a link to that, just give me a PM and I will send you the URL. I didn't get very far with that one which is why I didn't publish it on my new site.

I just noticed that this is your first post. What happened to your old account?
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Fri Nov 06, 2015 10:04 am

Hi Lloydd, Welcome back? I saw you posting at TB and wondered. Any news?

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Sun Nov 22, 2015 6:39 am

I've rewritten my periodic table page. I took the Three.JS example and wove it to my own needs. I think it works pretty well.

I colored the elements based on their groups and added a legend. You can click each legend item and it will color all other elements black, highlighting that type. Click on the currently selected item again to turn them all back to their default colors. I just used the same colors I had on my existing page but these are transparent (25%) so they are a bit darker. I would like to brighten them up a bit.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Sun Nov 22, 2015 3:04 pm

You’re getting there. Here's a little feedback. I'll try to be clear.

1. As far as I can tell, it launches perfectly.
2. Wow, firefox shows only the table and view space! A new full screen mode (move mouse to top margin to recover browser control). Also near perfect. I don't ever remember seeing that before. AV0.8 also looks better this way.  In Chrome, the top browser tabs, and bottom taskbar remains visible.  
3. In this mode, the atomic symbols are clear, but the names and numbers are not. All those S’s don’t make any sense to me. I clearly see what they do.
4. In Firefox, if I rotate my mouse wheel one increment to get closer, the table is expanded such that I can only see the element tiles -top row: Ru,RhPd,Ag; and bottom row: Os,Ir,Pt,Au. When I wheel back one increment, the table is reduced to half size. The wheel basically just switches between the two views, … Fix the dolly! Chrome’s dolly works fine.
5. When an element is selected, the element’s table tile rushes toward the viewer. Works well. It eases one’s mind while being redirected to AV0.8.
6. In Firefox, when returning to the table from AV0.8. The background color is what was left by the rushing tile - black is no longer the view space color when the browser tabs are visible. With the mouse over the view space the background color returns to black. The tile is actually in front of the camera. Real fit inducing to be able to flip between the color schemes and small size difference between the two (full screen and browser view) by just moving the mouse past the top margin boundary. I can right click to shift the camera position sideways, and go on selecting elements and returning to displaced tiles. In chrome, there is no such problem as the page is simply reloaded.
7. Please consider giving the user the option to select a new browser tab (ideally without conflicting with the rush (5) above) so that when an element is selected, AV0.8 doesn’t need to keep reloading between the two applications to simply go back and forth.
8. Please consider loading smaller scale elemental images directly to the Table rather than launching the full AV0.8 editor.
9. AV0.8's element selector now looks rather shabby in comparison to the table. Maybe you can pull a periodic table in to replace it.

Any further word? My fingers are still crossed.

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Sun Nov 22, 2015 4:10 pm

8. Please consider loading smaller scale elemental images directly to the Table rather than launching the full AV0.8 editor.

I've made similar comments before. As I see it, adding a hundred image files to the program begins to get burdensome. Sure. But if the images were based on Cr6's excel "orthographic view", we could zoom into the image on each tile itself. Cr6 images become the smaller scale. We shouldn't just jump to the full editor every time our interest moves casually along.

Speaking of that orthoview, it is the clear basis to replace or add to the tile geometry list: table, sphere, helix, grid, and ortho.

Every new proton is added to a structure: beginning at the origin; expanding along +/-Y (vertical axis), X and Z (carousal), etcetera. An animated sequence might be nice. But the point is, there is now a structure to replace the table.

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Sun Nov 22, 2015 5:48 pm

LongtimeAirman wrote:3. In this mode, the atomic symbols are clear, but the names and numbers are not. All those S’s don’t make any sense to me. I clearly see what they do.

I left these as they were in the example app. I agree with you that they are too small to see and I will probably implement something like what I had in the original where hovering over an element will display its values at the top of the table. I had a different structure in mind for the legend which was closer to my original page where the group name was beside the legend icon. Space was the main problem with this approach so I left it like it is until I can find a better way to fit it all in.

LongtimeAirman wrote:4. In Firefox, if I rotate my mouse wheel one increment to get closer, the table is expanded such that I can only see the element tiles -top row: Ru,RhPd,Ag; and bottom row: Os,Ir,Pt,Au. When I wheel back one increment, the table is reduced to half size. The wheel basically just switches between the two views, … Fix the dolly! Chrome’s dolly works fine.

Yeah, I noticed that too. Annoying, since it is only in Firefox. I will see what I can do about it.

LongtimeAirman wrote:6. In Firefox, when returning to the table from AV0.8. The background color is what was left by the rushing tile - black is no longer the view space color when the browser tabs are visible. With the mouse over the view space the background color returns to black. The tile is actually in front of the camera. Real fit inducing to be able to flip between the color schemes and small size difference between the two (full screen and browser view) by just moving the mouse past the top margin boundary. I can right click to shift the camera position sideways, and go on selecting elements and returning to displaced tiles. In chrome, there is no such problem as the page is simply reloaded.

Saw that too. It seems Firefox remembers the page and just takes you back to where you were. Kind of annoying in this instance. Not sure if there is an event I can listen for to reset everything.

LongtimeAirman wrote:7. Please consider giving the user the option to select a new browser tab (ideally without conflicting with the rush (5) above) so that when an element is selected, AV0.8 doesn’t need to keep reloading between the two applications to simply go back and forth.

Yeah, that's easy enough. It will also allow me to reset the position of a selected element in the table after it has sent you to another tab.

LongtimeAirman wrote:8. Please consider loading smaller scale elemental images directly to the Table rather than launching the full AV0.8 editor.

I want it to link to the editor/viewer, but will see what I can do with some images for quick viewing.

LongtimeAirman wrote:9. AV0.8's element selector now looks rather shabby in comparison to the table. Maybe you can pull a periodic table in to replace it.

I've been annoyed with that dialog for some time. Every time I look into fixing it, I don't seem to get very far. I'll see if I can use the periodic table directly but the problem I foresee is that the table uses a different kind of renderer (CSS3DRenderer, rather than the WebGLRenderer or CanvasRenderer) and I don't think I can use them at the same time, at least not on the same HTML (DOM) element.


Last edited by Nevyn on Tue Nov 24, 2015 5:34 pm; edited 1 time in total
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Sun Nov 22, 2015 6:35 pm

LongtimeAirman wrote:8. Please consider loading smaller scale elemental images directly to the Table rather than launching the full AV0.8 editor.

I've made similar comments before. As I see it, adding a hundred image files to the program begins to get burdensome. Sure. But if the images were based on Cr6's excel "orthographic view", we could zoom into the image on each tile itself. Cr6 images become the smaller scale. We shouldn't just jump to the full editor every time our interest moves casually along.

Speaking of that orthoview, it is the clear basis to replace or add to the tile geometry list: table, sphere, helix, grid, and ortho.

Every new proton is added to a structure: beginning at the origin; expanding along +/-Y (vertical axis), X and Z (carousal), etcetera. An animated sequence might be nice. But the point is, there is now a structure to replace the table.

Not sure what you mean by 'orthographics view' here. I think you mean the camera is positioned above and looking down at the element so you get more of an angled view of it. If there was a button along the bottom for 'ortho' mode, are you suggesting that it replace all elements with images?

I have added the ability to capture screenshots within AV now (not updated on site yet) and I should be able to extend that into something that can generate all of the images for me. I'm just not sure how to show them yet. Maybe I could create an element image which zooms out towards the viewer, much like a selected element does now, and then move the camera back so that you can see the image, leaving the periodic table in the background. Maybe reset all of the table items to be more transparent to reduce their impact. How would the user select between showing an image of an element vs opening AV? That's why I prefer the idea of showing an image when hovering over an element and leaving the click to open AV.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Mon Nov 23, 2015 4:03 pm


Here’s what I mean.

I submit the tile array above right as an addition to the tile configuration choices: table, sphere, helix, grid, nuclear. I referred to it previously as orthoview. Even though I have my drawing as an orthoview, I believe it should be in perspective view.

I know it may be a bit over simplistic, but it makes more sense to me than helix, grid, or sphere, though those are fun to have.
It even makes more sense to me than the table view. The table developed over time as the only logical way to view the properties of the elements, so it became the object we all recognize.

H is at 0,0.5,0. He is at 0,-0.5,0. As you go through the legend selectors, the tiles displayed might be interpreted in light of their own configurations.

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Tue Nov 24, 2015 4:42 pm


And again. In the three.js editor. The editor (and the code sources) is scary complicated to me, not to mention all the grief. So now I have this 800 line json file and have to figure out what to do with it. No snickers. I'm just trying to practice a bit. A few editor questions, like how do I select more than one object at a time? How should I save and use the scene?

Properly ordering the tiles seems to be the next in order. I should note that each tile is easily visible - and clickable - in the ortho view. Hovering over any would bring up a reduced image in a side pane - I think you described that. Actual clicking launches the editor - OK. The table configuration fills the screen, while the ortho fills just the center screen and allows a side pane.

I get enthusiastic too. You can always tell me to sit in a corner.

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Atomic Model Editor

Post by Nevyn on Tue Nov 24, 2015 9:57 pm

LongtimeAirman wrote:A few editor questions, like how do I select more than one object at a time? How should I save and use the scene?

There is no concept of selection in Three.JS. That is entirely up to you as the application developer. What it means to be selected, how you show that something is selected, how you actually select/deselect something.

Programmatically selecting an entity:


Assuming you want the user to click (or press if touch device) the scene to select/deselect entities, you need to look into picking. Picking is a concept based on ray-tracing where we take, what is usually, a 2D point on the screen and convert it into a ray that projects into the scene from the current camera position (you can use any ray you want, not limited to the camera). Any entity that is marked as pickable (depends on the 3D API, some do not have a concept like pickable) that intersects that ray will be returned to you and then you must determine which one you actually want to select. Please note that the entity you do select may not actually be the entity that was picked. For example, in the AV, the entities returned from a picking operation are protons and neutrons but I don't want to select them, I want to select the atom they are a part of. Therefore, I traverse up the scene hierarchy from that proton/neutron until I find the entity that I want to select.

Showing what is selected:


This really depends on your application. In the case of AV, I created a way to alter the colors used by parts of an atom so that I could make everything white, for example. This is accomplished through THREE.Material objects. A Material stores all information about what a 3D object looks like. Color, texture, bump maps, rendering choices and many more things are stored in a Material (there are many different types of Material for specific purposes). Materials can, and should, be shared, where appropriate. When you first start out programming 3D apps, you tend to create every object as its own thing and there is no sharing going on but it is more efficient to share when you can.

A 3D object (or Mesh) contains a Geometry and a Material. The Geometry tells the system where the vertices are for this object and the Material tells it how to render those vertices and the space between them. If you have 2 squares in your app, then you can share the same Geometry object between them to save memory and rendering time. They don't have to remain the same size as we can place these squares into THREE.Group objects and alter their position, rotation and scale through their Group rather than specify unique Geometry for each. Actually, I think you don't even need the Group as the Mesh has its own position, rotation and scale values that you can manipulate.

The Material may be shared between objects that look the same. If we want both of our squares to be blue, then we can create 1 Material that specifies the color blue and then assign it to both of the squares. Now, let's say that the user has made some change through your interface that changes the squares to yellow. We only have to change the color on the 1 Material object and both squares will change. If we wanted to only change the color of 1 of the squares, then we would need to have a Material object per square.

So you need to be clear about what you are selecting and how you want to present it. In AV, I know that I want to select Atoms so I apply my Materials from this point in the code so that all lower level entities get the same Material if they are the same type of entity. That is, any proton stack with 2 protons will get the same Material (blue) and any proton stack with 3 protons would get a different Material than a 2 proton stack, but all of those stacks get the same one (purple). So in effect, I have 6 different Materials for every Atom (there are actually others, but they are irrelevant to this discussion) which are all applied to the protons based on the size of the stack they are in. When an Atom is selected, I just set all of these Materials to be white. When it is deselected, I set them back to their proper colors. This is much easier and more efficient than trying to traverse through every entity in the Atom to change its color.

You may be thinking that all proton stacks with 2 protons are colored the same and so we could use only 6 Materials for the entire application, but this is wrong (in this instance, perfectly fine in others). We need a way to differentiate selected Atoms from unselected Atoms and we are doing that through the color, so we need to separate everything at the level of the selected entities (Atoms in this case). Otherwise, if we used only 6 Materials, then changing the color would change the color of every Atom, regardless of whether it was selected or not.

Determine if an entity is selected:


We usually need to know, in the code, what is selected and what is not., Otherwise, what is the point of selecting them? There are many ways to do that and you need to figure out what is the best approach for your app. It can be as simple as declaring a variable that is an array of the selected entities and you add to and remove from that array as they are selected or deselected. This allows you to quickly find all selected entities just be iterating through the array. Another approach, which I use in AV, is to have a property on your selectable entities that marks them as selected or not. This does mean that you have to iterate through all entities to find the selected ones, but sometimes you need to do that anyway so it is not a big loss. It also depends on how many things you want to be able to select. If it is a large number, or you have a large number of entities, then an array of selected entities might be better.

When the user actually selects an entity, you need to determine if they are deselecting any currently selected entities or if they are adding to the selection. I use the control key for this such that if the control key is down when an Atom is selected, then it adds to the selection, but if it is not down, then all currently selected Atoms are deselected first. This is what most operating systems do for multiple selection so it is best to remain consistent with user experience.

The Scene


The Scene is not really an object that you need to worry about. It is just the top node of the hierarchy and is used to link your 3D objects to the 3D API. That is the strict definition of the Scene but you may be using the term in a more general sense to mean all of your 3D objects, which I will call scene (upper-case is specific, lower-case is generic). In the latter case, if you want to save the state of your objects, then you need to traverse the Scene and store everything in your objects that you want saved. You could save this into some variable as an object hierarchy which you could then convert into JSON (call JSON.stringify( <object> )) and save it somewhere. Then you need code that can read that in and apply it to your Scene objects. You read the contents of the save as a string and convert it into a JS object by calling JSON.parse( <string> ). Then you use that object to change your 3D objects.

Actually saving and loading data is a bit troublesome in HTML because of security concerns. In HTML5, you can save and load files from the client machine but I have had trouble getting this to work across different browsers. Usually, a back-end server is involved so you just send the data to be saved to the server which then sends it back to the browser for it to save. Loading is a bit more difficult but kind of the same. You need to create a UI that allows the user to select a local file and upload it to the server and figure out how to get that data into your application. Probably just through the response to the upload request.

Other than that, you can present the content to be saved as text to the user which they can copy out and save in a file themselves. Similarly, you create a place for the user to paste content which you then parse and apply to your scene. This is what I did with the Element JSON data in AV as it is quick and easy to get setup.
avatar
Nevyn
Admin

Posts : 795
Join date : 2014-09-11

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

Back to top Go down

Re: Atomic Model Editor

Post by LongtimeAirman on Wed Nov 25, 2015 12:00 am

Thanks Nevyn, It's making more and more sense. I appreciate the time and effort. MM physics animations is a wonderful pursuit. I'm trying to catch up.

Picking was presented, and an example used. I didn't realize the ray-tracing aspect. I recognize various renderers, but not their limitations. I found and started another series of three.js examples from cvdlab. Mr. Doob said "animation for dummies", I've got to agree. The whole scene is falling into place. Aside from Boids, I'm not trying to take on any additional developer responsibilities just yet.

What do you think of the tile configuration idea?

.

LongtimeAirman
Admin

Posts : 583
Join date : 2014-08-10

View user profile

Back to top Go down

Page 3 of 7 Previous  1, 2, 3, 4, 5, 6, 7  Next

View previous topic View next topic Back to top


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