W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Linear gradients, Transforms and angles...

From: Alan Gresley <alan@css-class.com>
Date: Mon, 27 Sep 2010 16:07:25 +1000
Message-ID: <4CA0349D.6020203@css-class.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: Chris Marrin <cmarrin@apple.com>, David Singer <singer@apple.com>, Simon Fraser <smfr@me.com>, DanielGlazman <daniel.glazman@disruptive-innovations.com>, "L. DavidBaron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Brad Kemper wrote:
> On Sep 26, 2010, at 1:05 PM, Chris Marrin <cmarrin@apple.com> wrote:
>> On Sep 23, 2010, at 5:48 PM, Brad Kemper wrote:
>>> So just because linear directions and rotations both are measured in degrees does not mean that you can't intuitively have positive numbers mean clockwise for _rotations_, but still follow the standard geometry convention for specifying _linear_ direction.
>> I have a lot of experience in dealing with geometric concepts and the idea that rotating a box and supplying a direction vector for gradients are two fundamentally different things just doesn't make sense to me. For me the visual model for rotating a box is to start with a piece of axis aligned paper on a desk, grab it and spin it until it is at the correct angle.

Hello Chris,

I have a piece of paper with a gradient from b to a.


     |             / |
     |       1   /   |
     |         /     |
x  -2  -1   0   1   2
     |     /         |
     |   /  -1       |
     | /             |

Now if a rotate the piece of paper so the 'b' is positioned at the 
bottom left of the x-y axis (currently where the 'a' is positioned), 
then I am still have the same gradient (or linear direction) in 
respect to the x-y-axis. The act of rotation occurred on the z-axis 
and it was 180 degrees. If I only rotated the piece of paper by 53 
degrees on the z-axis, the gradient (or linear direction) is the same 
in respect to the x-y axis.

> Except that angles are not rotations, they are measurements of amount of arc. Rotations USE angles to measure how much to rotate. Angles are ALSO used differently, as reference points to measure the direction of rays.

Hello Brad,

A gradient is not an angle. Only rotation can have an angle [1].

   | In geometry, an angle is the figure formed by two rays
   | sharing a common endpoint, called the vertex of the angle.
   | The magnitude of the angle is the "amount of rotation"
   | that separates the two rays, and can be measured by
   | considering the length of circular arc swept out when one
   | ray is rotated about the vertex to coincide with the other.

If display devises could project in 4D, there would be trouble. :-)

Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Monday, 27 September 2010 07:54:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:48 UTC