Conflicting paths

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Conflicting paths

Richmond Mathewson-2
I have a silly solar system with 2 planets and a stationary sun.

Now in my "Do it" button I have this script:

on mouseUp
    move img "Saturn" to the points of grc "OVOID" in 25 seconds without
waiting
    move img "Mars" to the points of grc "PATH2" in 25 seconds without
waiting
end mouseUp

now img "Saturns" trots smoothly round my rather jagged, freehand oval,

BUT img "Mars" jerks and pauses like an alcoholic on a major binge-drink.

Obviously that is not a good thing [unless one wants to produce
animations of alcoholics],
so would be grateful if somebody could tell me where I've slipped up.

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

dunbarxx
Richmond.


What happens if you "lock moves", set them going, and then "unLock moves"?



Craig


-----Original Message-----
From: Richmond <[hidden email]>
To: How to use LiveCode <[hidden email]>
Sent: Wed, Jul 9, 2014 4:30 pm
Subject: Conflicting paths


I have a silly solar system with 2 planets and a stationary sun.

Now in my "Do it" button I have this script:

on mouseUp
    move img "Saturn" to the points of grc "OVOID" in 25 seconds without
waiting
    move img "Mars" to the points of grc "PATH2" in 25 seconds without
waiting
end mouseUp

now img "Saturns" trots smoothly round my rather jagged, freehand oval,

BUT img "Mars" jerks and pauses like an alcoholic on a major binge-drink.

Obviously that is not a good thing [unless one wants to produce
animations of alcoholics],
so would be grateful if somebody could tell me where I've slipped up.

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richmond Mathewson-2
In reply to this post by Richmond Mathewson-2
LOCK MOVES  and UNLOCK MOVES

oddly enough seems to make things worse.

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richmond Mathewson-2
In reply to this post by dunbarxx
On 09/07/14 23:40, [hidden email] wrote:
> Richmond.
>
>
> What happens if you "lock moves", set them going, and then "unLock moves"?
>
>
>
>

No joy.

However, this works quite well:

on mouseUp
    put the points of grc "OVOID" into fld "POINTZ1"
    put the points of grc "PATH2" into fld "POINTZ2"
    put 1 into KOUNT
    put 500 into QOUNT
    repeat until line KOUNT of fld "POINTZ1" is empty
       move img "Saturn" to line KOUNT of fld "POINTZ1"
       move img "Mars" to line QOUNT of fld "POINTZ2"
       add 3 to KOUNT
       add 3 to QOUNT
       if QOUNT > 1003 then
          put 1 into QOUNT
          end if
    end repeat
end mouseUp

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richmond Mathewson-2
I have a wobbly hand: or wobbly enough that I cannot draw
an oval graphic to use as a path in a stack that doesn't look
horrible.

Does anybody have any tips on how to make an oval path with points

[that means, before you all rush to point something out, that
the oval object is no use at all]

that doesn't look like it has been drawn by a middle-aged dipsomaniac?

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Paul Hibbert
Richmond,

Maybe you could use Bernd's stack to trace an oval image.

   Link from a previous post…

   http://forums.runrev.com/phpBB2/viewtopic.php?t=19040&p=96086#p96086

Paul


On 2014-07-10, at 10:43 AM, Richmond <[hidden email]> wrote:

> I have a wobbly hand: or wobbly enough that I cannot draw
> an oval graphic to use as a path in a stack that doesn't look
> horrible.
>
> Does anybody have any tips on how to make an oval path with points
>
> [that means, before you all rush to point something out, that
> the oval object is no use at all]
>
> that doesn't look like it has been drawn by a middle-aged dipsomaniac?
>
> Richmond.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

J. Landman Gay
In reply to this post by Richmond Mathewson-2
On 7/10/2014, 12:43 PM, Richmond wrote:

> I have a wobbly hand: or wobbly enough that I cannot draw
> an oval graphic to use as a path in a stack that doesn't look
> horrible.
>
> Does anybody have any tips on how to make an oval path with points
>
> [that means, before you all rush to point something out, that
> the oval object is no use at all]
>
> that doesn't look like it has been drawn by a middle-aged dipsomaniac?

