[etoys-dev] [squeakland] Charts (was: New Graphing Tools)
sthomas1 at gosargon.com
Sun Oct 16 21:38:32 EDT 2011
Nice work. I like the idea of adding a number line. Some thoughts comments
If I understand your implementation, you have a horizontal and vertical
scale. Then you for each scale you select the "current object" you wish to
operate on, to sets its vertical/horizontal position to the "current object
position in chart" for each scale.
I think it would be better if you could somehow set the playfield's "scale"
based upon the number line(s). When you add a scale to a the playfield,
the objects in that playfield have their X and Y values set to the scales
you added. Then if you "move forward by | N" it moves forward not by N
pixels but by the scale settings.
Another possible approach is to have a collection for each "scale". Then all
objects in that collection will have their X, Y values set to and use those
It would also be nice to have "set of scales" as one object (an X and Y
scale) and one collection to make it simpler to add to both in one step.
'*Invert*, *always invert*' ('man muss immer umkehren')
- Carl Gustav Jacob
1. I would rather be able to set the "scale(s)" for the whole playfield
or perhaps set an object to use the number lines scales as opposed to the
world's/(playfield it is embedded in) scale.
On Sun, Oct 16, 2011 at 8:16 PM, Ricardo Moran <richi.moran at gmail.com>wrote:
> Hi guys, I'm trying again with the graphing tools. It's been a while since
> I worked on this (sorry about that) but I really want to see them
> So now I'm following Bert's suggestions and I'm trying with a less general
> approach: I'm not introducing a new scale on top of the existing one,
> instead I just added a "current object" slot on the number lines, and a
> "current object position in chart" slot that transforms from squeak's pixel
> to the number line scale and viceversa.
> The implementation is much simpler than before but it's more uncomfortable
> IMHO. I think it would be best to have two "transform" functions accepting a
> number as argument and returning it transformed from one scale to the other.
> Unfortunately, it seems Etoys doesn't support this kind of functions nicely,
> all the examples I could find (such as #color:sees:) seem to be a little
> hacked and I wasn't sure if following that path was the right way to
> I think the best would be for you to test it and tell me what you think.
> I'm attaching a project with the new number lines.
> P.S. I also renamed the project to Charts as Bert suggested
> squeakland mailing list
> squeakland at squeakland.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the etoys-dev