Grasshopper

algorithmic modeling for Rhino

I want to create a definition that would allow me to create Cartesian ovals. I have not done anything this mathematically advanced in grasshopper yet and i dont really know where to start. would i create a script or could i do it with components?

 

http://en.wikipedia.org/wiki/Cartesian_oval

http://www-history.mcs.st-and.ac.uk/Curves/Cartesian.html

http://torus.math.uiuc.edu/eggmath/Shape/descartes.html

http://mathworld.wolfram.com/CartesianOvals.html

 

 

Attached is my attempt at doing this based on the Wikipedia article.


Views: 930

Attachments:

Replies to This Discussion

Here's a definition that accomplishes it without scripting. I'm using the form of the equation N*D1 + M*D2 = K. Given N, M, and K, we assume a value for D1, and solve for D2. This yields the equation D2 = (K-(D1*N))/M. It is possible to construct two points that satisfy this equation by finding the intersection of two circles: one with radius D1, centered at point 1, and one with radius D2, centered at point 2. This process is repeated for a large number of possible values for D1 (set up by the range component in the definition). All valid intersections are points on the curve (and this is verified by testing the conditions of the initial equation for each point). Finally, to construct a curve through the points, I use Danny Boyes's clever perimeter sort to put the points in an order for an interpolated curve. 

 

I hope this is reasonably clear! Let me know if you have any questions. 

 

 

Attachments:

Andrew,

 

Thanks for posting this.  I had the notion of the method but couldn't quite see the details.  It's nice to see I was on the right track.

 

Chris

thanks i was wondering about two vs. three foci though. some of the websites describe the cartesian oval as having three foci. your has A and B

 

i am trying to achieve various curves like the ones here in "figure D", including the concave ones  http://img.tfd.com/ggse/a5/gsed_0001_0014_0_img3314.png

maybe to do this it would have to interpolate the curves in way that the second point subtracts form the first rather than add to become  an oval?

this example also has 3 foci: F1 F2 F3

 thanks for any help u can give

 

As the wikipedia article you linked to states, the third focus is not used to generate the curve, but merely a property of the curve: for a cartesian oval defined by two points, there is a third point along the same line such that the same oval will be defined by any two of those three points. This means it might be possible to solve for the third focus, but it will not change the generation of the curves. 

 

As far as the concave shapes, I have absolutely no idea.

thanks. i think the concave shapes im looking for are examples of "pascal's limacon"

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service