Drawing a curved shape - 2nd attempt

James Hurley jhurley0305 at sbcglobal.net
Mon Feb 2 10:02:43 EST 2009


>
> Message: 4
> Date: Sat, 31 Jan 2009 22:23:56 +0100
> From: Graham Samuel <livfoss at mac.com>
> Subject: Drawing a curved shape - 2nd attempt
> To: use-revolution at lists.runrev.com
> Message-ID: <C5DFB711-13F7-41E1-839A-75903FFD4F87 at mac.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Dear list
>
> I sent this mail a few days ago, and unless I missed it, (always
> possible if you get the digest, as  do) I got no replies at all. This
> is the first time this has happened to me, so I thought it might be
> worth a second try to see if I get anyone's attention.
>
> TIA
>
> Graham
>
> It seems funny that after all these years I've never tried this, but I
> realise I don't know how to draw a curved shape by script. I see from
> the Rev documentation that the style of a graphic can be 'curve' and
> that the shape of the graphic can be defined by its points, but that
> doesn't tell me how to produce a smooth curve which will still look
> curved at any degree of enlargement or resolution.

Graham,

Until Run Rev comes up with a true bezier graphic you may find that a  
simulation is adequate for your purposes.

Go to: http://home.infostations.net/jhurley/

There you will find the following discussion of a bezier plug-in.

"Bezier Line (New and improved) This is a plug-in allowing you to  
paste a bezier line onto any card of any stack. It is the normal  
bezier curve you are probably familiar with, line and tangent  
controls. The line controls may be either corner points or continuous  
tangent points. The control points are made invisible by double  
clicking on the bezier line. (This gives you a single line with any  
shape compatible with the cubic parametric expansion of curve's  
function.) Double clicking again brings the control points back. It  
is self-contained. All handlers are in the control points and the  
bezier line itself. I have added the ability to remove all the bezier  
control and their scipts, thus reducing the overhead. It might reduce  
the size of your stack by 100 K or more. (In the compact version, you  
will have a choice of saving the bezier curve as an open line graphic  
or a closed polygon graphic.) A more compact version (40 K verser 180  
K) of this plug in also available."


Jim Hurley




More information about the use-livecode mailing list