Page 1 of 1

Smoothing?

Posted: Fri Jan 01, 2010 7:52 pm
by super8mm
Is there a smooth arcing of points script?

Where points can be selected and then the action causes all the points to have equal distance between them and every point between two others is averaged.

Posted: Fri Jan 01, 2010 11:25 pm
by Genete
Where points can be selected and then the action causes all the points to have equal distance between them and every point between two others is averaged.
I barely remember something written previously. A deep search in the Scripting forum might give you the answer.

Anyway, try to recreate the script manually and you'll find that the curvatures need to be adapted to fit the original curve. That lead into a multisolution problem... eventually without solution... unless you add more points...
Image

-G

Posted: Sat Jan 02, 2010 6:11 am
by super8mm
I'm checking the manual...
Instead of writing your program to a file, you may run the stand-alone interpreter in interactive mode. If you call Lua without any arguments, you will get its prompt:

Lua 5.0 Copyright (C) 1994-2003 Tecgraf, PUC-Rio
>
Is that what it means to do it manually? How do you do that?


It's only when I'm in the passion of creating that I wish I could have tool to express myself faster and better. I'm willing to make a lua script, I know action scripts from flash and Java.

I would need a noob level hello world type tutorial to learn:

Scripting syntax
Selecting a point
Getting a numeric value of a point
Assign a numeric value to a point
Move a point

Posted: Sat Jan 02, 2010 4:20 pm
by Genete
I mean, BEFORE write an script or ask someone write an script, try to proof that it can be really possible to do with the current geometry tools. The example I gave you tries to show that with only three points is very difficult to average the position of the points in a curve without modify the curve's shape, even changing the curvature of the points.
Also think that a script is just an automation of a task, that should have to have an unique solution (as many equations as variables) and not a intelligent system unless you program it carefully.

For a totally noob lua programmer I recommend to read the LM first post about scripting and the lua manual for lua standard reference. In any case you should have an initial idea of coding in any structured language to dare with the coding of a script for Anime Studio.
For now, the best way to create new tools and menu commands is to start with one that comes with Moho and modify it to fit your needs.
-G

Posted: Sat Jan 02, 2010 6:48 pm
by super8mm
Yeah! I see what you mean. That was educational.

OK! So the easiest solution would be a 5 point half circle tool where all the points would be on the circle.