Integral evaluation in an alphashape

조회 수: 4 (최근 30일)
berk can acikgoz
berk can acikgoz 2020년 3월 11일
편집: Matt J 2020년 3월 12일
I have an alphashape created by alphaShape function and an integral. Is there a way to evaluate this volume integral in the alpha shape? i.e. I have a function and I want to find the volume integral of this function in the shape defined by
x coordinates:
0
0.0107
0.0160
0.0101
y coordinates:
0
0
0
0.0106
z coordinates:
0
0.0101
0
0
  댓글 수: 5
berk can acikgoz
berk can acikgoz 2020년 3월 12일
It is actually a volume integral. Also it is a tetrahedral. I know how to integrate 3D but i dont want to since there are too many of these tetrahedrals and each time i will have to calculate the integration boundaries etc.
darova
darova 2020년 3월 12일
What about triangulation?

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2020년 3월 11일
편집: Matt J 2020년 3월 11일
Perhaps as follows. Here, shp refers to your alphaShape object.
fun=@(x,y,z) (x.^2+y.^2+z.^2).*shp.inShape(x,y,z);
range=num2cell( [min(shp.Points);max(shp.Points)] );
result=integral3(fun,range{:});
  댓글 수: 7
berk can acikgoz
berk can acikgoz 2020년 3월 12일
Integral is calculated allright. But it takes 182 seconds to evaluate the integral
Matt J
Matt J 2020년 3월 12일
편집: Matt J 2020년 3월 12일
If both versions give the same result, then go back to the first method (the fast one) and ignore the warnings.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by