Mathematical calculation in Inkscape
Hi,
I have the following code. I shows two half eclipses and one half disk. They represent 3 functions. I want to draw the function f1(x)+f2(x)+f3(x). Is there any exact way to do it in svg?
Thanks, Peng
<path transform="translate(200, 800)" d="M100,0 a100,100 0 0,0 -200,0 z" fill="red" opacity="0.5" stroke="black" stroke-width="1" id="path10935" /> <path transform="translate(100, 800)" d="M20,0 a20,60 0 0,0 -40,0 z" fill="blue" opacity="0.5" stroke="black" stroke-width="1" id="path10937" /> <path transform="translate(300, 800)" d="M20,0 a20,60 0 0,0 -40,0 z" fill="blue" opacity="0.5" stroke="black" stroke-width="1" id="path10939" /> <text x="100" y="700" dx="-20" font-size="30" fill="black" > f1(x) </text> <text x="200" y="700" dx="-20" font-size="30" fill="black" > f2(x) </text> <text x="300" y="700" dx="-20" font-size="30" fill="black" > f3(x) </text> <defs> <marker id="Triangle" viewBox="0 0 10 10" refX="0" refY="5" markerUnits="strokeWidth" markerWidth="4" markerHeight="3" orient="auto"> <path d="M 0 0 L 10 5 L 0 10 z" /> </marker> </defs> <path d="M80,800 h300" fill="none" stroke="black" stroke-width="3" marker-end="url(#Triangle)" /> <text x="380" y="800" font-size="30" fill="black" > x </text>
Hi Peng Yu,
I have the following code. I shows two half eclipses and one half disk. They represent 3 functions. I want to draw the function f1(x)+f2(x)+f3(x). Is there any exact way to do it in svg?
You hold down the shift key while you mark f1(x), f2(x) and f3(x). Then Path > Union. That's very simple - but perhaps you didn't mean this?
Regards, Hago
You hold down the shift key while you mark f1(x), f2(x) and f3(x). Then Path > Union. That's very simple - but perhaps you didn't mean this?
No, I didn't mean this.
Say f1(x)=sqrt(1-x^2), f2(x)=sqrt(1-(x-1)^2), f3(x)=sqrt(1-(x-2)^2), I want to plot f(x)=f1(x)+f2(x)+f3(x)=sqrt(1-x^2)+sqrt(1-(x-1)^2)+sqrt(1-(x-2)^2).
Thanks, Peng
On Tue, 19 Sep 2006, Peng Yu wrote:
Date: Tue, 19 Sep 2006 08:38:45 -0500 From: Peng Yu <pengyu.ut@...155...> Reply-To: Inkscape User Community inkscape-user@lists.sourceforge.net To: Inkscape User Community inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Mathematical calculation in Inkscape
You hold down the shift key while you mark f1(x), f2(x) and f3(x). Then Path > Union. That's very simple - but perhaps you didn't mean this?
No, I didn't mean this.
Say f1(x)=sqrt(1-x^2), f2(x)=sqrt(1-(x-1)^2), f3(x)=sqrt(1-(x-2)^2), I want to plot f(x)=f1(x)+f2(x)+f3(x)=sqrt(1-x^2)+sqrt(1-(x-1)^2)+sqrt(1-(x-2)^2).
Not sure if that is possible - or even a good idea for Inkscape - but for starters you should look at "Effects, Render, Function Plotter".
"Right tool for the right job". I would strongly recommend you take a look at gnuplot or any mathematics or plotting software. When you have generated your complex plots you could then export as SVG or EPS depending on what your software allows and finish off your work in Inkscape.
The author of the Function Plotter effect clearly wants to expand this extension even futher and include many more features (so many that he wants to group them into seperate tabs, which was recently discussed on the developer mailing list). You might want to try and contact him and maybe try out newer versions of Inkscape for testing.
Sincerely
Alan Horkan
Inkscape http://inkscape.org Abiword http://www.abisource.com Open Clip Art http://OpenClipArt.org
Alan's Diary http://advogato.org/person/AlanHorkan/
Alan Horkan wrote:
The author of the Function Plotter effect clearly wants to expand this extension even futher and include many more features (so many that he wants to group them into seperate tabs, which was recently discussed on the developer mailing list). You might want to try and contact him and maybe try out newer versions of Inkscape for testing.
Alan,
Have you seen or used the new version of function plotter with tabs?
Aaron Spike
participants (4)
-
Aaron Spike
-
Alan Horkan
-
Hago Ziegler
-
Peng Yu