There seem to be some serious performance issues in the polys here. I was unable to even compute the degree of the polynomial under the square root.
Do you know if this integral has a closed form? If so, my only suggestion would be to try some change of variable to make it easier to compute. Aaron Meurer On Fri, Apr 29, 2016 at 7:22 AM, Davis Vigneault <[email protected]> wrote: > All-- > > I'm a new user of sympy, and have been really impressed by how easy it is to > get started. :-) However, I recently came across a problem that's been > causing sympy to hang, and am not sure whether (a) it is an intractable > problem that sympy simply can't solve, (b) there is some hint I could give > sympy which would let it proceed, or (c) I just need to let it run for a > week. Specifically, I'm trying to compute the surface area of a quartic > triangle Bezier patch. The way this works is that you have fifteen control > points (X, a 15 x 3 matrix) and a corresponding fifteen basis functions (b, > a vector length fifteen, in terms of parameters s and t). The position for > a given s and t is given by X^T b. I'm trying to solve for a general patch, > X is a matrix of yet unknown constants. The surface area can be found by > evaluating a pretty intense double integral [1], which is what's giving > sympy trouble. > > I've attached the script I'm using--I'd be infinitely grateful if someone > with more experience could offer any advice! > > Best, and thanks to everyone who has contributed to this invaluable > software! > > --Davis > > P.S. I've added a guard to the beginning of the script because when I ran > this with 0.7.4 (default for Ubuntu 14.04 when installing with apt-get) it > resulted in unbounded memory use and crashed my machine--happily, updating > to the development branch fixed this. > > [1] https://en.wikipedia.org/wiki/Parametric_surface#Surface_area > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/1488db59-35b6-4fe9-a602-501f304e82b6%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6L15DRohz-w6i%2BgSvCK%3D-9yhMen%3DTjENDVT42eBRaF29Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
