new whirl

Discussion about writing code for Inkscape.
AleSeg
Posts: 1
Joined: Thu Mar 01, 2012 11:14 pm

new whirl

Postby AleSeg » Tue May 28, 2013 12:30 pm

Hi people.
I´m new here, and want to make an effort for write a plug in.
In my case the plug in is very similar to the Whirl.
The function is very different.
The effect in SciLab is like that:

Code: Select all

function [xf,yf]=revuelvo(x,y,a)
    n=max(size(x));
    xf=[],yf=[];
    for i=1:n
        r=sqrt(x(i)^2+y(i)^2);
        alfa=a*atan(y(i),x(i));
        xf(i)=r*cos(alfa);
        yf(i)=r*sin(alfa);
    end
endfunction

I want to rotate points in a factor "a" from a reference angle, without change the distance to the center. Is an angular expansion.
I have trouble with the paths and it´s representation.
I don't want to change the angles in the corners of the path. Only the nodes.
Where do you advise me to look for a good understanding of the codification and the way of modify the points?
Thanks

Return to “Programming”