Wednesday, February 28, 2018

Soda Constructor (Revisited)



Soda Constructor (Revisited)

 

 

 (2026 - New website:
 https://maciejmatyka.github.io/constructor/ )

(2024 version - here)

(2020 - here)

(2019 - here)

(2018 - here

 

I remember this like it was yesterday. Back around 1998 I was sitting in front of a PC computer with my colleague from IT departament at University. These days I was starting my studies at physics departament and he showed me this application and said "yeah, look this is funny application of IT & physics together.

Yeah, that was the famous Soda Constructor from Ed Burton and Soda company. It was the experience one never forget - the app was fabolous. It was Java based applet in which you could build simple spring-mass system based models with muscles and make them live.. This app was very popular and many people created their own robots, walkers, etc. Later, Soda has changed the app into something bigger, there was Soda Zoo, Soda Race and even the second version of Constructor was released. For me, however, none of them were that magical as the original one.

Original Soda Constructor by SodaPlay.

Soda Today
Now, as we have 2018 and I am after more than 15 years of my studies in physics doing stuff like simulations I realized that it would be funny to show this app to my kids. And what? Nothing. There is nothing left in the internet - the app dissapeared same as the Java applet technology. There was some try to raise Kickstarter campaign to get Soda back, but it was not successful.

Therefore, I didn't wait long and decided to write my own version of the app from scratch. From the physical point of view it was rather simple, eventually this is a bunch of springs, masses and some time varying sinous muscles. Nothing fancy, especially that whole thing works fine with Euler integrator which surprised me a lot. I used several sources to make it as close as possible to the original app and - it is 50% done I'd say. While I am not going to repeat the sound synhesis part (is it needed anyway?) I decided to make the physical part as close as possible to original.

I recommend you to play it now on the San Jose website.


Results
Please have a look below to see some of the creations I've made with the program.

San Jose was written from scratch. This is the main view, where you can either go into construction or play mode. The default object of dainty walker based model is loaded.


























Adding more masses attached in the back and increase of gravity made the walker less efficient (this is the result of 2018 app).



I added one additional feature to the app - you may easily load/save your model by using its internal text format for the models. The user may either paste his model from clipboard or edit values by hand. Of course models done using graphics editor may be easily converted to this format (by clicking save). I hope this (easy) way people may share their creations.


Possibilities

There are many ways the app may be used, please have a look on the talk given by the author of original app Ed Burton. Shortly after I wrote my version I realized there is someone doing the same stuff as open constructor as well as springy thingies from KrazyDad. However, all those versions have their own flavour and I think mine has the spirit :-)









Enjoy, it's free. Play it here and have fun!

Maciej Matyka, 2018-03-01, Wrocław 
Contact: maciej.matyka@gmail.com
Constructor2018 is the part of http://felp.pl project

ps My collection of links important for the Soda Constructor project and its history:

https://web.archive.org/web/20040212024753/http://www.warptera.com/
https://web.archive.org/web/20031208183323/http://www.sodaplaycentral.com:80/models.php
http://www.lightcycle.org/workspace/spring_set/spring_set_appvar.pde
https://processing.org/discourse/alpha/board_Contribution_Simlation_action_display_num_1083008179.html
http://www.lightcycle.org/workspace/spring_set/
http://www.tom-carden.co.uk/p5/soda_rip/appvar/index.html
https://web.archive.org/web/20031210110220/http://www.sodaplaycentral.com:80/articles/mss.php
https://web.archive.org/web/20031208180149/http://www.sodaplaycentral.com:80/articles/articles.php
https://web.archive.org/web/20160417141419/http://www.warptera.com:80/
https://web.archive.org/web/20050309104454/http://sodaplay.com:80/constructor/beta/daintywalker.xml

Tuesday, February 27, 2018

Circles and Quads


(play here)

Circles and Quads is my implementation of the random-tile algorithm by Paul Bourke. I wrote this in the free time waiting for the plane at SF airport back in 2015.. *yeah.

My version of the algorithm is simple:

1. Randomly choose the position of first object
2. If the oobject does collide with any other objects in the scene - move it's position
3. Repeat 2. If it is repeated more than 300 times (it is a free parameter) decrease the diameter and proceed to 4.
4. Repeat decrease / randomize position / decrease / loop forever.

(I noticed that sometimes I use the modified version of the algorithm in which I first find a proper place for the small object and then multiply its size in order to find its maximum size for which it doesn't collide with any other - it works very similar)

This way we obtain nicely looking pictures of fractal-like style. They are built of non-overlapping objects of any shapes (I used circles and rectangles but we are not limited to those). See my variations below. Sometimes I change the code sligtly to get some of these results, I'll try to put some comments.


You may find an interactive HTML5 app of this i.e. on my website for kids felp.pl here and more directly here. Also browse my homepage for more things like that.


  









Above I just changed the boundary conditions in which the packing is generated.

We've got some phase separation in the above figure.


Just circles.

Not all of those results are available in the application that I prepared for release, I have more, unpublished code on it, just let me know if you like to get it for any reason.

Soda Constructor (Revisited)