Deriving an angle from three points

James Hurley jhurley0305 at sbcglobal.net
Thu Dec 17 14:18:51 EST 2009


>
> Message: 12
> Date: Wed, 16 Dec 2009 21:47:10 -0800
> From: Mark Swindell <mdswindell at cruzio.com>
> Subject: Re: Deriving an angle from three points
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <3CEB9DD4-D059-43B4-8A77-2F4E86C4820D at cruzio.com>
> Content-Type: text/plain; charset=us-ascii
>
> James,
>
> Thanks for this, but starting the Turtle stack did not allow me to  
> calculate the angle.  I got an error each time at "Start Turtle."   
> Is there a trick to making the library accessible to other stacks?
>
> Mark

Mark,

I think the problem might be that you may have used "Start Turtle"  
instead of "StartTurtle"

There should be no spaces. Try just copying and pasting the script  
into a button on the Turtle Graphics stack. If you use it outside of  
the Turtle Graphics stack, you will need to do a "Start Using  stack..."

Hope this helps.

Jim Hurley
>
> On Dec 16, 2009, at 8:08 AM, James Hurley wrote:
>
>>>
>>> Message: 24
>>> Date: Tue, 15 Dec 2009 22:21:47 -0800
>>> From: Mark Swindell <mdswindell at cruzio.com>
>>> Subject: Deriving an angle from three points
>>> To: How to use Revolution <use-revolution at lists.runrev.com>
>>> Message-ID: <B3725793-6274-4F53-91D2-3154D31F9CDF at cruzio.com>
>>> Content-Type: text/plain;	charset=us-ascii
>>>
>>> 40,116
>>> 98,186
>>> 132,118
>>>
>>> How would one determine the angle created from three points, such  
>>> as those above?
>>>
>>> Thanks,
>>> Mark
>>>
>>
>> Mark,
>>
>> Or even easier. Set the Turtle at the apex and get the angle of the  
>> other two points.
>>
>>
>> on mouseUp
>>  startTurtle --Initiates the turtle graphics library
>>  penup
>>  setxy 98,186 --The vertex
>>  put direction(40,116) into A
>>  put direction(132,118) into B
>>  put B-A into dA
>>  put abs(dA) & cr & abs(180 - dA)  into msg box
>>  choose the browse tool
>> end mouseUP
>>
>> (Assuming your middle point is the apex of the angle you want.)
>>
>> To run this you will need the TG library. Run this in the msg box
>>
>> go url "http://www.jamesphurley.com/jhurleyFolder/TurtleGraphics.rev"
>>
>> Jim Hurley
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>








More information about the use-livecode mailing list