Opened 12 years ago

Last modified 12 years ago

#28 new enhancement

Tweak semantics to emphasize algebraic interpretation

Reported by: Chris Smith Owned by:
Priority: normal Milestone:
Component: Unknown Version:
Keywords: Cc:

Description

I'd like to see the following changes, which would break backward compatibility, but I think would better emphasize the algebraic interpretation of expressions written in gloss:

  1. color red (color green foo) should draw foo in red, not green. This has an obvious semantics, while the current behavior has to be described as "color sets a default color that will be used if no other is specified"... or worse yet, as a procedural interpretation - "it means change colors".
  2. pictures [ foo, bar ] should arguably draw foo on top of bar. I've found that students initially expect foo to be on top, and tend to fall back on the procedural explanation - it draws foo first, and then bar - to explain the current order.
  3. rotate should be counter-clockwise. Okay, this one is out of place because it's not about algebraic interpretations, but in math, rotations are normally counter-clockwise... except in the OpenGL implementation of gloss for some reason. gloss-web has actually always been counter-clockwise, and I only recently noticed the difference.

Change History (2)

comment:1 Changed 12 years ago by Ben Lippmeier

I agree with 1, foo should be red.

I don't agree with 2. To explain how pictures are layered, there needs to be some notion of sequencing, and things to the right of the list are last.

We could change 3 in Gloss 1.8, but it could take a fair bit of work to update all the examples. Rotation is clockwise by default because OpenGL is really a 3D library with a left-handed coordinate system. The Z-axis is /into/ the screen, which makes rotation around it clockwise.

comment:2 Changed 12 years ago by Ben Lippmeier

Version: 1.5.0
Note: See TracTickets for help on using tickets.