Archived

This topic is now archived and is closed to further replies.

Plane Equation

This topic is 5310 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been learning 3d math from tutorials on the internet, and have seen the plane equation expressed as ax + by +cz - d = 0 Isn''t this the same as saying ax + by + cz = d? Forgive me if I''m missing something, but why the extra operation before the comparison?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
no reason.

If you''re worried about it, it makes no speed difference.

Share this post


Link to post
Share on other sites
Because the numbers used are floating-point.

Floating-point always has an approximation error, so a plane in the computer world is defined by abs( ax + by + cz - d ) < epsilon, because there can be no such thing as a float being perfectly equal to zero (it is usually equal to 0.0000000001 or something similar, which returns false if compared to zero).

Since it is easier to compare the abs of a value to epsilon, rather than d - epsilon < ax +by +cz < d + epsilon, they use the extra substraction. This also makes (usually) code clearer.

ToohrVyk

Share this post


Link to post
Share on other sites
ax + by + cz + d = 0 and ax + by + cz = d are equivalent (except for the change in value of d).

The first is generally preferred for two reasons. The first is simpler because it consists of one set of numbers ( < a,b,c,d > ) compared to the second, which has two ( < a,b,c > and < d > ). The first has " = 0" which always makes life easier for mathematicians.

Now, other than those reasons, ax + by + cz + d = 0 and ax + by + cz = d are equivalent (except for the change in value of d).

Edit: changed "- d" to "+ d" because that is the proper form.


[edited by - Jambolo on June 2, 2003 12:29:34 AM]

Share this post


Link to post
Share on other sites
In school-math it''s just the form for calculating the distance beetwen a point and a plane, just kind of using a formula with a special name and it''s better to imagine that if d = 0 the distance = 0 between point,plane.
The advantages for programming ToohrVyk already told you.

Share this post


Link to post
Share on other sites