Points of Graphic Oval
hh
hh at hyperhh.de
Wed Aug 2 17:24:48 EDT 2017
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 transformations of the SVG icons).
http://livecodeshare.runrev.com/stack/833/AutoDraw_SVGicon
What I meant is to have such a tricky translation of model elements
(arc, curve etc.) of an SVG path into an appropriate points-only path
in LCB? Perhaps one could use parts of LC-Ian's SVG work for that?
> Mark wrote:
> 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 one trivially) path, what you actually need is first the length
> of the path (annoyingly not a representable function - iirc) and a parametric
> form of a Bézier curve (which is how they are best expressed).
>
> Then to step along the path at fixed distance at each step you use
> f(n * fixeddist / length) (here f is the parametric form of the Bézier
> - returning a 2d point). You'd need some adjustment (+/- 1 pix) to account
> for rounding error - but I think the idea is sound.
More information about the Use-livecode
mailing list