
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? Obviously I could iterate through all
Are there any alternative ways of finding points inside a shape? > > _______________________________________________ > Haskell-Cafe mailing
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 You could try to use a data structure like a kd-tree, which can find the nearest neighbours to your point quite efficient. On 10/29/2015 10:01 AM, martin wrote: possible x,y and z, but this appears > very expensive. > > There may be no point at all at x=0. With brute force iteration I would have no clue that the False I am receiving with > (0,1,1) is caused by x=0 and I may nedlessly try all combinations of y and z without ever receiving a True. list > Haskell-Cafe@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWMeMHAAoJEM0PYZBmfhoBcKUH/04/jSdP3660Ld1uWgK2P9BB iqAB4NnrRaCNbFNLSY6vNz1lFVm8p9ygxzZ4i+wfNbpa9V8tOvx2E2NJXaq/mLOr CDV9lS0LoQNWQCE41bH7QmEoK3ZiJjX1X0NolLpS2oBYhY1Jvwy/X8IUqoXAqZiu y+8CkExpJEL8dHmNXHwB4OmfRstRdcTumf/SVNhzwoHO+q+u8wz3d5PRSkCLSooB a5voFRdQpicfInzpW57+MHaQJtc1FtQ/+Ub4NQGh+rw5Npps/blQbvqgt/u1qcXL VwJqEonmF4T3NFxYAzfMR6rv/36MZcd39DK1+H2O5IrzIZXnXy007fw7irkiQ+0= =IIRy -----END PGP SIGNATURE-----