Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: Bobboau on May 19, 2006, 06:34:17 am

Title: math talk, jacobian integration of a triangular reagon
Post by: Bobboau on May 19, 2006, 06:34:17 am
ok, so I have recently taken a renewed interest in a math problem I have been trying to solve on and off again for the last few years, my current stratigy involves useing a jacobian transformation.

so I need to integrate over an area defined by three 2d points on the xy plane, normaly this will cause me to split the integration into two parts (if I define point one (p1) as the furthest to the left and point three (p3) as the furthest to the right in the vast majority of cases I will have to integrate (between the lines l1 (the line formed from p1to p2) and l3 (p1 to p3)) from p1 to p2, then (between l2 (the line from p2 to p3) and l3 (p1 to p3)) from p2 to p3).
you can see how this gets ugly fast, especaly with the relitively ugly value I'm integrateing

so I'm thinking if I made a jacobian transformation that mapped the line from p1 to p3 as the 1 along the u axis and the line p1 to p2 as 1 along the v axis, then all I'd need to do was integrate from 0 to 1 (du) and 0 to 1-v (dv) (this leaves the integration in Z alone, though I'd probly have to translate z into uv terms rather than the xy terms).
but it's been a year or so sence I last had any major math and we only just touched on jacobians in the classes I did have, so I'm a bit fuzzy ATM, does anyone want to try to help me with this?
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Colonol Dekker on May 19, 2006, 07:04:50 am
What do you mean integrate, Has it something to do with integral values? BTW, you meant Region right? otherwise i have no idea what a Reagon is :D
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Bobboau on May 19, 2006, 07:11:37 am
yeah, I traded spelling AP for more math AP
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Colonol Dekker on May 19, 2006, 07:20:42 am
sO this is nothing like A2 + B2 = C2, (Pythagoral Theorum?) let me know if im going off in completely the wrong direction here Bobbau  :wtf: :eek2:
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Bobboau on May 19, 2006, 07:27:10 am
ok, I need to integrate six diferent equasions (x*y,x*z,z*y,x^2+y^2,x^2+z^2,z^2+y^2) in a volume defined as under a triangle defined by three points. that's the overall problem.

and no I don't think the pythagorean therom is going to be of mcuh use to us here.
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Colonol Dekker on May 19, 2006, 07:51:25 am
"Colonol Dekker looks blankly at Bobbau and wishes that he understood" Maybe i could do something simpler like play with a small rock.  :confused:
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: CP5670 on May 19, 2006, 11:53:20 am
You have the right idea, you basically just need to transform the integration domain into a right triangle and use the change of variables theorem. If the triangle is composed of the segments ax+by=1, from (x1, y1) to (x2, y2) and cx+dy=1 from (x2, y2) to (x3, y3) (the third segment doesn't matter), then you get something like

integral[f(x,y) on triangle] = integral[|ad-bc| f(ax+by, cx+dy), {x, h(x1, y1), h(x2, y2)}, {y, h(x2, y2), h(x3, y3)} ]

where h(x,y)=(dx-by,-cx+ay)/(ad-bc)  (just the inverse).

well, I might have missed some constant or something (can't be bothered to check everything :p), but you get the idea.

[edit] Actually, on second thought a more straightforward approach might be to take the integral over the smallest square containing the triangle, and then just subtract out the three extra right triangle integrals to get the original triangle.
Title: Re: math talk, jacobian integration of a triangular reagon
Post by: Polpolion on May 20, 2006, 04:56:04 pm
Ugh... man, and I thought complete facorization of polynomials was hard!