nature-of-code / The-Nature-of-Code-archive

The very first build system for The Nature of Code
http://natureofcode.com
913 stars 151 forks source link

Fluid resistance section: methods on Liquid or Mover? #357

Closed pamelafox closed 10 years ago

pamelafox commented 10 years ago

The Fluid resistance section starts off by saying we'll add 2 method to Liquid, and the P5 examples port has those methods on Liquid, but then the code all has them on Mover. Which do you prefer?

shiffman commented 10 years ago

Ah, good point. I'm not sure when this got switched. I clearly wrote the text with the method in Mover and at some point moved things around in the actual code examples. I don't actually have a preference as I could make the case for either. I think I like the idea of the method being in the liquid class as the liquid acts on the mover, i.e.

liquid.drags(movers);

Open to suggestion.

pamelafox commented 10 years ago

Okay, that's what I did in the text, as I preferred that as well. https://khan-cs-staging.appspot.com/cs/natural-simulations/programming-forces/a/air-and-fluid-resistance

shiffman commented 10 years ago

Great, I'm leaving this open so I remember to revisit at some point.

shiffman commented 10 years ago

Fixed in new book repo!