Re: Points of Graphic Oval

2017-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Mark thanks for an adventure into the clean air of abstract thought…. "This can be seen from the fact that to compute cos/sin/tan (which are the mathematical primitives in some sense acting here) require a 'taylor' expansion which is an infinite polynomial sequence (with order tending to

Re: Points of Graphic Oval

2017-08-02 Thread Mark Waddingham via use-livecode
File an enhancement - it's not something we have gotten round to doing yet but a 'flattened path' api was always on the cards to do but we hadn't gotten around to it yet. Warmest Regards, Mark. P.S. 'Flattening' is the term used to describe the process of turning paths into sequences of line

Re: Points of Graphic Oval

2017-08-02 Thread hh via use-livecode
I have already done what you describe in a HTML5 standalone for displaying progress along a Bezier curve, using LC Script only. http://hh.on-rev.com/html5/hhProgressHTML5_2-8.0.2X.html And it is done for all LC's SVG icons using the jquery-drawsvg plugin in a browser widget (incl. optional affine

Re: Points of Graphic Oval

2017-08-02 Thread Malte Pfaff-Brill via use-livecode
Haha… Fun of having one of those touch bars on top of the keyboard and sausage-fingers… ->Not a good combo... Mark wrote: I strongly suspect Malte's animationEngine does this 'correctly' for this case as it was designed with this kind of use case in mind. Good thing: Due to the Dual license

Re: Points of Graphic Oval

2017-08-02 Thread Mark Waddingham via use-livecode
Heh - sometimes it takes a relative tome of justification to arrive at a simple explanation! However the beauty of Bézier curves is that arcs are just a small subset of what they can represent 'well enough'. For moving along an arbitrary (Bézier - you can represent a straight line segment as

Re: Points of Graphic Oval

2017-08-02 Thread hh via use-livecode
> Mark wrote: > So, at the level of the graphic object it is a true arc, at the level of > instructing > the graphics library it is a Bézier approximation but at the level of working > out what > pixels to render it is a polygon. Thanks for arriving from your previous post at this very clear

Re: Points of Graphic Oval

2017-08-02 Thread Mark Waddingham via use-livecode
A general arc (which an oval is an example of) is represented in LiveCode like elsewhere as a maximum of four cubic Bézier curves. These Bézier curves are then flattened to polynomials relative to a notion of 'flatness' - which means that the you iterate (using the de Casteljeu method) until

Re: Points of Graphic Oval

2017-08-02 Thread Mark Waddingham via use-livecode
Bézier curves are a polynomial - usually quadratic (2nd degree) or cubic (3rd degree) but the model extends to arbitrary order. With four cubic Bézier curves (so 8 quadratic) you can make an exceptionally good approximation to an oval - but it is not exact. Indeed (anyone who might have a

Re: Points of Graphic Oval

2017-08-02 Thread hh via use-livecode
Actually you don't see "sides" of a regular 360-gon because the engine uses "trunc()" differing from my "round()" used earlier in this thread. So the approximation using "round" may be better in case you are scaling such points lists. ___ use-livecode

Re: Points of Graphic Oval

2017-08-02 Thread hh via use-livecode
> BR wrote: >> HH wrote: >> A circle is, just like a Bezier curve, a mathematical model, for thinking, >> doing mathematics. Not realizable in our virtual world. >> What you can have and what you see are (more or less good) approximations >> to that model, here nothing more than simple

Re: Points of Graphic Oval

2017-08-02 Thread Bob Sneidar via use-livecode
WHOOPS! I mean none of the lines intersect. Bob S > On Aug 2, 2017, at 08:47 , Bob Sneidar via use-livecode > wrote: > > It's simple because all the angles are obtuse. > > Bob S ___ use-livecode mailing list

Re: Points of Graphic Oval

2017-08-02 Thread Bob Sneidar via use-livecode
It's simple because all the angles are obtuse. Bob S > On Aug 2, 2017, at 08:44 , Sannyasin Brahmanathaswami via use-livecode > wrote: > > But then, as the circle/oval got bigger one would see 360 "sides" but we > don't. So, how is it a "simple polygon"

Re: Points of Graphic Oval

2017-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
HH wrote: A circle is, just like a Bezier curve, a mathematical model, for thinking, doing mathematics. Not realizable in our virtual world. What you can have and what you see are (more or less good) approximations to that model, here nothing more than simple polygons. But then,

Re: Points of Graphic Oval

2017-08-02 Thread hh via use-livecode
The effective points of an oval (circle) are the 360 points of a regular polygon with 360 vertices (if it's closed). You could look at stack #2 of the Raspi-Collection, runs on Mac/Win/linux using LC 6/7/8/9: http://forums.livecode.com/viewtopic.php?p=98716#p98716 (in LC 8/9 add a semicolon after

Re: Points of Graphic Oval

2017-08-01 Thread Sannyasin Brahmanathaswami via use-livecode
Sequently found "effectivePoints" and used that and it works fine on Mobile. But this thread became something more, it became about generating a polygon object that "looks like" an oval. But is an oval such an object at all? Mark Wieder via use-livecode"

Re: Points of Graphic Oval

2017-07-31 Thread Bob Sneidar via use-livecode
Both are part of the joke. I shouldn't explain it because that is like disecting a frog. The frog dies and nobody cares. :-) But geometrically in any line there are an infinite number of points, because a point is an infinitely small coordinate. That's if by point you mean literally points in

Re: Points of Graphic Oval

2017-07-31 Thread Quentin Long via use-livecode
The obvious method for generating the points of an oval—use a loop that generates sin(x) & cos(x) coördinate-pairs—has already been mentioned. What's *not* so obvious, is that the points generated by that method are not evenly spaced! Not unless you're working with a perfect circle, anyway. For

Re: Points of Graphic Oval

2017-07-31 Thread hh via use-livecode
> Mark wrote: >> How do you define "strict geometry"? > That would be my seventh-grade math teacher >> And what is an "infinite amount"? > For points in an oval, that would be Aleph-one, no? I see. When you selected to return 360 points for the effective points of an oval (what is, TMHO, a

Re: Points of Graphic Oval

2017-07-31 Thread Mark Wieder via use-livecode
On 07/31/2017 08:34 AM, hh via use-livecode wrote: Bob S. wrote: By strict geometry, an infinite amount. Using Bezier, 4. :-) Just because I am curious which part of your statement is the joke: How do you define "strict geometry"? That would be my seventh-grade math teacher And what is

Re: Points of Graphic Oval

2017-07-31 Thread hh via use-livecode
> Bob S. wrote: > By strict geometry, an infinite amount. Using Bezier, 4. :-) Just because I am curious which part of your statement is the joke: How do you define "strict geometry"? And what is an "infinite amount"? ___ use-livecode mailing list

Re: Points of Graphic Oval

2017-07-31 Thread Mark Wieder via use-livecode
On 07/31/2017 07:55 AM, Bob Sneidar via use-livecode wrote: By strict geometry, an infinite amount. Using Bezier, 4. :-) Hey, no fair. Using Bezier curves is cheating. But yeah, thus my rather snarky reply which should have had a smiley thing anyway. When I wrote the effective points code

Re: Points of Graphic Oval

2017-07-31 Thread Bob Sneidar via use-livecode
By strict geometry, an infinite amount. Using Bezier, 4. :-) Bob S > On Jul 30, 2017, at 21:46 , Mark Wieder via use-livecode > wrote: > > On 07/30/2017 09:06 PM, Sannyasin Brahmanathaswami via use-livecode wrote: > >> OK, so how can we generate the points of

