
2 Nov
2015
2 Nov
'15
1:16 a.m.
On 29/10/2015, at 10:01 pm, martin
Hello all,
I hope this is not a too silly question. It goes like this:
Suppose I have a shape defined as
(x,y,z) -> Bool
how can I find a Point inside this shape?
What are x, y, z? Consider a simplified case: (Natural, Natural) -> Bool You can search (0,0) (1,0), (0,1) (2,0), (1,1), (0,2) (3,0), (2,1), (1,2), (0,3) ... and if the shape is not empty you'll find some point in it. For 3D, consider (0,0,0) (1,0,0) (0,1,0) (0,0,1) (2,0,0) (1,1,0) (1,0,1) (0,2,0) (0,1,1) (0,0,2) ...
Obviously I could iterate through all possible x,y and z, but this appears very expensive.
Yes it is, but if that's _all_ you know about a shape ... What if the shape is empty?