Simple line "blending" - possibly useful for textu

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
myles
Posts: 821
Joined: Sat Aug 21, 2004 3:32 am
Location: Australia, Victoria, Morwell
Contact:

Simple line "blending" - possibly useful for textu

Post by myles »

Greetings all,

http://www-personal.monash.edu.au/~myle ... line01.lua

Just a little script to do line blending, like some illustration programs.

Create 2 lines with the same number of points on a vector layer (or copy one curve and modify it if needed). Run this script, and specify the number of intermediate steps.

Image

Benefits:

Blends between 2 lines. The lines can have any shape or number of points.
Curvature is also blended.

Limitations:

Blends between lines only. Fills and outlines are not created or blended.

Both lines must be on the same vector layer and the only two lines on the vector layer. To add a blend to another layer, create a temporary layer, create the blend, then copy and paste the blend to the appropriate layer.

Both lines must have the same number of points.

Blend points use simple equi-distant linear spacing.

Blends apply from the "start" of one curve to the "start" of the next, as determined by Moho. This can be used for interesting effects.

For example, in this image both "starting points" are at the top:

Image

While in this image one line has been rotated 180 degrees before blending:

Image

Another, more interesting example:

In this image. both lines start from the "corner":

Image

While in this version one of the original lines has been rotated 180 degrees before blending:

Image

The script is only designed for separate open lines - joined, closed, or looped curves may not blend properly.

Regards, Myles.
"Quote me as saying I was mis-quoted."
-- Groucho Marx
User avatar
bupaje
Posts: 1175
Joined: Fri Nov 12, 2004 5:44 pm
Location: California
Contact:

Post by bupaje »

Hi myles. Thanks for this interesting addition. I think with some thought it may very useful tool to speed up drawing certain things and create some patterns and effects.
[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
User avatar
Rai López
Posts: 2259
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

:D ...THANKS! :D
User avatar
ulrik
Posts: 1087
Joined: Thu Aug 11, 2005 10:32 pm
Location: Stockholm Sweden
Contact:

Post by ulrik »

Thanks myles! :D
Post Reply