Deriving an angle from three points
James Hurley
jhurley0305 at sbcglobal.net
Wed Dec 16 10:52:26 EST 2009
>
> 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,
Here is how easy this is in Turtle Graphics:
on mouseUp
startTurtle --Initiates the turtle graphics library
penup
setxy 40,116
pendown
put direction(98,186) into tStartAngle
setxy 98,186
put direction(132,118) into tEndAngle
setxy 132,118 --Not necessary, but visually satisfying
put tEndAngle - tStartAngle into dA
put dA & cr & 360 - 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
More information about the use-livecode
mailing list