Jump to content

Talk:Signed distance function

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Rather dubious definition

[edit]

The definition seems rather dubious. If , then (as given in the definition of f) with is always zero. Should probably be replaced with instead? Additionally, I've never seen the definition defining the inside of as positive, only the other way around. If no-one objects, I will make some edits in the next few days. 193.157.239.253 (talk) 10:16, 18 January 2016 (UTC)[reply]

Still dubious definition

[edit]

It seems that the sign chosen in this article for this distance function is the opposite as usual. This is the reason of adding a {{citation needed}} tag.

One strong reason for taking the opposite sign is that with the definition of the article, the signed distance is equal to the unsigned distance (minimum of the distance from a fixed point to a point in the set) only on the boundary. On the other hand, with the opposite sign, the two distances differ only in the interior. Moreover this definition contradicts the common intuition: for everybody, the distance from a point to a set is positive outside the set and needs a further convention inside the set. Who, except the author of this article would say that I am at a negative distance from the Moon? Similarly, the definition of this article would imply that the altitude of an aircraft would be negative, and the altitude of a submarine would be positive. Clearly the opposite of the usual conventions. D.Lazard (talk) 17:29, 25 April 2016 (UTC)[reply]

You're giving preference to being outside the object. You could give the same argument the other way around: if I am sitting inside a room, the distance to the nearest wall (the boundary of the room) "should" be positive from my perspective. The truth is that it probably doesn't really matter, as long as the convention is understood, similar to say, choosing an origin. Although, there may be application dependent reasons for using one convention or the other. In any case, I've added two citations to illustrate the use of both conventions. Hawkmoth-accent (talk) 16:52, 27 May 2016 (UTC)[reply]
I believe there is now a strong consensus among people writing SDF related papers/shaders/software for taking positive as outside.
I think it's fine to mention that one could choose to define it the other way round, and that some papers in the past have used that convention, but the article should start by describing it using the now widely agreed positive=outside. DanPiker (talk) 12:21, 25 June 2024 (UTC)[reply]
I agree. Moreover, with the convention interior=positive the signed distance equals the usual distance only on the boundary (where both disatnces are zero). With the convention interior=negative, signed and unsigend distanace are equal when the signed distance is nonnegative, which makes this convention much less confusing. D.Lazard (talk) 12:57, 25 June 2024 (UTC)[reply]
Let's swap the description round then.
The 2 heightmap graph illustrations will also need updating to match (assuming we agree on the convention of taking the up direction as positive!) DanPiker (talk) 19:36, 25 June 2024 (UTC)[reply]

Problem with the image of the duck

[edit]

Hey Drummyfish (talk · contribs), there is one red circle inside the duck that is way to small, it's close to the neck.