Drawing a curved shape - 2nd attempt
livfoss at mac.com
Sat Jan 31 15:23:56 CST 2009
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.
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.
For example if I set a graphic to style 'curve' and draw it by
calculating a circular path with a point every few degrees, I will get
a circle. But is this **really** a circle or is it rather a polygon
with a lot of small straight sides? If the latter, it wouldn't look
good after enlargement or when printed on a high-resolution printer,
would it? And what if I want to draw a far more complex shape
consisting perhaps of straight lines and more than one kind of curve?
All this is easy in drawing programs, but how would one do it with Rev
scripting? Maybe I just missed the relevant documentation, but up to
now I can't see the answer.
More information about the use-livecode