Re: Points of Graphic Oval

2017-07-31 Thread Richmond via use-livecode
Personally I would do something I learnt to do in about 1976 in FORTRAN: make yourself an 800 x 800 stack, and a lineField called "POYNTS", and an irregular polygon called "POLLY" put 0 into KOUNT repeat until KOUNT > 6.29 put (KOUNT * 100) + 1 into LYNE put (400 +((sin(KOUNT))*300)) into LR

Re: Points of Graphic Oval

2017-07-31 Thread hh via use-livecode
[Once again, without typos (although it works correctly with the typos)] The following runs in LC 6/7/8/9. ### yields points of an 'elliptical' n0-sided polygon, ### for a 'circular' shape set rx=ry. -- n0 is the number of vertices (= n0+1 points for a closed polygon) -- rx is the horizontal

Re: Points of Graphic Oval

2017-07-31 Thread hh via use-livecode
> BR wrote: > 1) draw graphic oval name: "moveClue1" > 2) create small image "word_1" > move image "word_1" to the points of grc "moveClue1" in 2 seconds > OK, so how can we generate the points of a perfect oval? > > Scott wrote: > > You can use the effectivePoints to get the points of any

Re: Points of Graphic Oval

2017-07-30 Thread Scott Rossi via use-livecode
You can use the effectivePoints to get the points of any graphic shape, but depending on the size, your oval may produce too many points. In any event, your source oval doesn't need to be perfect. If you reference a "decent" number of points along the shape of the oval, your image will have the

Re: Points of Graphic Oval

2017-07-30 Thread Mark Wieder via use-livecode
On 07/30/2017 09:06 PM, Sannyasin Brahmanathaswami via use-livecode wrote: OK, so how can we generate the points of a perfect oval? How many points would you guess are in an oval? -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing

Points of Graphic Oval

2017-07-30 Thread Alejandro Tejada via use-livecode
This works great: move image "word_1" to the effective points of grc "moveClue1" in 2 seconds Al ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Points of Graphic Oval

2017-07-30 Thread Sannyasin Brahmanathaswami via use-livecode
1) draw graphic oval name: "moveClue1" 2) create small image "word_1" move image "word_1" to the points of grc "moveClue1" in 2 seconds test: point the points of graphic "moveClue1" result: empty check dictionary: yep, oval are not among the objects with points ☹ OK, so how can we