j. van den hoff
2013-Nov-08 13:01 UTC
[R] how to derive true surface area from `computeContour3d' (misc3d package) -- follow up
regarding my previous mail for this topic, I have in the meantime identified my misconception. actually, `computeContour3d' returns the vertices just fine in the correct coordinate frame. the misconception was caused basically by assuming that the `level' argument was a fractional threshold relative to the maximum of the array. so I believed that the rendered cube actually is the "outer surface" of the defined object in the example provided in the manpage. I know understandt it's an absolute level and `example(computeContour3d)' consequently displays some "interior" isocontour. this explains all my apparent errors. I believe the manpage would benefit from a slight clarification that `level' actually is an absolute, not a relative/fractional threshold. apologies for the noise. j. ps: it of course would still be nice, if the surface area (or a vector containing the individual triangle areas) were returned to the caller as well ...
Barry Rowlingson
2013-Nov-08 14:32 UTC
[R] how to derive true surface area from `computeContour3d' (misc3d package) -- follow up
On Fri, Nov 8, 2013 at 1:01 PM, j. van den hoff <veedeehjay at googlemail.com> wrote:> ps: it of course would still be nice, if the surface area (or a vector > containing the individual triangle areas) > were returned to the caller as well ...Does the 'surfaceArea' function in the sp package do what you want? It's Edzer's integration of an R function that I wrote that calls some C code that someone else wrote that implements an algorithm from 2004. You just need to coerce your grid data into the right form. Barry