Mark Wieder recently added points to the standard graphic objects. But
until that gets into the engine, I can't think of an easy way to create
them.

I suppose you could draw out an oval with a 3 or 4 pixel line width, and
then write a little script to record the mouseloc when you hit the
return key, or something similar. That would allow you to carefully
position the mouse before recording each loc. Then with some editing you
could use that list as the point list.

It's not exactly how I'd want to spend my time though.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Walt Brown
Here's a quickie stack I wrote after reading Richmond's email, which
creates a set of points in an oval and then sends a planet around. The oval
can be set to width (k), height (h), and angle (theta). Written in 5.5.5.
Embedded in it is a stack script which contains the angled ellipse
calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) * sin(theta)), y =
k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.


On Thu, Jul 10, 2014 at 8:10 PM, J. Landman Gay <[hidden email]>
wrote:

> On 7/10/2014, 12:43 PM, Richmond wrote:
>
>> I have a wobbly hand: or wobbly enough that I cannot draw
>> an oval graphic to use as a path in a stack that doesn't look
>> horrible.
>>
>> Does anybody have any tips on how to make an oval path with points
>>
>> [that means, before you all rush to point something out, that
>> the oval object is no use at all]
>>
>> that doesn't look like it has been drawn by a middle-aged dipsomaniac?
>>
>
> Mark Wieder recently added points to the standard graphic objects. But
> until that gets into the engine, I can't think of an easy way to create
> them.
>
> I suppose you could draw out an oval with a 3 or 4 pixel line width, and
> then write a little script to record the mouseloc when you hit the return
> key, or something similar. That would allow you to carefully position the
> mouse before recording each loc. Then with some editing you could use that
> list as the point list.
>
> It's not exactly how I'd want to spend my time though.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

mwieder
In reply to this post by J. Landman Gay
Jacque-

Thursday, July 10, 2014, 5:10:40 PM, you wrote:

> Mark Wieder recently added points to the standard graphic objects. But
> until that gets into the engine, I can't think of an easy way to create
> them.

That should be in the next release of LC 6.7. Ovals aren't included
yet because I hadn't figured out how to deal with them at that point.
If my latest pull request can get accepted before the next release
then you'll be able to use the effective points of ovals as well.

--
-Mark Wieder
 [hidden email]

This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richmond Mathewson-2
In reply to this post by Walt Brown
On 11/07/14 04:08, Walt Brown wrote:
> Here's a quickie stack I wrote after reading Richmond's email, which
> creates a set of points in an oval and then sends a planet around. The oval
> can be set to width (k), height (h), and angle (theta). Written in 5.5.5.
> Embedded in it is a stack script which contains the angled ellipse
> calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) * sin(theta)), y =
> k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.

Jolly nice; especially if we had the link to download the stack :/

Richmond.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Walt Brown
Sorry, I wasn't aware that attachments didn't follow thru. See if this
works:

https://www.dropbox.com/s/xxdfiuvzlblweoe/wbOvalOrbiter.zip


On Fri, Jul 11, 2014 at 1:15 AM, Richmond <[hidden email]>
wrote:

> On 11/07/14 04:08, Walt Brown wrote:
>
>> Here's a quickie stack I wrote after reading Richmond's email, which
>> creates a set of points in an oval and then sends a planet around. The
>> oval
>> can be set to width (k), height (h), and angle (theta). Written in 5.5.5.
>> Embedded in it is a stack script which contains the angled ellipse
>> calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) * sin(theta)), y =
>> k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.
>>
>
> Jolly nice; especially if we had the link to download the stack :/
>
> Richmond.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

scott@elementarysoftware.com
Nice!


Scott Morrow

On Jul 10, 2014, at 10:27 PM, Walt Brown <[hidden email]> wrote:

