Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005605 [Squeak] Graphics feature always 12-05-06 06:44 03-07-07 06:52
Reporter wiz View Status public  
Assigned To andreas
Priority normal Resolution open  
Status assigned   Product Version 3.9
Summary 0005605: Squeak oxymorons: MatrixTransform2x3 identity does not behave as an identiy transformation.
Description
For this one in a fresh Sq 7067
evaluate in a workspace:

results :=
{ IdentityTransform identity
. MatrixTransform2x3 identity
 . MorphicTransform identity } collect: [ :each |
    ( -2.0 to: 2.0 by: 0.25 ) collect: [ :eachOne |
          (each globalPointToLocal: (each localPointToGlobal: eachOne asPoint )) ]] .

results explore .

And compare the results.
Additional Information My results were:

root: {see expanded lists}
    1: {IdentityTransform}
        1: -2.0@-2.0
        2: -1.75@-1.75
        3: -1.5@-1.5
        4: -1.25@-1.25
        5: -1.0@-1.0
        6: -0.75@-0.75
        7: -0.5@-0.5
        8: -0.25@-0.25
        9: 0.0@0.0
        10: 0.25@0.25
        11: 0.5@0.5
        12: 0.75@0.75
        13: 1.0@1.0
        14: 1.25@1.25
        15: 1.5@1.5
        16: 1.75@1.75
        17: 2.0@2.0
    2: {MatrixTransform2x3}
        1: 0@0
        2: 0@0
        3: 0@0
        4: 0@0
        5: 0@0
        6: 0@0
        7: 0@0
        8: 0@0
        9: 0@0
        10: 0@0
        11: 1@1
        12: 1@1
        13: 1@1
        14: 1@1
        15: 2@2
        16: 2@2
        17: 2@2
    3: {MorphicTransform}
        1: -2.0@-2.0
        2: -1.75@-1.75
        3: -1.5@-1.5
        4: -1.25@-1.25
        5: -1.0@-1.0
        6: -0.75@-0.75
        7: -0.5@-0.5
        8: -0.25@-0.25
        9: 0.0@0.0
        10: 0.25@0.25
        11: 0.5@0.5
        12: 0.75@0.75
        13: 1.0@1.0
        14: 1.25@1.25
        15: 1.5@1.5
        16: 1.75@1.75
        17: 2.0@2.0

Now to be fair to MatrixTransform2x3 has two methods for transforming points

#transformPoint:
#invertPoint
which do the transformation w/o "rounding" . Using them in place of
#globalPointToLocal: and #localPointToGlobal in a separate test gives the expected results.

These messages have few senders. And they are not part of the DisplayTransform protocol.
It would make more sense to me it the senses were reversed. With the protocol messages behaving like IdentityMorph and the two messages unique to MatrixTransform2x3 behaving in the unusual way. (i.e. rounding)

I was also surprised to find that in addition to rounding, negative numbers are transformed to 0? What is that in aid of?

MatrixTransform2x3 seem to me to be an oddball. And there seem to be no flags out there to say why and to document how to properly use its behavior.



Attached Files

- Relationships

SYSTEM WARNING: Creating default object from empty value

related to 0006303new  Matrix2x3Plugin does not consider negative numbers when rounding. 
child of 0006511new  Mother of all Morphic Graphical off-by-one/fencepost -error reports. 
child of 0005560new  MatrixTransformationMorph needs examining and fixing. 

- Notes
(0008775 - 276 - 324 - 324 - 324 - 324 - 324)
wiz
12-30-06 02:23
edited on: 12-30-06 02:24

On more reflection:

The problem seems to be related to doing rounding using
n + 1 truncate. Which works when n is positve but will be off by one or even two when
n = aNegativeInteger + positiveEpsilon . And that seems to be the case here.

So this is really a bug.

 

- Issue History
Date Modified Username Field Change
12-05-06 06:44 wiz New Issue
12-05-06 06:44 wiz Status new => assigned
12-05-06 06:44 wiz Assigned To  => andreas
12-30-06 02:23 wiz Note Added: 0008775
12-30-06 02:24 wiz Note Edited: 0008775
03-07-07 06:52 wiz Relationship added related to 0006303
05-25-07 02:47 wiz Relationship added related to 0006511
05-25-07 02:59 wiz Relationship replaced child of 0006511
07-05-07 00:45 wiz Relationship added child of 0005560


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
55 total queries executed.
38 unique queries executed.
Powered by Mantis Bugtracker