I am writing educational material about electricity, and now I am on the subject of alternating current. I read about, and found "plotting function" under Effects. It took me a while, but I managed to get a good (perhaps perfect) sinus shaped curve.
Now I have made two duplicates of it to illustrate threephase. I can't get the Align/distribute tool to do anything but stuffing all the curves together. So I used the XML-editor to get the coordinates and calculate the positions of each curve. Now it's tough to get the snap tool to fix the curves to my helplines.
Has anybody got any suggestions about how to go about it? I'd be most grateful.
Later on, I aim to describe a few mathematical functions with these curves and others.
aligning curves
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: aligning curves
I can't picture quite what your trying to get as the end result, so advising you on getting there is kinda hard
Are you after 3 out of phase sine curves overlaid or something else? I'd it's 3 out of phase ones can't you add an offset when you generate them with the function plotter?
Are you after 3 out of phase sine curves overlaid or something else? I'd it's 3 out of phase ones can't you add an offset when you generate them with the function plotter?
Re: aligning curves
I'd try snapping, set up guides at exact points where you need them or even use grid. I assume your curve has nodes exactly at the curve extremes so snapping nodes to guides should work nicely for you.
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: aligning curves
I hope the link is correct: http://www.mediafire.com/?sharekey=f03ef86545a99c75d2db6fb9a8902bda
This is what I have accomplished so far. I did try snapping, but I haven't got my head around how they work. It sure is different from my ordinary CAD tools (Eagle and QCad. If I am in edit path, I can see the nodes. Then of course, I get to adjust only one node. When in select mode, I can adjust the whole curve, but can't get a node to snap with ...
Now I have tried giving additional paramters to the function, so as to put the other curves at the proper spot from the beginning. But I believe I have to get better with radians before I get it right.
This is what I have accomplished so far. I did try snapping, but I haven't got my head around how they work. It sure is different from my ordinary CAD tools (Eagle and QCad. If I am in edit path, I can see the nodes. Then of course, I get to adjust only one node. When in select mode, I can adjust the whole curve, but can't get a node to snap with ...
Now I have tried giving additional paramters to the function, so as to put the other curves at the proper spot from the beginning. But I believe I have to get better with radians before I get it right.
Re: aligning curves
I can't remember how far snapping went in official 0.46 but it has improved much since. Maybe you can download the development version and align the curves there (if you are too scared to use the dev version all the time, you can have both versions installed at the same time).
In the dev build there is a snapping indicator on the screen (little purple cross) that appears at the point where the snapping occurs so you can tell what node snaps to what. Snapping isn't instant to give more flexibility, hold the object near the ideal position and it will soon snap to the nearest snapping point. You can control what object node should snap by grabbing the object (with Selector tool) near to that node, nodes that are closest to the place where you grabbed the object have advantage.
You can also try a different more advanced function plotter, where you can better control the formula and then import that drawing into Inkscape. What OS are you on? On Linux there are many nice plotters you can use that export to svg.
In the dev build there is a snapping indicator on the screen (little purple cross) that appears at the point where the snapping occurs so you can tell what node snaps to what. Snapping isn't instant to give more flexibility, hold the object near the ideal position and it will soon snap to the nearest snapping point. You can control what object node should snap by grabbing the object (with Selector tool) near to that node, nodes that are closest to the place where you grabbed the object have advantage.
You can also try a different more advanced function plotter, where you can better control the formula and then import that drawing into Inkscape. What OS are you on? On Linux there are many nice plotters you can use that export to svg.
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: aligning curves
I'm on Debian Lenny. I try as far as I can to stay with the official repo. But I won't mind trying out a newer version.
Preferably, I would like the curves to be correct, right from the plotter. I'm close now, but only correct is good enough. However, the amplitude is affected.
So far, I have Xfig, Scilab and Maxima installed. There is of course a lot to learn before I can make use of them.
Preferably, I would like the curves to be correct, right from the plotter. I'm close now, but only correct is good enough. However, the amplitude is affected.
So far, I have Xfig, Scilab and Maxima installed. There is of course a lot to learn before I can make use of them.
Re: aligning curves
I think you should try KmPlot, it's very simple to use, it does everything you need and you'll do it much faster than in Inkscape. All the others you mentioned and some you didn't mention are just overkill for what you're trying to do.
KmPlot also has the option to save as svg so you can edit it in Inkscape if necessary. You can install it from the usual repo.
KmPlot also has the option to save as svg so you can edit it in Inkscape if necessary. You can install it from the usual repo.
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: aligning curves
you should be able to do it adding an offset into the equation in the function plotter shouldnt you?
Re: aligning curves
@prkos
That looks exactly like what I ought to be using. But it has a big K in front of the name. Somehow, it makes me think it is a KDE tied piece of software. I would rather keep struggling.
@Simarillus
I mentioned above that I tried passing parameters to the formula. I have yet to figure out the proper way to do it.
sin(x) - is pretty straightforward
sin(x+120) - should affect the curve in the X axis as far as I understand. And it does. Now, how to find the right value and to make it not affect the amplitude, is another matter.
2sin(x) - shifts the curve on the Y axis.
And I need to know/understand how it works and be certain of which value is right, so I probably need to delve into radians.
I want to learn how to make use of the overkill programs anyway, so it's just a matter of time. Once, I tore my hair with Openoffice.org and Inkscape too (still do at times) ...
That looks exactly like what I ought to be using. But it has a big K in front of the name. Somehow, it makes me think it is a KDE tied piece of software. I would rather keep struggling.
@Simarillus
I mentioned above that I tried passing parameters to the formula. I have yet to figure out the proper way to do it.
sin(x) - is pretty straightforward
sin(x+120) - should affect the curve in the X axis as far as I understand. And it does. Now, how to find the right value and to make it not affect the amplitude, is another matter.
2sin(x) - shifts the curve on the Y axis.
And I need to know/understand how it works and be certain of which value is right, so I probably need to delve into radians.
I want to learn how to make use of the overkill programs anyway, so it's just a matter of time. Once, I tore my hair with Openoffice.org and Inkscape too (still do at times) ...
Re: aligning curves
It does come with KDE but what do you mean by tied? You don't need to have KDE desktop environment to use any KDE program, dependencies will be resolved while installing, only libraries needed by this program will be pulled in. I'm on Gnome and I use a bunch of "K programs" because they are much better than their Gnome counterparts. Just search for KmPlot in your repo and try it out
360deg = 2pi rad
this is full circle, full function period and it won't affect the phase, the plot will look the same sin(x)=sin(x+2pi)
try adding 1/2pi and then pi to the sine argument and see how it affects the phase difference (moves along x) - sin(x + 1/2pi) and sin(x + pi)
The amplitude of such formulas is always 1, as long as the number multiplying the sine is 1
2sin(x) shouldn't shift the curve, it only increases the amplitude (by the factor of 2)
To shift the curve along y-axis you need to add or subtract 4 + sin(x)
Those big programs are heavy on maths, so I think you need to play with maths first before you start learning the applications. Your teachers told you you'd need maths didn't they
360deg = 2pi rad
this is full circle, full function period and it won't affect the phase, the plot will look the same sin(x)=sin(x+2pi)
try adding 1/2pi and then pi to the sine argument and see how it affects the phase difference (moves along x) - sin(x + 1/2pi) and sin(x + pi)
The amplitude of such formulas is always 1, as long as the number multiplying the sine is 1
2sin(x) shouldn't shift the curve, it only increases the amplitude (by the factor of 2)
To shift the curve along y-axis you need to add or subtract 4 + sin(x)
Those big programs are heavy on maths, so I think you need to play with maths first before you start learning the applications. Your teachers told you you'd need maths didn't they
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: aligning curves
I could start a rant about my strong opinions about KDE, Gnome and so forth, but it would be rather off topic. I just feel disturbed by having to have large chunks of software in an otherwise minimalistic system (though it isn't really minimalistic anymore). Well, it turned out, I have so much of it installed already, that only two small packages were needed to get Kmplot (only because I want to use Piklab ...). I don't want Gnome either, but I DO want to use Evolution. Ok, there was a bit of a rant anyway. Satisfied? I have more. But it is tough to get the worms back in the can once I open it.
Anyway, I will document my experiments regarding functions when I have finished the project I am on and can get back to my own. I remember that the Samples parameter gave totally weird results. I did try quite a few combinations. Expect updates.
I have been a teacher myself, and I taught electrics, electronics, Linux and a few other topics, math is a big part of it. That is why I am gathering my learnings in a document for my former collegues and interested friends. If you want a copy, let me know (it's in Swedish however, except for the OOo-Writer doc, which is now outdated). My math skills are ok, but rusty.
Anyway, I will document my experiments regarding functions when I have finished the project I am on and can get back to my own. I remember that the Samples parameter gave totally weird results. I did try quite a few combinations. Expect updates.
I have been a teacher myself, and I taught electrics, electronics, Linux and a few other topics, math is a big part of it. That is why I am gathering my learnings in a document for my former collegues and interested friends. If you want a copy, let me know (it's in Swedish however, except for the OOo-Writer doc, which is now outdated). My math skills are ok, but rusty.
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: aligning curves
Just had a play, you can create what your after using the function plotter by doing the following:
1) create a rectangle and duplicate it twice
2) select one, do function plotter, select multiply range by 2 pi and turn off polar co-ords, use the eq sin(x)
3) select another rect, use the same settings but the equation sin(x+(2*pi/3))
4) select the last rect, and use the equation sin(x+(4*pi/3))
should give you 3 sin waves each 120 degrees out of phase. If you want more cycles then change the x range in the function plotter to a top limit greater than 1
Hope that helps
Sim
1) create a rectangle and duplicate it twice
2) select one, do function plotter, select multiply range by 2 pi and turn off polar co-ords, use the eq sin(x)
3) select another rect, use the same settings but the equation sin(x+(2*pi/3))
4) select the last rect, and use the equation sin(x+(4*pi/3))
should give you 3 sin waves each 120 degrees out of phase. If you want more cycles then change the x range in the function plotter to a top limit greater than 1
Hope that helps
Sim
Re: aligning curves
I'm back, reporting on my findings.
Simarillus presented a set of functions that looks very right to me. I have no real doubt as to the phase. But the amplitude is really not the same for all of them.
And the multiply by 2pi ... no, that's just totally wrong.
I have screenshots for all of them with the functions in the function editor to back it up. Should I report a bug?
Simarillus presented a set of functions that looks very right to me. I have no real doubt as to the phase. But the amplitude is really not the same for all of them.
And the multiply by 2pi ... no, that's just totally wrong.
I have screenshots for all of them with the functions in the function editor to back it up. Should I report a bug?
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: aligning curves
the multiply by 2 option just means that X is a nice regular integer that is the number of cycles. It will work just as well if you turn that off and set the range to 0 to 2*pi, its just a little less instantly readable.
As for the amplitude, it should be the same, and was close enough I didnt notice a difference in my playing, but I cant honestly say I was paying that much attention
Those screen shots are too small to read to see what your trying to show with them by the way.
As for the amplitude, it should be the same, and was close enough I didnt notice a difference in my playing, but I cant honestly say I was paying that much attention
Those screen shots are too small to read to see what your trying to show with them by the way.
Re: aligning curves
Should, and is, does not match at all. No one is more sorry about that than I am. I am however, very grateful for all the help I've got so far.
In my case, the multiply by 2pi makes the amplitude cyclic. The Samples parameter, as mentioned earlier in the thread, also makes for great weirdness.
Sorry about the screenshots too. I really did think that the full image would come up if clicking on them, and I have seen pictures far too large for forums before. I'll be happy to post all the five screenshots if there is a chance of it being helpful.
Any which way, all that seems to be straight, is the 120 degree phase shift, but now I'm a bit cautious about that as well.
In my case, the multiply by 2pi makes the amplitude cyclic. The Samples parameter, as mentioned earlier in the thread, also makes for great weirdness.
Sorry about the screenshots too. I really did think that the full image would come up if clicking on them, and I have seen pictures far too large for forums before. I'll be happy to post all the five screenshots if there is a chance of it being helpful.
Any which way, all that seems to be straight, is the 120 degree phase shift, but now I'm a bit cautious about that as well.