copying scripts [was: Deriving an angle from three points]

2009-12-17 Thread Jacques Hausser
Le 17 déc. 2009 à 01:33, Kay C Lan a écrit : On Wed, Dec 16, 2009 at 6:56 PM, Jacques Hausser jacques.haus...@unil.chwrote: I really should re-read my mails before sending them :-( I cannot copy and paste scripts directly into mails (I don't know why) so I rewrite them... with bugs !

Can't Paste? (Was copying scripts/Deriving an angle from three points)

2009-12-17 Thread dunbarx
You can't paste? Is it that the pasted text comes over with all its styles? (the script editor is filled with color) If so, the size of the mail increases dramatically, and it is stopped by Rev's own defences. I always change copied scripts to plain old text before pasting: function plainText

Re: Deriving an angle from three points

2009-12-17 Thread James Hurley
Message: 12 Date: Wed, 16 Dec 2009 21:47:10 -0800 From: Mark Swindell mdswind...@cruzio.com Subject: Re: Deriving an angle from three points To: How to use Revolution use-revolution@lists.runrev.com Message-ID: 3ceb9dd4-d059-43b4-8a77-2f4e86c48...@cruzio.com Content-Type: text/plain; charset=us

Re: Deriving an angle from three points

2009-12-17 Thread Mark Swindell
Thanks. I neglected to include the start using command. Mark On Dec 17, 2009, at 11:18 AM, James Hurley wrote: Message: 12 Date: Wed, 16 Dec 2009 21:47:10 -0800 From: Mark Swindell mdswind...@cruzio.com Subject: Re: Deriving an angle from three points To: How to use Revolution use

Re: Deriving an angle from three points

2009-12-16 Thread Jacques Hausser
On 12/15/09 10:21 PM, Mark Swindell wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? Hi Mark, I'm using the following handlers. SurfaceTriangle is used to determine if you compute the outer (180) or inner angle with summit

Re: Deriving an angle from three points

2009-12-16 Thread Jacques Hausser
As usual, I forgot something... Distance is merely this brave old Pythagora: function Distance a,b -- -- a,b : points -- returns distance (real) between a and b -- return

Re: Deriving an angle from three points

2009-12-16 Thread Mark Wieder
Mark- Tuesday, December 15, 2009, 10:21:47 PM, you wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? If I can assume that (98,186) is the center of the angle, then you can calculate the angle (actually all three angles) from

Re: Deriving an angle from three points

2009-12-16 Thread gmccarthy
answer. -- View this message in context: http://n4.nabble.com/Deriving-an-angle-from-three-points-tp964930p965051.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com

Re: Deriving an angle from three points

2009-12-16 Thread gmccarthy
into lengthX -- x squared put item 2 of pPointB - item 2 of pPointA into lengthY put lengthY * lengthY into lengthY -- y squared return sqrt(lengthX + lengthY) -- length of hypotenuse end SideLength -- View this message in context: http://n4.nabble.com/Deriving-an-angle-from-three-points

Re: Deriving an angle from three points

2009-12-16 Thread Jacques Hausser
I really should re-read my mails before sending them :-( I cannot copy and paste scripts directly into mails (I don't know why) so I rewrite them... with bugs ! in function calcangle the line if SurfaceTriangle (a,c,b) then should be if SurfaceTriangle(a,c,b) 0 then ... but you corrected it

Re: Deriving an angle from three points

2009-12-16 Thread Pierre Sahores
Hi Friends, Did'nt follow all the present thread so don't know if this can help but in case, here is the general way i would use to process such tasks : on mouseUp set the style of the templateGraphic to polygon set the opaque of the templateGraphic to true set the filled of the

Re: Deriving an angle from three points

2009-12-16 Thread Mark Swindell
On Dec 15, 2009, at 10:35 PM, Mark Wieder wrote: Mark- Tuesday, December 15, 2009, 10:21:47 PM, you wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? There are three angles. Which one are you interested in? — The

Re: Deriving an angle from three points

2009-12-16 Thread James Hurley
Message: 24 Date: Tue, 15 Dec 2009 22:21:47 -0800 From: Mark Swindell mdswind...@cruzio.com Subject: Deriving an angle from three points To: How to use Revolution use-revolution@lists.runrev.com Message-ID: b3725793-6274-4f53-91d2-3154d31f9...@cruzio.com Content-Type: text/plain; charset

Re: Deriving an angle from three points

2009-12-16 Thread Colin Holgate
On Dec 16, 2009, at 1:21 AM, Mark Swindell wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? All of the suggested scripts seem quite long. Try putting this script into three buttons. The script uses the Other Mark's way of

Re: Deriving an angle from three points

2009-12-16 Thread Colin Holgate
On Dec 16, 2009, at 11:01 AM, Colin Holgate wrote: All of the suggested scripts seem quite long. Correction, gmc's solution was also using atan2, and was fairly short. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit

Re: Deriving an angle from three points

2009-12-16 Thread James Hurley
Message: 24 Date: Tue, 15 Dec 2009 22:21:47 -0800 From: Mark Swindell mdswind...@cruzio.com Subject: Deriving an angle from three points To: How to use Revolution use-revolution@lists.runrev.com Message-ID: b3725793-6274-4f53-91d2-3154d31f9...@cruzio.com Content-Type: text/plain; charset

Re: Deriving an angle from three points

2009-12-16 Thread Mark Wieder
Mark- Wednesday, December 16, 2009, 6:08:16 AM, you wrote: The above represents roughly a V shape with the center point the vertex. It doesn't. Three points in a plane represents a triangle. -- -Mark Wieder mwie...@ahsoftware.net ___

Re: Deriving an angle from three points

2009-12-16 Thread Mark Wieder
gmccarthy- Wednesday, December 16, 2009, 2:07:46 AM, you wrote: By the way again, Mark's method is also correct if you fix the variable names as shown below. Normally a triangle with points ABC have their sides named with side b between A and C so it is opposite angle B...etc. Quite

Re: Deriving an angle from three points

2009-12-16 Thread Colin Holgate
Well, of course it's a triangle, but describing it as a V helped explain which angle was wanted. On Dec 16, 2009, at 1:25 PM, Mark Wieder mwie...@ahsoftware.net wrote: It doesn't. Three points in a plane represents a triangle ___ use-revolution

Re: Deriving an angle from three points

2009-12-16 Thread Bruce Robertson
No it didn't. On Dec 16, 2009, at 10:44 AM, Colin Holgate wrote: Well, of course it's a triangle, but describing it as a V helped explain which angle was wanted. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url

Re: Deriving an angle from three points

2009-12-16 Thread Phil Davis
On 12/16/09 10:57 AM, Bruce Robertson wrote: No it didn't. On Dec 16, 2009, at 10:44 AM, Colin Holgate wrote: Well, of course it's a triangle, but describing it as a V helped explain which angle was wanted. I thought Mark S identified it well when he called it the 'internal

Re: Deriving an angle from three points

2009-12-16 Thread Kay C Lan
On Wed, Dec 16, 2009 at 6:56 PM, Jacques Hausser jacques.haus...@unil.chwrote: I really should re-read my mails before sending them :-( I cannot copy and paste scripts directly into mails (I don't know why) so I rewrite them... with bugs ! Now that Mark has his solution, this seems to be the

Re: Deriving an angle from three points

2009-12-16 Thread Mark Swindell
Dec 2009 22:21:47 -0800 From: Mark Swindell mdswind...@cruzio.com Subject: Deriving an angle from three points To: How to use Revolution use-revolution@lists.runrev.com Message-ID: b3725793-6274-4f53-91d2-3154d31f9...@cruzio.com Content-Type: text/plain;charset=us-ascii 40,116 98,186

Re: Deriving an angle from three points

2009-12-16 Thread Mark Swindell
Colin, Thanks, this appears to be a very succinct solution. Very much appreciated. Mark On Dec 16, 2009, at 8:01 AM, Colin Holgate wrote: On Dec 16, 2009, at 1:21 AM, Mark Swindell wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those

Re: Deriving an angle from three points

2009-12-16 Thread Mark Swindell
degrees as your answer. -- View this message in context: http://n4.nabble.com/Deriving-an-angle-from-three-points-tp964930p965051.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution

Deriving an angle from three points

2009-12-15 Thread Mark Swindell
40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? Thanks, Mark___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

Re: Deriving an angle from three points

2009-12-15 Thread Mark Wieder
Mark- Tuesday, December 15, 2009, 10:21:47 PM, you wrote: 40,116 98,186 132,118 How would one determine the angle created from three points, such as those above? There are three angles. Which one are you interested in? -- -Mark Wieder mwie...@ahsoftware.net

Re: Deriving an angle from three points

2009-12-15 Thread Phil Davis
I never took trig, but I imagine some of Rev's trig functions might be helpful in determining this. If it's any help, here's a button handler that draws the angle: on mouseUp put 40,116/98,186/132,118 into tPointsList replace / with cr in tPointsList set the style of the