[etoys-dev] graphing and watching enhancements

Steve Thomas sthomas1 at gosargon.com
Sun Mar 4 17:08:02 EST 2012


Okay, Karl is faster than me at finding this (or at least reporting it,
assuming this is referring to the same problem I saw) and way faster at
fixing by an order of magnitude of 0/(34 minutes).

So IF I understand Offset correctly it is the offset of the grid from the
origin, yes?
The interface is very "Bret Victorish" (without the visible sliders).  But
it would be nice to be able to enter the #'s as getting to 0 at 0, can be a
pain.

Also why is Offset off, when course grid is on?

Also,  let me know how to get this fix so I can test.
A .cs or update code from server when ready is best.

Thanks for all your efforts,
Stephen



On Sun, Mar 4, 2012 at 6:54 PM, karl ramberg <karlramberg at gmail.com> wrote:

> I fixed a issue with the coarse grid not behaving with offset. I had to
> find the proper starting point in the count variable and things worked
> fine.
>
> Karl
>
>
> twoTierGridFormOrigin: origin grid: smallGrid  background: backColor line:
> lineColor darkerGridEvery: darkerGridEvery darkerGridColor: darkerGridColor
>  "Answer an infinite form that repeats a pattern involving grid lines
> with darker ones at regular intervals, such as 'engineering paper'."
>
> | smallGridAsPoint gridForm gridOrigin fullGrid aColor darkGridOrigin
> countX countY |
> smallGridAsPoint := smallGrid rounded asPoint.
>  fullGrid := smallGridAsPoint * darkerGridEvery.
> gridForm := Form extent: fullGrid depth: Display depth.
>  gridOrigin := origin \\ smallGridAsPoint.
> darkGridOrigin := origin \\ fullGrid.
>  backColor ifNotNil: [gridForm fillWithColor: backColor].
> darkGridOrigin ifNotNil:[countX:=  darkGridOrigin x. countY:=
>  darkGridOrigin y]
>  ifNil:[countX:= countY := -1].
>
> gridOrigin x to: gridForm width by: smallGridAsPoint x do:
>  [:x |
> aColor := (countX \\ darkerGridEvery) = 0 ifTrue: [darkerGridColor]
> ifFalse: [lineColor].
>  gridForm fill: (x at 0 extent: 1 at gridForm height) fillColor: aColor.
> countX:= countX+ 1.].
>  gridOrigin y to: gridForm height by: smallGridAsPoint y do:
> [:y |
> aColor := (countY\\ darkerGridEvery) = 0 ifTrue: [darkerGridColor]
> ifFalse: [lineColor].
>  gridForm fill: (0 at y extent: gridForm width at 1) fillColor: aColor.
> countY:= countY+ 1.].
>  ^ InfiniteForm with: gridForm
>
> "
> | aPlayfield |
>  aPlayfield := PasteUpMorph authoringPrototype extent: 640 @ 480.
> aPlayfield color: (GraphPaperParameters twoTierGridFormOrigin: (0 at 0)
> grid: 16 background: Color green muchLighter line: Color blue muchLighter
> darkerGridEvery: 10 darkerGridColor: Color blue muchDarker).
>  aPlayfield openInHand
> "
>
>
> On Sun, Mar 4, 2012 at 10:20 PM, Scott Wallace <
> scott.wallace at squeakland.org> wrote:
>
>> On Mar 3, 2012, at 5:54 AM, karl ramberg wrote:
>>
>> > ...Yes, all the stuff will be included. I fixed a couple of issues with
>> graph paper and will add the rest over the weekend.
>>
>> Thank you, Karl!
>>
>> Attached now is a fileout that responds to all the issues and
>> recommendations relating to the graphing tools that have appeared in the
>> past few days, and cleans up a few loose ends.  Its preamble:
>>
>> Change Set:             graphingFixes-sw
>> Date:                   4 March 2012
>> Author:                 Scott Wallace
>>
>> Addresses various bug-reports and recommendations relating to recent
>> number-line and graph-paper updates:
>> - Enforce reasonable ranges for the sliders governing the grid
>> parameters, taking the grid-size, coarse-grid-size , and playfield
>> dimensions into account.
>> - Provide a button to request 'graph paper' from the 'generic property
>> sheet' when appropriate.
>> - Retain position of number line when its pixelsPerUnit changes.
>> - Disable the 'offset' when coarse-grid in effect.
>> - Protect sliders against zero-divide that can happen if minVal = maxVal.
>> - Protect InfiniteForms against incidental calls to #darker and
>> #twiceDarker that can be sent to any object's fillStyle by some of the
>> custom border code.
>> - Removes about a dozen superfluous methods that had mistakenly lingered
>> in the earlier updates, and removes three inst vars of NumberLineMorph that
>> were remnants from earlier code….
>>
>> -----------
>>
>> Sorry this was just a little too late to make it into update 2398, but
>> hopefully these cleanups can get pushed out soon; it wouldn't be good for
>> users to start using the graphing tools before these fixes are in.
>>
>> Thanks again!
>>
>>  -- Scott
>>
>>
>
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120304/913ae88d/attachment-0001.html>


More information about the etoys-dev mailing list