Re: radial-gradient() proposal

On Thu, Nov 5, 2009 at 12:17 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> [cc'ing my reply to whole list, assuming you meant to do the same...]
>
> I think that clockwise rotation makes total sense when actually rotating
> something, instead of indicating a linear direction. But for linear
> directions, I think that there is not really anything that is turning.
>
> Thus using .25turn instead of 90deg for a linear-gradient direction feels a
> little unnatural to me (even though it means the same to CSS), because
> nothing is turning aside from a point of reference. For just indication a
> straight direction, the protractor directions seem most intuitive. Like this
> (showing degrees and radians, and with 0 going to the right, and 90 going
> straight up):
>
> http://en.wikipedia.org/wiki/File:Degree-Radian_Conversion.svg
>
> Here is a Java applet from a math site, which shows directional arrows, and
> the resulting angles:
>
> http://www.mathopenref.com/degrees.html
>
>
> On Nov 4, 2009, at 7:51 PM, Simon Fraser wrote:
>
>> Unfortunately this gives angles which are backwards from transforms (where
>> positive angles result in clockwise rotation).
>>
>> Simon
>>
>> On Nov 4, 2009, at 6:34 pm, Brad Kemper wrote:
>>
>>> It would if it were degrees of clockwise rotation, instead of just
>>> indicating a linear direction. There is nothing turning here, just an angle
>>> to indicate a straight direction. In geometry convention, 90 degrees as a
>>> linear direction is straight up.
>>>
>>> On Nov 4, 2009, at 6:14 PM, Brendan Kenny <bckenny@gmail.com> wrote:
>>>
>>>> Wouldn't 90 degrees point straight down, since +y points down?
>>>>
>>>> On Wed, Nov 4, 2009 at 8:05 PM, Brad Kemper <brad.kemper@gmail.com>
>>>> wrote:
>>>>>
>>>>> On Nov 4, 2009, at 5:41 PM, Simon Fraser <smfr@me.com> wrote:
>>>>>
>>>>>> 0deg being up (I think; the current proposal doesn't say),
>>>>>
>>>>> 0deg is left-to-right. Like on a protractor, where 0 points to the
>>>>> right,
>>>>> 180 points to the left, and 90 points straight up.
>>>>>

My intuition says the same, but I also think that the only angle unit
should be radians, so I can't trust myself here =]

I think there are two arguments to be made here. The weaker one is
from the mathematical side: there is an implicit transform in the
entire view, so any directional vector is also transformed. Simon's
point about consistency is much better. I've run across several blog
entries that already assume that the existing transform
implementations (giving clockwise rotations for positive angles) are
buggy or are simplifying things for those who might not remember their
last geometry course. As an example, if an element with a directional
gradient is near element rotated at the same angle, the intuitive
result to the author would be for them to be oriented similarly. The
opposite would probably seem broken.

(to say nothing of gradients on rotated elements. i assume the points
and the angle specified are also transformed; if so, the assumed
behavior would probably be that angles of the same sign would result
in a cumulative rotation)

Received on Thursday, 5 November 2009 16:09:57 UTC