> Sorry, I wasn't aware that attachments didn't follow thru. See if this
> works:
>
> https://www.dropbox.com/s/xxdfiuvzlblweoe/wbOvalOrbiter.zip
>
>
> On Fri, Jul 11, 2014 at 1:15 AM, Richmond <[hidden email]>
> wrote:
>
>> On 11/07/14 04:08, Walt Brown wrote:
>>
>>> Here's a quickie stack I wrote after reading Richmond's email, which
>>> creates a set of points in an oval and then sends a planet around. The
>>> oval
>>> can be set to width (k), height (h), and angle (theta). Written in 5.5.5.
>>> Embedded in it is a stack script which contains the angled ellipse
>>> calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) * sin(theta)), y =
>>> k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.
>>>
>>
>> Jolly nice; especially if we had the link to download the stack :/
>>
>> Richmond.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Mike Bonner
This is similar to walts, but doesn't handle angles.  It sets the points of
a preexisting line grc.  Just hated not to post it after figuring it out,
but stick with walts.

Heres the quicky code anyway..

local sxOffset,syOffset,sSegments,sxradius,syRadius
constant totalRadians=6.283185
on mouseUp
   put 360 into sSegments -- segments desired
   put 50 into sxRadius x radius
   put 30 into syRadius y radius
   put item 1 of the loc of this card into sxOffset -- just chooses the
center of the card as the center of the oval
   put item 2 of the loc of this card into syOffset
   put totalRadians / sSegments into tFactor -- the factor in radians based
on the number of segments desired
   repeat with i = 1 to sSegments + 1
      put sxOffset + sxradius * cos(i*tFactor) & comma & syoffset +
syRadius * sin(i*tfactor) & cr after tpointslist
   end repeat
   delete the last char of tPointslist
   set the points of grc "testgrc" to tPointslist
end mouseUp


On Thu, Jul 10, 2014 at 11:49 PM, Scott Morrow <[hidden email]
> wrote:

> Nice!
>
> —
> Scott Morrow
>
> On Jul 10, 2014, at 10:27 PM, Walt Brown <[hidden email]> wrote:
>
> > Sorry, I wasn't aware that attachments didn't follow thru. See if this
> > works:
> >
> > https://www.dropbox.com/s/xxdfiuvzlblweoe/wbOvalOrbiter.zip
> >
> >
> > On Fri, Jul 11, 2014 at 1:15 AM, Richmond <[hidden email]>
> > wrote:
> >
> >> On 11/07/14 04:08, Walt Brown wrote:
> >>
> >>> Here's a quickie stack I wrote after reading Richmond's email, which
> >>> creates a set of points in an oval and then sends a planet around. The
> >>> oval
> >>> can be set to width (k), height (h), and angle (theta). Written in
> 5.5.5.
> >>> Embedded in it is a stack script which contains the angled ellipse
> >>> calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) * sin(theta)),
> y =
> >>> k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.
> >>>
> >>
> >> Jolly nice; especially if we had the link to download the stack :/
> >>
> >> Richmond.
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Mike Bonner
oops, didn't put the -- on a couple of comments, but should be
decipherable. DOH


On Thu, Jul 10, 2014 at 11:54 PM, Mike Bonner <[hidden email]> wrote:

