[squeakland] Kedama Questions

Yoshiki Ohshima yoshiki at vpri.org
Sat Nov 6 02:44:17 EDT 2010


At Sat, 6 Nov 2010 00:40:06 -0400,
Steve Thomas wrote:
> 
> Yoshiki,
> 
> I was helping my son with Chemistry and the question on his test was "Which has more molecules, a liter of frozen
> vegetable oil or a liter of liquid vegetable oil.  So I reminded him the experiment we did with the balloon and how it
> contracted when we put it in ice water and expanded when we warmed it up.
> 
> Then I thought your Particles Dye in Water project and tried resizing the Kedama World (which didn't work) I was able to
> change the worlds scale. I eventually created two separate Kedama worlds in another project each with 500 turtles and
> scaled them to convey the idea.

  Ah, I'd love to see it.

> I wanted to make a copy of the Kedama World (two avoid creating the same scripts twice), to show the "Dye in Water"
> model with different tick rates at the same time to facilitate comparison (which is easier when you can see both at the
> same time). This idea came from my youngest son who suggested we try the Dye in Water with Ice Water and Hot Water.

  Right now, no.  Many internal structure needed to be taken care of
and I couldn't go far enough to allow copying, and migrating particles
from one world to another, etc.

> So, couple of things:
> 
>  1. Can you change the size of a Kedama world (w/o changing the size of the turtles?)

 For now, do the following:

 - Create a text object and type in:

   KedamaMorph new openInWorld

 - Just select the "KedamaMorph" part, and press Ctrl-b or Alt-b or
    Cmd-b you'll see a green window.
 - Press a little button labeled "class" around the center.
 - from the top-right pane, choose the element labeled
    "defaultDimensions" (may be clipped by the scroll bar).
 - You should see a point expression that looks like:

    ^ 100 @ 100
 
   Replace it with your favorite numbers like "300 at 300", and press
   Ctrl-s or Alt-s or Cmd-s.  The red border around the bottom pane go
   away and you can close the browser window.

 - Now, go back to the text object, and select all text ("KedamaMorph
   new openInWorld") and press Ctrl-d, Alt-d, or Cmd-d.

>  2. Just curious why does each edge have its own mode (bouncing, wrap, stick) as opposed to one for all?

  For example, the gas tank example utilize it.  the top edge is set
to wrap but others are set to bounce.

>  3. How can I model the color changes for a Particles in Dye project. I was thinking of something along the lines of
>     having the colors "mix" when the dye and water were in the same spot (or in the other's patch) but wasn't sure how
>     to do that. I assume it has to do with setting the red/green/blue component from/into patch, but couldn't quite
>     figure it out.

  ...  I have an answer but running out time.  Next time I can do it,
I'll try to write an example.  But unfortunately, the code not going to
be pretty.  (The effect it makes will be pretty, however^^;)

>  4. How can I add an extra turtle to a world? (ex: dye and water)?

  From the menu in the viewr for the KedamaWorld.  The button between
  orange 'v' and blue '+', and choose 'add a new breed of turtle'.

> Lastly I really love your question: "Is there really such a thing as a molecule? How can we avoid asking you just to
> believe it?" I have been posing this question to a bunch of folks including some professors at Princeton. Two of the
> three said something like "that's a really good question, I don't know I've just always believed it" One just got this
> big smile and said, "its a model and we use experiments to see how
> well the model works."

  Well, the last one is close to my thinking.  We are not going to
know the "final truth", but science is a methodology to try to
approach it.

-- Yoshiki


More information about the squeakland mailing list