generative modeling for Rhino
I would like to calculate the derivatives (fx, fy, fxx, fxy, fyy) of a surface f(x,y) which is defined using SrfGrid. Thanks to the method Ev2Der, I'm able to calculate du, dv, duu, duv, dvv. But these quantities are defined as vectors while I'm waiting for a scalar. I'm looking for a way to convert the vectors to a scalar value.
After some exchanges and discussions I'm able to calculate fx & fy using du & dv, but I get stuck in calculating the others derivatives. Could you help me?
Find below an example with a function f(x,y) = x^3 - 3*x*y^2 for which the theoretical derivatives are easily calculable.
Thank for your help
I didn't quite know what to do with Ev2Der results, so I tinkered a pure GH solution.
(J'ai un doute sur fxy mais les dérivées secondes semblent être correctes, en tout cas ça fonctionne avec cet exemple)
PS: if the surface hasn't an equation, the curves dx dy and dxy around the chosen point can be directly obtained with brep/plane intersection.
Thank you very much for your answer. I'm sure we can get the result in this way but I'm worried about the calculation time. May be a finite difference approach may be used.
PS : I'm quite impressed by your website. Where are you in France?
The slider which is set at 50 (number of points to interpolate curves) can be lowered a lot to minimize calculation times, while keeping decent accuracy.
But I don't quite know how many of these derivatives you need to calculate, so it is probably safer to try another approach.
We are located in Rennes, and myself near Nantes at the moment.