If "Every time to sphere is hit by a laser it is shrunk 5% of its area and its density is increased 5%", then its mass would not change. The circle's mass in this scene does change.
This works:
in onHitByLaser:
radius = radius * 0.95^0.5;
density = density/0.95;
Looks like you are going to have to study algebra and geometry a little harder. I gave you the answer above and will repeat it here for convenience:
in onHitByLaser:
radius = radius * 0.95^0.5;
density = density/0.95
The density increases by 1.0526 (=1/0.95). JUST CALL IT Basic Math! Feel free to use it in any of your scenes. The formulas relate to circles. Algodoo does not have spheres. Spheres would use a different formula.
Maybe I'm a little harsh on you by assuming you are familiar with algebra and geometry. At an rate, the scene's formula for radius is wrong. It appears that you assumed it was correct and then experimentally determined the corresponding factor for density. I guess that shows some creativity and ingenuity.
These mechanisms are slightly modified versions from Figure 8 in "Classification and type synthesis of 1-DOF remote center of motion mechanisms" by Guanghua Zong, Xu Pei * , Jingjun Yu, and Shusheng Bi.
I think that the ability to filter the Algobox home page may help alleviate the problem. If I go to the "Search" page and don't enter any search criteria and sort by date, descending, then I get the equivalent of the home page. If I were able to exclude scenes with certain words ("marble" for instance), then I would get to see what I am most interested in. Marble racers, on the other hand, could include all scenes with the word "marble".
If the home (or Search) page was bookmarked, then it would save the search criteria with it. If you give the Search page utility the ability to exclude certain words, then that would be good enough for me.
P.S. The "Marble races" category is not working out too well, seeing that there are only 91 scenes in that category while there are over 3000 marble scenes outside that category.
The home page should be customized to the user. Look at YouTube, it tracks what you look at and then makes suggestions. I don't like the fact that it tracks your selections, but still it's a lot better than looking at every single YouTube video listed in reverse chronological order. YouTube allows you to search by using Boolean "+" and "-" operators. "Categories" won't fix the problem. Only 3% of the marble race scenes are in the Marble race category. Scenes you don't want to look at are just "noise". A search filter can block that noise. At a very minimum, the Algobox Search page should allow Boolean searches.
Nice work. You took what I did and went one step further. This is the way Algobox should work. This scene is a lot more user friendly than the original.