Problem while writing function

Hello guys, how are you? I’m having a hard time while trying to write down this kind of function in grasshopper. Also, once i get that done, is there any posibility of parametrizing that funcion between two points. Sorry for my bad English. Thanks

“This” function?
What function?
All you posted is a picture.

Can you explain in detail what’s going on?

the red one, its called “c”. When i write it down in a grasshopper battery, it seems as it is written wrongly

basically, how to write properly a conic function in grasshopper

-0.17 x^2 -3.49 x y -0.21 y^2 +9.26 x=0

To be clear, you want to draw the curve belonging to this equation?

Short answer; you can’t.

Long answer and a new hope; you can create (or at very least approximate) curves associated with explicit functions. That is, a curve whose locus is in the form (x, f(x)) or more generally (x(t), y(t)) where t is called the parameter and x(t) and y(t) are the functions which map the parameter value onto x and y coordinates respectively.

For example, to draw the standard sine wave, substitute these function: x(t)=t, y(t)=\text{sin}(t).

Your function is not explicit, it’s implicit. Meaning the locus of the curve isn’t parametrised, but defined as the set of all points whose x and y coordinates satisfy a certain equality.

What you can do is test for a specific point whether it’s on the curve or not, but there’s no good way of finding these points, let alone find them in the correct order.

Your possible options going forwards are:

  1. Convert your function into an explicit one. This is sometimes possible, sometimes not. It’s never easy in my experience.
  2. Convert your function directly into a Nurbs curve. Technically Nurbs curves can exactly represent conic sections, no approximation required. But I’m not sure how to do this, well beyond my pay grade. You can consider asking the math-heads in the rhino developer category.
  3. Approximate your curve by creating a flat mesh grid, evaluating your function value at each mesh vertex, assign the result to the z-coordinate, and ultimately intersect your mesh at z=0.0. I’ve taken this approach before and it works, but yields a polyline approximation of the actual curve.

Have a look at this discussion.

1 Like

Thank you very much for the time David, i’ll try it. Again, thanks

Can you share your geogebra file (165.2 KB)

Try this function , created in Geogebra using Fit poly and your points C E D G

((x+2.9)/(x+2.97))+1.84 (8.7 KB)

1 Like

Thank you so much. This is what i’ve been looking for for hours. However, i dont know if it’s because a computer problem but i only see a line. But i understood what you made, thank you.