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

Recommended Posts

How would I go about drawing a plane with a normal and a distance?

Share on other sites
sorry but I afraid you can't draw a plane because it's area is infinite...
maybe you can draw a large rectangle instead.

Share on other sites
ok how do i do that?

Share on other sites
MS Paint?

Or you could tell us what language/platform you would like to do this in [smile]

c++ opengl

Share on other sites
ax + by + cz + d = 0

gives

z = (-ax - by - d) / c

Pick 4 points in the x-y-plane and use the above equation to calculate the four corresponding z-values for the plane on that points, create a quad from those points and render and there you have part of a plane.

To render the normal just pick a point on the plane and draw a line from that point to a point on the line formed by that point and the normal vector.

thank you

Share on other sites
Quote:
 Original post by Enselicax + by + cz + d = 0givesz = (-ax - by - d) / c

Just for completion: Obviously there is a need of case distinction, since the 2nd formula doesn't work for planes where c is 0 or at least near to 0. You may use the maximum of the absolute |a|, |b|, and |c| to determine which case best to use, like so:

max(|a|,|b|,|c|) == |a| => x = (- by - cz - d) / a
max(|a|,|b|,|c|) == |b| => y = (- ax - cz - d) / b
max(|a|,|b|,|c|) == |c| => z = (- ax - by - d) / c

1. 1
Rutin
69
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• Forum Statistics

• Total Topics
633431
• Total Posts
3011834
• Who's Online (See full list)

There are no registered users currently online

×