Scripting A Curve Graphic

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10543
Joined: Wed May 06, 2009 2:28 pm

Re: Scripting A Curve Graphic

Post by dunbarx »

Klaus.

Bravo, I completely forgot that the "effective" keyword is magical, far more than its small dictionary entry would suggest.

Craig
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10543
Joined: Wed May 06, 2009 2:28 pm

Re: Scripting A Curve Graphic

Post by dunbarx »

So I double-clicked an oval graphic out of the toolBar, a circle 120 pixels in diameter, and asked for the number of lines of the effective points. I got 352.

The circumference is 377 pixels, so the circle is pretty well filled with points, likely no tiny straight lines at all. In other words, as smooth as one can get.

What the OP really wanted was that sort of resolution when specifying a curve by three points. But LC does not know that is the intent. Given three points, which does completely describes a unique arc, LC would have no idea.

ChatGPT shows how to take the three coordinates you supply and build a complete arc with all parameters.

Craig
Post Reply