The sample you originally posted is not accessible anymore, so my take on
this might be off-base:

http://www.motiondraw.com/md/as_samples/t/CatmullRomSpline/scribbledOval.htm
l

This approach is more about 'scribbling' than Math -

First several ovals are manually drawn with this tool
http://www.motiondraw.com/md/as_samples/t/LineGeneralization/demo.html

Now each time the mouse is clicked one of the pre-recorded paths is
selected, some random is applied to its coordinates, it is smoothed again
and finally it is rendered as Catmull Rom spline:
http://www.motiondraw.com/md/as_samples/t/CatmullRomSpline/tween.html

Post again if you need more details/code!

HTH
--------------
Andreas Weber
motiondraw.com



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Serge
Jespers
Sent: Wednesday, December 28, 2005 2:44 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] "scribbling" an oval


It's supposed to be the drawing API ;-)
Positioning an animated MC would be the easy way and I always seem to
go for the not so easy way ;-)

I got this far (ahum) > http://webkitchen.be/downloads/scribble.swf
And now I need a mathematician to fix the coordinates :p

Obviously, this is totally wrong ;-) but hey... at least I'm trying
here ;-)
Oh man... I can totally see my math-teacher laughing his ass off
right now...

makeOvalCoordinates = function (w, h, p) {
        if (p<=1) {
                nx = w/2;
                ny = h/2;
        } else {
                if (nx>= -w/2){
                        nx -= 10;
                } else {
                        nx+=10;
                }
                if (ny>=-h/2){
                        ny -= 10;
                } else {
                        ny+=10;
                }
        }
        return {x:nx, y:ny};
};



> Are you trying to position an animated movieClip Serge, or use the
> drawing API to draw scribbles? Because it sound like the
> suggestions you're getting are the latter solution.
>
> S

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to