Request: Script for creating circles/ ovals with many points

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Nephilim
Posts: 100
Joined: Sun Mar 11, 2007 3:55 am
Location: USA

Request: Script for creating circles/ ovals with many points

Post by Nephilim »

Hi,

Does anyone know of or can create script that can draw a circle with you typing in how many points there are on it. I find that it is difficult to animate circles when they only have 4 points. I do not know anything about scripting but this shouldn't be impossible to do.

Thanks for any replies.
~neph
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

You can use the split curve script in Script -> Draw menu. With this you can split any curve in a determined number of points without changing the curve profile. (well it changes a little due to calculations errors but is not noticiable)
Also I think you can draw a star / poligon with fazek scripts (see this section) or with the built in one. Just draw a poligon and later modfy the curvature of the corners to the correct value. Also very handy the modified Curvature tool by fazek because you can input a curvature number instead only drag the mouse like in the original curvature tool.

fazek modified set of tools here

Hope it helped you (and also that the trick of the poligon works because I have never tried!!! :wink:)
Best
Genete
User avatar
Nephilim
Posts: 100
Joined: Sun Mar 11, 2007 3:55 am
Location: USA

Post by Nephilim »

I never knew what the split curve script was for. Thank you very much, it works nicely.
~neph
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I use the split curve script ALL THE TIME!

I use it for circles and rectangles, shapes of any sort.

It is also really great for adding points between points. You can select just a few points in a shape and add points.

I also like to use it for adding points equally spaced. Select a single line with two points and use the split curve to add one point exactly in the center.

Split curve is one of those work horse scripts. It comes in handy in so many situations.

-vern
Post Reply