> This is similar to walts, but doesn't handle angles.  It sets the points
> of a preexisting line grc.  Just hated not to post it after figuring it
> out, but stick with walts.
>
> Heres the quicky code anyway..
>
> local sxOffset,syOffset,sSegments,sxradius,syRadius
> constant totalRadians=6.283185
> on mouseUp
>    put 360 into sSegments -- segments desired
>    put 50 into sxRadius x radius
>    put 30 into syRadius y radius
>    put item 1 of the loc of this card into sxOffset -- just chooses the
> center of the card as the center of the oval
>    put item 2 of the loc of this card into syOffset
>    put totalRadians / sSegments into tFactor -- the factor in radians
> based on the number of segments desired
>    repeat with i = 1 to sSegments + 1
>       put sxOffset + sxradius * cos(i*tFactor) & comma & syoffset +
> syRadius * sin(i*tfactor) & cr after tpointslist
>    end repeat
>    delete the last char of tPointslist
>    set the points of grc "testgrc" to tPointslist
> end mouseUp
>
>
> On Thu, Jul 10, 2014 at 11:49 PM, Scott Morrow <
> [hidden email]> wrote:
>
>> Nice!
>>
>> —
>> Scott Morrow
>>
>> On Jul 10, 2014, at 10:27 PM, Walt Brown <[hidden email]>
>> wrote:
>>
>> > Sorry, I wasn't aware that attachments didn't follow thru. See if this
>> > works:
>> >
>> > https://www.dropbox.com/s/xxdfiuvzlblweoe/wbOvalOrbiter.zip
>> >
>> >
>> > On Fri, Jul 11, 2014 at 1:15 AM, Richmond <[hidden email]>
>> > wrote:
>> >
>> >> On 11/07/14 04:08, Walt Brown wrote:
>> >>
>> >>> Here's a quickie stack I wrote after reading Richmond's email, which
>> >>> creates a set of points in an oval and then sends a planet around. The
>> >>> oval
>> >>> can be set to width (k), height (h), and angle (theta). Written in
>> 5.5.5.
>> >>> Embedded in it is a stack script which contains the angled ellipse
>> >>> calculation x = h + (a*cos(t) * cos(theta)) - (b*sin(t) *
>> sin(theta)), y =
>> >>> k + (a*cos(t) * sin(theta)) + (b*sin(t) * cos(theta)). Play.
>> >>>
>> >>
>> >> Jolly nice; especially if we had the link to download the stack :/
>> >>
>> >> Richmond.
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> [hidden email]
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richmond Mathewson-2
In reply to this post by Walt Brown
To be honest I am guilty of mental laziness.

So, this morning I pulled myself together and wrote the script I should
have written
instead of bothering everybody on the Use-List.

Considering this is a remake of an exercise my Maths teacher set me in a
FORTRAN class in 1975
this is disgraceful.

So: set up a 900 by 900 stack with a scrolling text field "OOT",

a graphic "OVOID",

and a button "Do It" containing this:

on mouseUp
    put empty into fld "OOT"
    put 1 into KOUNT
    repeat until KOUNT = 6284
       put (KOUNT / 1000) into smK
       put (cos (smK) * 200) into CsmK
       put (sin(smK) * 200) into SsmK
       put ((CsmK div 1) + 200) into WW
       put ((SsmK div 1) + 200) into HH
       put WW & "," & HH into line KOUNT of fld "OOT"
       add 1 to KOUNT
    end repeat
   set the points of grc "OVOID" to fld "OOT"
end mouseUp

Obviously a bad week that I had forgotten how very simple it is to
generate a circle.

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richard Gaskin
In reply to this post by mwieder
Mark Wieder wrote:

> Jacque-
>
> Thursday, July 10, 2014, 5:10:40 PM, you wrote:
>
>> Mark Wieder recently added points to the standard graphic objects. But
>> until that gets into the engine, I can't think of an easy way to create
>> them.
>
> That should be in the next release of LC 6.7. Ovals aren't included
> yet because I hadn't figured out how to deal with them at that point.
> If my latest pull request can get accepted before the next release
> then you'll be able to use the effective points of ovals as well.

A circle is defined as an infinite number of points a given distance
from a given point.

Of course you won't be returning an infinite number of points, but even
every pixel might be a bit much for some needs.

How will you determine the level of granularity to use in returning
those points?

Could it be adjustable by the user?

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

mwieder
Richard-

Friday, July 11, 2014, 9:07:30 AM, you wrote:

> A circle is defined as an infinite number of points a given distance
> from a given point.

> Of course you won't be returning an infinite number of points, but even
> every pixel might be a bit much for some needs.

Indeed. I do feel a bit like squaring the circle here. So here's what
I've done:

The roundrect corners currently use ten segments to determine the
curve. That seems a bit rough-edged for modern usage, so I upped it to
90 segments, one per degree. I then leveraged that routine to allow
for 360 segments for an oval, and that seems to be quite effective
when creating an oval by assigning points to a polygon.

