Re: Bearing path command

On 13 February 2014 8:22:48 PM AEDT, Paul LeBeau <paul.lebeau@gmail.com> wrote:
>Hi Cameron
>
>> In the section of each command it describes what effect the current
>bearing has.
>
>Ah. Thanks. Didn't see that.
>
>
>In the definition of 'h' you say:
>
>> When a relative *h* command is used, the end point of the line is
>(cpx + x
> cos cb, cpy + x sin cb).
>
>Given that the cpx,cpy moves, I assume that means that you can use "b
>90 h
>10 10 10 z" to draw a square?

The bearing needs to be set again after each segment though so it would be "M 100,100 h 10 b 90 h 10 b 90 h 10 z".

>>Although multiple parameters may be specified, this usually will not
>be
>useful, as they could be combined into a single angle value.
>
>I'm not sure about the clarity of this statement.  For example, does
>the
>following draw a pentagon or not?
>
>  "b 36 36 h 47 47 47 47 z"

It's equivalent to "b 72 h 47 47 47 47 z" but as I say above you need a b between each h. The bearing is only changed by a B or b command. If you're writing a path with a curve to you could add a "b 0" after it to set the bearing to be at a tangent to the end of the curveto, for example.

>And is the following equivalent to your pentagon example or not?
>
>  "M 150,10 b -36 72 h 47 47 47 47 z"

No.

Received on Thursday, 13 February 2014 09:56:27 UTC