Re: Charts (was: New Graphing Tools)

Steve Thomas <sthomas1-gQhbkF4bah9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <CAGa9PAarxcqwDt2C8qCK+Pgu+8L4Br+-u_tbVj8u_A6TW6M3ZQ@mail.gmail.com>
Nice work.  I like the idea of adding a number line. Some thoughts comments
and questions:

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
scale(s).

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.


Stephen
'*Invert*, *always invert*' ('man muss immer umkehren')
                                                        - Carl Gustav Jacob
Jacobi

So instead

   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 <[email protected]>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
> integrated.
>
> 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
> proceed.
>
> 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.
> Thanks!
>
> Richo
>
> P.S. I also renamed the project to Charts as Bert suggested
>
> _______________________________________________
> squeakland mailing list
> [email protected]
> http://lists.squeakland.org/mailman/listinfo/squeakland
>
>

_______________________________________________
squeakland mailing list
[email protected]
http://lists.squeakland.org/mailman/listinfo/squeakland
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.