The binary cubic equation represented fit curve

Hi, I want to obtain one interpolate curve, which is a fit curve represented by the binary cubic equation.

Which is,
y = 0.4 * pow(z,3) * pow(10,-6) -0.3 * pow(z,2) * pow(10,-3) -0.2 * z * pow(10,0) + 0.4 * pow(10,-5),
and (x = 0, z from 500 to 600)

How can I get it use grasshopper.

Thanks for your attention.

Iā€™ve tried it using this way, but Iā€™m not sure whether itā€™s correct or not.

which imitated the method from [Joseph_Oster] with the post(The curve generated with mathematic function - #5 by Joseph_Oster).

That doesnā€™t look right? Do you need parentheses around these terms?

  • pow(10,-6) -0.3
  • pow(10,-3) -0.2
  • pow(10,0) + 0.4

Where is your GH code file?

Why does your Eval component have all those inputs if they arenā€™t used in your expression?

1 Like

Sorry, here is the test file.
TestFile_0208.gh (10.2 KB)

Here is the preview of .PH file.
image

Why is Z and input when itā€™s supposed to be the result of the expression?

Solved already? :man_facepalming: Please post the solution so others can learn.

Hi, Oster.
I want to obtain the curve segment (z from 500 to 600).
So I tried to set the domain value.

It looks like the curve I want to get.

Please post the solution so others can learn. Donā€™t mark a thread ā€œSolvedā€ without sharing the solution!

So the ā€˜xā€™ input to Eval is not used?

I was thinking something like this but the result makes no sense. Just a waste of time. :roll_eyes:

waste_of_time

2 Likes

Thanks for your help, Joseph.

What did I say that was helpful?

Without any working code being posted, do you think anyone learned anything from this thread?

Hi, I think your answer is really helpful.
And the initial code has been posted here several hours ago. (The binary cubic equation represented fit curve - #4 by Shihang_Zhang)

In this post you have modified the batteries before ā€œEvalā€, and remind me of " the ā€˜xā€™ input to Eval".
(The binary cubic equation represented fit curve - #9 by Joseph_Oster)

Iā€™ve tried to run the code after modified you mentioned, and everything goes well.

So, I truly appreciate your help.

Iā€™m glad you are happy. The initial code wasnā€™t posted when you started the thread, I had to ask for it. What Iā€™ve been asking since then is where is the ā€œfinalā€ code that solves the issue?

What was the ā€œSolutionā€? It canā€™t be Range? Was it adding parentheses?
What is the point of this expression/function? The result Iā€™ve seen is not interesting at all.

Hi Oster, I apologize for my rudeness and any distress I may have caused you.
Iā€™m new to this forum and donā€™t really get the mechanics here.
I sincerely thank you for helping me to learn a lot.

And yet you still havenā€™t posted the ā€œfinalā€ file or answered my questions. I donā€™t think I can explain it again. Many people every day are new to GH and the forum. Many expect answers without posting a GH file. Those who find this thread hoping to learn something will be disappointed.