--
-Mark Wieder
 [hidden email]

This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

Richard Gaskin
Mark Wieder wrote:

> The roundrect corners currently use ten segments to determine the
> curve. That seems a bit rough-edged for modern usage, so I upped it to
> 90 segments, one per degree. I then leveraged that routine to allow
> for 360 segments for an oval, and that seems to be quite effective
> when creating an oval by assigning points to a polygon.

Impressively good call.

Thanks for adding this.  I had wanted this some time ago, but with all
the other things RunRev has going on I just got used to doing without.
Very nice to see you've taken up the reins in this, and so well.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  ____________________________________________________________
  [hidden email]        http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

jim hurley
In reply to this post by Richmond Mathewson-2
Hi Richard,

I think I'm missing something.

Why construct the circle  (or ellipse) by setting points of a  graphic when the graphic oval tool produces a much better result?

No matter how many points I use when I set the points of a graphic, I still get jaggies.

P.S.

I tried to include a sample stack from Dropbox but I keep getting "No such card"

I tried in the msg box:

go  url "https://www.dropbox.com/s/pq4lrjftumx4mym/EllipseInAbox.rev"

And I get "no such card"

I used to be able to do this--like so many other things.

Jim

>
> ------------------------------
>
> Message: 4
> Date: Fri, 11 Jul 2014 09:07:30 -0700
> From: Richard Gaskin <[hidden email]>
> To: [hidden email]
> Subject: Re: Conflicting paths
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Mark Wieder wrote:
>
>> Jacque-
>>
>> Thursday, July 10, 2014, 5:10:40 PM, you wrote:
>>
>>> Mark Wieder recently added points to the standard graphic objects. But
>>> until that gets into the engine, I can't think of an easy way to create
>>> them.
>>
>> That should be in the next release of LC 6.7. Ovals aren't included
>> yet because I hadn't figured out how to deal with them at that point.
>> If my latest pull request can get accepted before the next release
>> then you'll be able to use the effective points of ovals as well.
>
> A circle is defined as an infinite number of points a given distance
> from a given point.
>
> Of course you won't be returning an infinite number of points, but even
> every pixel might be a bit much for some needs.
>
> How will you determine the level of granularity to use in returning
> those points?
>
> Could it be adjustable by the user?
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  Follow me on Twitter:  http://twitter.com/FourthWorldSys
>
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Conflicting paths

mwieder
In reply to this post by Richard Gaskin
Richard-

Friday, July 11, 2014, 9:25:48 PM, you wrote:

> Mark Wieder wrote:

>> The roundrect corners currently use ten segments to determine the
>> curve. That seems a bit rough-edged for modern usage, so I upped it to
>> 90 segments, one per degree. I then leveraged that routine to allow
>> for 360 segments for an oval, and that seems to be quite effective
>> when creating an oval by assigning points to a polygon.

> Impressively good call.

> Thanks for adding this.  I had wanted this some time ago, but with all
> the other things RunRev has going on I just got used to doing without.
> Very nice to see you've taken up the reins in this, and so well.

Thanks. That part was easy. I then spent five days beating my head
against the wall trying to accomodate the startAngle and arcAngle
properties. Finally gave up and rewrote the algorithm from scratch.
Your idea of a user-configurable setting is interesting and wouldn't
be that hard to implement - it's just a constant right now, and
changing it from ten to 90 was easy. I'm sure if some people (cough
Scott Rossi cough) needed better resolution this could be done.

There *are* a couple of drawbacks, as noted on the forum. First of
all, the points of graphics are read-only except for curves, lines,
and freeform polygons. Secondly, revRotatePoly only works for
polygons. If you want to rotate a different type of graphic, you first
have to set its style to polygon. You can't convert it back because
the rect will have changed, and rectangle, roundrects, and regular
polygons are strictly aligned to their rects. Personally I don't find
using polygons as my base graphic object to be a drawback, but I do
realize that it might be a bit jarring to some.

--
-Mark Wieder
 [hidden email]

This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
12