[squeak-dev] The Trunk: Graphics-mt.404.mcz

Eliot Miranda eliot.miranda at gmail.com
Wed Dec 5 22:59:56 UTC 2018


Hi Nicolas,

On Wed, Dec 5, 2018 at 1:31 PM Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
> Le mer. 5 déc. 2018 à 16:59, Tm Jhnsn <digit at sonic.net> a écrit :
>
>>
>> On Dec 4, 2018, at 12:12 AM, marcel.taeumel wrote:
>>
>> > Yet, such an infix notation for rectangle creation would not be
>> > much of an
>> > improvement over Rectangle class >> center:extent:.
>> >
>> > Very interesting. :-) Thoughts?
>>
>> Balloons inflate, and Smalltalk is quite associated with balloons... :)
>>
>> Tim J
>>
>
> But in this case, should deflate return the center ? (100 at 100 inflate:
> 50 at 30) deflate.
> I like spread because there is a kind of isotropic notion, we extend in
> all directions...
>
> The lexical field of symmetry may fit: we construct a rectangle by taking
> those two vertices:
> - image of aPoint by symmetry around myself,
> - and aPoint.
> So it's somehow a mirroring action:
>
>     centerPoint mirror: cornerPoint.
>     centerPoint reflect: cornerPoint.
>
> We could also think of pivoting or unfolding in the 3rd dimension...
> But I find the intention very hard to grasp... It's not obvious that the
> message should answer a Rectangle rather than a Point.
> And the meaning of argument slipped from extent to corner which is a
> different action...
>
> I note that inflate, spread, etc... are verbs, while corner: and extent:
> are nouns...
>

Ah, that's a good point.


> We understand corner: and extent: because we may think of them as
> attributes of a Rectangle... (or just because we're used to them?)
>

So using center: or centre: would work, except that it's extentPoint
center: centrePoint, which is at odds with originPoint extent: extentPoint
& originPoint corner: cornerPoint.  But I find center:/centre: far less
misleading than inflate:, which is also a verb, but one with no obvious
interpretation to me.

These two are also more understandable to me:

centrePoint atCenterExtent: extentPoint
centrePoint atCenterCorner: cornerPoint (and this would depend on whether
centrePoint <=: cornerPoint or centrePoint >=: cornerPoint, and an error
otherwise)


> In this case, diagonal: may fit too, but the difference with extent: is
> thin, and I don't find the notion of isotropic spread in it.
> In fact, diagonal: might be to vertex:vertex: what corner: is to
> origin:corner: because we can define a rectangle by any of its diagonals...
>
> Geometrically, we may also see self and extentPoint as defining the
> diagonal by a center and a diameter of circumscribing circle...
> So its a kind of circumExtent: that we pass to the center... Not very
> clear that it will answer a Rectangle...
>

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181205/79efc060/attachment.html>


More information about the Squeak-dev mailing list