Generating objects using cartesian equations ?
Generating objects using cartesian equations ?
Hi
I have a problem : I've use Inkscape for years now, and I've never had anything to say about how wonderful it works for what I do.
BUT. I'm weird. And today, I need a peculiar something that I can't find anywhere. I'm drawing a map of a world I conceived in my mind, but this map is not just a map. It's based on a set of geometrical objects, such as a triangle and some lines. BUT I want to use two other objects which aren't rectangles, circles, or anything that is named anywhere. BRAND NEW !
I love mathematics, that's why I've took something like 10 minutes to describe them using their equation :
Why do I show these equations ? Well, it's my problem : Is there a way to create an object based on its equation ?
Example : The object 3x + 2y + 1 = 0 would display a line. (x-2)² + (y-3)² = 5² would display a circle.
Just asking, that would help a lot since I can't create an object that looks like what I want, it has to be really exact. The feature I'm looking for would avoid me looking for thousands exact point to get something really really precise ^^"
I have a problem : I've use Inkscape for years now, and I've never had anything to say about how wonderful it works for what I do.
BUT. I'm weird. And today, I need a peculiar something that I can't find anywhere. I'm drawing a map of a world I conceived in my mind, but this map is not just a map. It's based on a set of geometrical objects, such as a triangle and some lines. BUT I want to use two other objects which aren't rectangles, circles, or anything that is named anywhere. BRAND NEW !
I love mathematics, that's why I've took something like 10 minutes to describe them using their equation :
Why do I show these equations ? Well, it's my problem : Is there a way to create an object based on its equation ?
Example : The object 3x + 2y + 1 = 0 would display a line. (x-2)² + (y-3)² = 5² would display a circle.
Just asking, that would help a lot since I can't create an object that looks like what I want, it has to be really exact. The feature I'm looking for would avoid me looking for thousands exact point to get something really really precise ^^"
Re: Generating objects using cartesian equations ?
Extensions-> Render-> Function Plotter
Or.
Extensions-> Render-> Parametric Curves
should do what you want (I think)
Draw a rectanlge first, then open the extention(s) and enter your equation.
Or.
Extensions-> Render-> Parametric Curves
should do what you want (I think)
Draw a rectanlge first, then open the extention(s) and enter your equation.
Re: Generating objects using cartesian equations ?
Thanks for the answer, I did not know these features .
I tried the first one, but it only renders functions of the type y = f(x). The example of my first equation is an "ellipse" using three instead of two foci, and thus this isn't a function. It's the same for the second equation : not a function. Thus the Function Plotter cannot render these equations as is, and I don't even know how and if I could get back to y = f(x) functions which would render completely (would need two or three functions depending on the situations).
The Parametric Curves extension could be a solution, but this way I have to find the parametric equations for my objects. I've tried but didn't find anything technically valuable. I keep looking for it anyway .
I tried the first one, but it only renders functions of the type y = f(x). The example of my first equation is an "ellipse" using three instead of two foci, and thus this isn't a function. It's the same for the second equation : not a function. Thus the Function Plotter cannot render these equations as is, and I don't even know how and if I could get back to y = f(x) functions which would render completely (would need two or three functions depending on the situations).
The Parametric Curves extension could be a solution, but this way I have to find the parametric equations for my objects. I've tried but didn't find anything technically valuable. I keep looking for it anyway .
Re: Generating objects using cartesian equations ?
You could also try one of the sugestions on this page:
http://en.wikipedia.org/wiki/Wikipedia: ... a_articles
http://en.wikipedia.org/wiki/Wikipedia: ... a_articles
Re: Generating objects using cartesian equations ?
Welcome to InkscapeForum!
I enjoy math too, but when I was in school and college, I was afraid of it. So I never got past Calculus, and only took that because it was a requirement for my degree. And I've long since forgotten most of that. Oh if only we could start life with the wisdom we gain by living it!
So anyway, I only generally follow your problem, and probably can't give you any helpful comments. But I'm curious I understand that the equation describes an object. And I understand x and y, and cartesian coordinates. But what is R?
I was doing some quick research via Wikipedia, and found "cartesian oval". Is that anything similar to what you're doing? The article does give a sample equation, and it looks somewhat similar to yours (stressing "somewhat"), but doesn't contain or define R. (http://en.wikipedia.org/wiki/Cartesian_oval)
I enjoy math too, but when I was in school and college, I was afraid of it. So I never got past Calculus, and only took that because it was a requirement for my degree. And I've long since forgotten most of that. Oh if only we could start life with the wisdom we gain by living it!
So anyway, I only generally follow your problem, and probably can't give you any helpful comments. But I'm curious I understand that the equation describes an object. And I understand x and y, and cartesian coordinates. But what is R?
I was doing some quick research via Wikipedia, and found "cartesian oval". Is that anything similar to what you're doing? The article does give a sample equation, and it looks somewhat similar to yours (stressing "somewhat"), but doesn't contain or define R. (http://en.wikipedia.org/wiki/Cartesian_oval)
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Generating objects using cartesian equations ?
Explore the use of "GeoGebra"..... @ Geogebra.org
Another open source application that may do what you want.
Another open source application that may do what you want.
Re: Generating objects using cartesian equations ?
tomh & GAngus: I already have a representation of my objects which can be seen here with different parameters examples (I used Giac-Xcas). I was looking for a feature that would allow me to create them and edit their parameters directly in Inkscape, instead of using another program and manually layering the render.
brynn: Well, it's quite simple. I based my first equation on the definition of an ellipse, which is "the locus of all points of the plane whose distances to two fixed points add to the same constant" (from Wikipédia). So if we consider A and B the two foci of the ellipse, and M a point on the ellipse, then we have MA + MB = k, with k > 0 which is arbitrary defined.
Now I decided to consider three foci, A, B and C. Thus I have MA + MB + MC = k. Then I just expressed the lengths MA, MB and MC as seen in the equation given in my first post. the R of my equation is merely the k constant, since k seemed odd to me, and I choose R as analogy to the equation of a circle (which is only an ellipse with a single focus).
To put it all in a nutshell, I generalised the equation of a circle to a "n-ellipse", an ellipse with n foci, and kept the notation R(adius) to name the constant .
As this feature doesn't seem to exist yet, do someone think it would be useful, or my case is too marginal to consider working on it xD ?
brynn: Well, it's quite simple. I based my first equation on the definition of an ellipse, which is "the locus of all points of the plane whose distances to two fixed points add to the same constant" (from Wikipédia). So if we consider A and B the two foci of the ellipse, and M a point on the ellipse, then we have MA + MB = k, with k > 0 which is arbitrary defined.
Now I decided to consider three foci, A, B and C. Thus I have MA + MB + MC = k. Then I just expressed the lengths MA, MB and MC as seen in the equation given in my first post. the R of my equation is merely the k constant, since k seemed odd to me, and I choose R as analogy to the equation of a circle (which is only an ellipse with a single focus).
To put it all in a nutshell, I generalised the equation of a circle to a "n-ellipse", an ellipse with n foci, and kept the notation R(adius) to name the constant .
As this feature doesn't seem to exist yet, do someone think it would be useful, or my case is too marginal to consider working on it xD ?
Re: Generating objects using cartesian equations ?
Thanks for explaining, Torajio.
As far as the artist community goes, I don't think such a feature would get much use. But there are a few other extensions used by several different fields of science (I'm lumping mathematics into the science category here) that I doubt artists use much either. (i.e. - L System, Parametric Curves, Function Plotter, 3D Polyhedron, et al) (I absolutely love the Spirograph extension!) Personally I think it would be a nice addition to Inkscape, provided it would contain instructions and hopefully examples (for most of us who don't have serious math skills, lol).
That said, if there are any other programs out there, which provide such a feature, I'm guessing that developers would not take much interest. But if Inkscape were the only program offering this, I'm guessing it would more worthwhile.
I wonder if such a feature could be added to the Function Plotter? I know you said your is not a y=f(x), but isn't it still a function of sorts? Or would it fall into a different category?
As far as the artist community goes, I don't think such a feature would get much use. But there are a few other extensions used by several different fields of science (I'm lumping mathematics into the science category here) that I doubt artists use much either. (i.e. - L System, Parametric Curves, Function Plotter, 3D Polyhedron, et al) (I absolutely love the Spirograph extension!) Personally I think it would be a nice addition to Inkscape, provided it would contain instructions and hopefully examples (for most of us who don't have serious math skills, lol).
That said, if there are any other programs out there, which provide such a feature, I'm guessing that developers would not take much interest. But if Inkscape were the only program offering this, I'm guessing it would more worthwhile.
I wonder if such a feature could be added to the Function Plotter? I know you said your is not a y=f(x), but isn't it still a function of sorts? Or would it fall into a different category?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Generating objects using cartesian equations ?
x^2 + y^2 = r^2
becomes
f(x)=sqroot(r^2 - y^2)
But you only get half a circle as squares and square roots always produce positive result, so you mirror the result by f(x)=-sqroot(r^2 - y^2).
And you can do more fun things like antidifferentiate it several times so becomes an object with more than 3 dimensions, or apply matrix transformations, etc.
There's a firefox extension where you enter function in url bar and it produces svg plot.
The point of using inkscape for svg is to have human input into it to produce more than just calculated diagram/art...if all you need is some mathematics to generate basic svg shapes that fit a specific problem domain, it shouldn't be too difficult to generate the svg in scripting language of choice or a math/science package like "R", which can also generate the plots (and svg too if memory serves correct.) For the most part inkscape is not a particularly good tool for any precise mathematical work.
becomes
f(x)=sqroot(r^2 - y^2)
But you only get half a circle as squares and square roots always produce positive result, so you mirror the result by f(x)=-sqroot(r^2 - y^2).
And you can do more fun things like antidifferentiate it several times so becomes an object with more than 3 dimensions, or apply matrix transformations, etc.
There's a firefox extension where you enter function in url bar and it produces svg plot.
The point of using inkscape for svg is to have human input into it to produce more than just calculated diagram/art...if all you need is some mathematics to generate basic svg shapes that fit a specific problem domain, it shouldn't be too difficult to generate the svg in scripting language of choice or a math/science package like "R", which can also generate the plots (and svg too if memory serves correct.) For the most part inkscape is not a particularly good tool for any precise mathematical work.
Re: Generating objects using cartesian equations ?
Explore the use of "GeoGebra"..... @ Geogebra.org
Another open source application that may do what you want.
Wow, amazing tool.
It would be very nice to have similar features integrated on Inkscape
GAngus do you know if GeoGebra is able to export in a vector format?
Re: Generating objects using cartesian equations ?
Yes, (but a qualified, yes)
I tried a couple tests, for you.
I was able to "export" a file created by GeoGebra, both as an SVG and an EPS.
They each opened easily in Inkscape as a grouped object .
From there, I was able to "ungroup" each one into it's individual objects.
From there I guess you could... "rearrange" them, if desired but, you would
still not have any 'mathematical' control other than graphically (vector) being able to
edit it as you would any other Inkscape file.
GeoGebra seems to have ALL the math control YOU could possibly need with creating
your "maps" (as mentioned in your 1st post) so, perhaps, once you have done all the precision stuff in GeoGebra you could load THAT into Inkscape and finish it up there ?
Adding colors, text, etc....... and end up with' the best of both worlds'.
angus
I tried a couple tests, for you.
I was able to "export" a file created by GeoGebra, both as an SVG and an EPS.
They each opened easily in Inkscape as a grouped object .
From there, I was able to "ungroup" each one into it's individual objects.
From there I guess you could... "rearrange" them, if desired but, you would
still not have any 'mathematical' control other than graphically (vector) being able to
edit it as you would any other Inkscape file.
GeoGebra seems to have ALL the math control YOU could possibly need with creating
your "maps" (as mentioned in your 1st post) so, perhaps, once you have done all the precision stuff in GeoGebra you could load THAT into Inkscape and finish it up there ?
Adding colors, text, etc....... and end up with' the best of both worlds'.
angus
Re: Generating objects using cartesian equations ?
ok..but i also want gaussian plots (3d functions), with tweening frame animation capability. seriously, inkscape is not a graphing package..not with dynamic update anyway.
but maybe you could explain a bit more about the needs. specifically, the interplay between the map as a whole and this function plot. why does the function need to be continuously (?) tweaked in the life of this svg?
but maybe you could explain a bit more about the needs. specifically, the interplay between the map as a whole and this function plot. why does the function need to be continuously (?) tweaked in the life of this svg?
Re: Generating objects using cartesian equations ?
There is no real need to have a dynamically updated object. It would be fun as well. The need is to have a tool which allows to create an SVG object directly in the file using implicit plotting, instead of using another software. Even if I finally did it, but that's not very accurate. For the use I made of it, accuracy was actually not needed.
For other uses, such as truly mathematical ones, this could be a good point to have a simple "native" plugin. But thinking about it, if someone really NEEDS an implicit plotted curve, one shall already have a program to do so...
Well, I think we already have a function plotter, why not an implicit plotter so people like me can use it for weird uses ?
For other uses, such as truly mathematical ones, this could be a good point to have a simple "native" plugin. But thinking about it, if someone really NEEDS an implicit plotted curve, one shall already have a program to do so...
Well, I think we already have a function plotter, why not an implicit plotter so people like me can use it for weird uses ?
-
- Posts: 2
- Joined: Tue Sep 25, 2018 4:47 am
Re: Generating objects using cartesian equations ?
Torajio,
I found a free embroidery software package called Ink/Stitch which is an extension of InkScape. I have been using the Extensions>Render>Parametric Equations feature of Inkscape to generate single top thread, running stitch artwork for that embroidery. I was a Physics Major in college and I too appreciate artwork which comes exactly from equations. Basically, I have used conversions from polar coordinates to Cartesian coordinates to generate phase synchronized spiral equations which I then plug into Inkscape. I have done lots of these searching for ones that look good in embroidery. Some of the good ones have three fold radial symmetry so I still have some of my breadcrumbs lying around in case I decide that I want to implement them on my embroidery machine. One of them is visually close to what you have described. If you really love math a lot you can probably poke around with my expressions to see if you can use them to get a clue about how to express what you really want in parametric equations. I suspect that some of the trig transforms can get you from your equations to mine and vice-versa if you remove the spiral tweaks out of mine. I leave that as your challenge unless you want more hints.
This picture has the full set of values I used to generate the three lobed flower on the left with the Parametric Extension of Inkscape. You do have to draw a rectangle and select it before you push the button as others have mentioned. Notice that the outer silhouette has curves less tightly focused than the inner silhouette. You may want to see what intermediate turn of the spiral most closely matches your most symmetric triad of "ellipses" just for grins and giggles. I think you can get to the Parametric Equations you really want with some good mathematical thinking about what numbers control what features with my screenshot hint. Math is beautiful. Inkscape is a great artwork platform.
I have also expressed Quartic Bezier functions in parametric equations to generate some other embroidery artwork. A thing of beauty is a joy forever. Good luck on your quest. Oops ! My screenshot is to big for this forum so I have attached an svg file for you to look at and the Parametric Curves screen has the following values in order: 60.0, 420.0, -9.0, 9.0, -9.0, 9.0, 999, no boxes checked anywhere, and X-Function:
((t/(pi*pi*pi))+sin(3*t))*((cos(t)/(pi)))*2
and Y-Function:
((t/(pi*pi*pi))+sin(3*t))*((sin(t)/(pi)))*2
Draw a square, select your square, and hit the Parametric Curves "Apply" button.
____________________
thewildotter
I found a free embroidery software package called Ink/Stitch which is an extension of InkScape. I have been using the Extensions>Render>Parametric Equations feature of Inkscape to generate single top thread, running stitch artwork for that embroidery. I was a Physics Major in college and I too appreciate artwork which comes exactly from equations. Basically, I have used conversions from polar coordinates to Cartesian coordinates to generate phase synchronized spiral equations which I then plug into Inkscape. I have done lots of these searching for ones that look good in embroidery. Some of the good ones have three fold radial symmetry so I still have some of my breadcrumbs lying around in case I decide that I want to implement them on my embroidery machine. One of them is visually close to what you have described. If you really love math a lot you can probably poke around with my expressions to see if you can use them to get a clue about how to express what you really want in parametric equations. I suspect that some of the trig transforms can get you from your equations to mine and vice-versa if you remove the spiral tweaks out of mine. I leave that as your challenge unless you want more hints.
This picture has the full set of values I used to generate the three lobed flower on the left with the Parametric Extension of Inkscape. You do have to draw a rectangle and select it before you push the button as others have mentioned. Notice that the outer silhouette has curves less tightly focused than the inner silhouette. You may want to see what intermediate turn of the spiral most closely matches your most symmetric triad of "ellipses" just for grins and giggles. I think you can get to the Parametric Equations you really want with some good mathematical thinking about what numbers control what features with my screenshot hint. Math is beautiful. Inkscape is a great artwork platform.
I have also expressed Quartic Bezier functions in parametric equations to generate some other embroidery artwork. A thing of beauty is a joy forever. Good luck on your quest. Oops ! My screenshot is to big for this forum so I have attached an svg file for you to look at and the Parametric Curves screen has the following values in order: 60.0, 420.0, -9.0, 9.0, -9.0, 9.0, 999, no boxes checked anywhere, and X-Function:
((t/(pi*pi*pi))+sin(3*t))*((cos(t)/(pi)))*2
and Y-Function:
((t/(pi*pi*pi))+sin(3*t))*((sin(t)/(pi)))*2
Draw a square, select your square, and hit the Parametric Curves "Apply" button.
____________________
thewildotter
-
- Posts: 2
- Joined: Tue Sep 25, 2018 4:47 am
Re: Generating objects using cartesian equations ? Guide for Parametric Equations
Parametric Equations Guide (ca 2012)
I have found this nice guide by ragstian in old threads. It has several equation variations which are instructive. They demonstrate a lot about what equations achieve what shapes.
________________________
thewildotter
I have found this nice guide by ragstian in old threads. It has several equation variations which are instructive. They demonstrate a lot about what equations achieve what shapes.
________________________
thewildotter