[NTG-context] question about MP drawing with dir

Pablo Rodriguez oinos at gmx.es
Fri May 25 19:58:04 CEST 2018


On 05/24/2018 10:23 PM, Alan Braslau wrote:
> On Thu, 24 May 2018 21:01:59 +0200
> Pablo Rodriguez <oinos at gmx.es> wrote:
> 
>> dir seems magic to me. I don’t understand how it works, not even how
>> it can be used for drawing not having an origin.
> 
> All MP drawings have an origin (0,0).

I thought origin had to be explicitly set.

> (dir angle) returns a pair on a unit circle surrounding the origin, i.e.
> (cosd angle,sind angle) where cosd is the cosine function operating on
> an angle in degrees.

Well, I need to refresh my math from high school (centuries ago :-)) to
remember what cosine and sine are.

Many thanks for your explanation,

Pablo
-- 
http://www.ousia.tk


More information about the ntg-context mailing list