Yertle the Turtle

Mike Bonner bonnmike at gmail.com
Tue Jan 31 01:20:02 EST 2017


K heres the required parts..

*## takes length and the angle in radians and returns vector as x,y offsets*
function aLenToVector pLen pAngle
    return pLen * sin(pAngle),pLen * cos(pAngle)
end aLenToVector

*## takes degrees and changes to radians*
function dToRadians pDegrees
     return pDegrees / 180 * pi
end dToRadians

With those 2 things, you should be able to move your turtle.


On Mon, Jan 30, 2017 at 11:16 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Yeah. Thats what my (as yet unrediscovered) library can help with.
>
> On Mon, Jan 30, 2017 at 11:14 PM, Richmond Mathewson via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> The problem is not with drawing the line.
>>
>> The problem is how, when the turtle's "nose" is pointing at, say, 37
>> degrees from the vertical
>> one can get it to move FORWARD for 30 units.
>>
>> Richmond.
>>
>>
>> On 1/30/17 11:46 pm, Tore Nilsen via use-livecode wrote:
>>
>>> 30. jan. 2017 kl. 21.20 skrev Richmond Mathewson via use-livecode <
>>>> use-livecode at lists.runrev.com>:
>>>>
>>>> 2.2. I wonder how my turtle will be seen to draw a pen line from the
>>>> two ends of the "line".
>>>>
>>> If you would like the “turtle” to move to the points of the line then,
>>> lock screen, draw the line, hide the line and unlock the screen before you
>>> start moving the “turtle”. Then no-one will ever see the line and you can
>>> delete last graphic once the turtle has stopped moving.
>>>
>>> Regards
>>> Tore Nilsen
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>



More information about the use-livecode mailing list