Division and Curves

I’ve added the Division Module, and I’ve created a second drawing method for the connections. A very simple curve, which in some cases looks weird, but not too bad. Taken as a whole, I think it looks interesting and very clearly separates the modules from the connections visually, which is nice. They work in most situations, except when modules are overlapping. The math is a little involved (not hard, per say, but confusing at times) and I was in bed when I wrote it without handy access to pen and paper. So I skipped that situation for now. I’ll add it when I get around to it.

This movie requires Flash Player 9

Posted in AS3

3 Replies to “Division and Curves”

  1. Can curves be a selectable option? There are time when this would be a cool way to show a diagram.

    In moving the division object around I was able to “lose” one
    or the other connection. In one instance I lost the left side input, and in another I lost the top input. Not sure how. Neither could I replicate this with the other modules.

    How are you treating division by zero?

  2. Of course it would be selectable, possibly even on a connection by connection basis. Maybe even determined by the type of connection…Hmmm. Interesting.

    On division by zero, I did a quick test and got “Infinity”. Not sure how that would get used internally. Probably NaN. In any case, I’m only using 32 bit Integers, so I don’t go that high. Also because I’m displaying the text, I keep having to convert from Integer to String and back again, so it’s limited in that way too.

  3. Oh, forgot. The connections can be destroyed by clicking on the wires themselves, just like in NeatTools, and further, my file has some unaccounted for behavior when you, say, drag something over something else and then let go of it, or press a button, drag it over another module and release it. This will have to be addressed at some point. Somehow. Probably.
    Anyway, I’m guessing you were in a situation where both the module and the line were underneath your mouse, maybe even another module too. I couldn’t quite replicate what you described, but I do know its pretty damn easy to kill a connection. All the more reason I need to figure out the creation side soon…

Leave a Reply

Your email address will not be published. Required fields are marked *