Closed daanhb closed 3 years ago
What are the use cases for approx_in
? I imagine that most use cases one knows that the point is already on the domain, so it would be more useful to have a custom type to enforce being in the domain, a la SphericalCoordinate
:
Using f(x)
to determine approx_in
won't be very robust for "bad" f
. One would ideally use the hausdorff distance but that is hard to compute. So perhaps it's fine since I don't think it needs to be used much.
Well, at least the domain abs(f(x)) < epsilon
can be generically defined. It does require some assumptions on f
for it to be called approx_in
in any intuitive way, so it may not be a good idea.
It could be useful for an approximate plot of the domain, for example, if a bounding box is known. If we can't do anything with a level set generically in DomainSets
except defining it, is that worth it?
If possible, then something like SphericalCoordinate
is better, but of course that is not generic. Should we include that inside DomainSets
?
Currently, I did not implement approx_in
, because it is not generically true. The functionality is in the pseudolevel
function, which is not exported. We can decide what to do with it later.
The level set of a function satisfies
f(x)=0
, thein
function could be defined asf(x) <= 0
. An approximateapprox_in
could then be defined asf(x) <= epsilon
.