Plane offset

markraz

Full Member
Joined
Feb 19, 2014
Messages
338
Hi what's the best way to offset a plane? I need to figure out two scenarios
for this game I'm writing

1. offset plane in the the same direction of the plane normal
2. offset plane in opposite direction of the plane normal.

I looked all over the net I couldn't find any solution to this
attachment.php

any help would be appreciated thanks
 

Attachments

  • planeoffset.jpg
    planeoffset.jpg
    11.7 KB · Views: 20
Suppose you have a normal (a,b,c) to the plane P0. Then P0 can be defined by
P0={(x,y,z) \(\displaystyle \epsilon\) (a,b,c) \(\displaystyle \bullet\) (x,y,z) = d0}
where \(\displaystyle \bullet\) stands for dot product. If k is a non-zero scalar then the plane P1
P1={(x,y,z) \(\displaystyle \epsilon\) (ka,kb,kc) \(\displaystyle \bullet\) (x,y,z) = d1}
is parallel to P0

The next thing that you need is a point (x1, y1, z1) on plane P1, (0,0,d1/k/c) would do nicely if c were not zero, and the formula between a plane and a point in the case of parallel planes is space
D = \(\displaystyle \frac{|a x_1 + b y_1 + c z_1 - d0|}{\sqrt{a^2+b^2+c^2}}\)
=\(\displaystyle \frac{|d1/k - d0|}{\sqrt{a^2+b^2+c^2}}\)
So choose d1/k to get the distance you want in the proper direction.
 
Last edited:
thanks so much....

So I'm curious... ax+ by+ cz + d = 0 is called "general" form?

it was my understanding that 'd' in the general equation was the distance from the origin. So if I had an equation such as 2x+3y+4z+20=0, and I wanted to offset it by 10 units in the 'normal' direction.. I can't just add 10 to that 'd' value?? so 2x+ 3y + 4z + 20 + 10 = 0..... wouldn't be a valid method to offset the plane along the normal?


thanks
 
thanks so much....

So I'm curious... ax+ by+ cz + d = 0 is called "general" form?

it was my understanding that 'd' in the general equation was the distance from the origin. So if I had an equation such as 2x+3y+4z+20=0, and I wanted to offset it by 10 units in the 'normal' direction.. I can't just add 10 to that 'd' value?? so 2x+ 3y + 4z + 20 + 10 = 0..... wouldn't be a valid method to offset the plane along the normal?


thanks

A good read, IMO, along those lines is
http://mathworld.wolfram.com/Plane.html
The 'd' in the general equation is the distance from the origin only if (a,b,c) ia a unit vector.

Adding a value to d changes the distance from the origin and would create a parallel plane [that is a plane some distance along the normal]. The actual distance may or may not be the added value but is related to it via the normal vector (a,b,c).
 
Does this look correct?
plane = 2x+3y+4z+5=0 offset this plane 10 units along the normal <2 ,3, 4>


1. Get Magnitude of a Vector Normal ||<2,3,4 >|| = sqrt(4+9+16) = sqrt(4+9+16) = 5.38

2. Find arbitrary point on plane (0, 0, 1.25)

3. Vector form = (0, 0, 1.25) + 10( 2, 3 , 4)

4. 2(x - 20) + 3(y - 30) + 4(z - 41.25)) = 0
(1/5.38) (40 , 90 , 165 ) -> (40 + 90 + 165) = 295/5.38

2x + 3y + 4z -295/5.38 = 0

2x + 3y + 4z -54.8 = 0


new plane equation offset 10 along normal

2x + 3y + 4z = 54.8





thanks in advance
 
Last edited:
Does this look correct?
plane = 2x+3y+4z+5=0 offset this plane 10 units along the normal <2 ,3, 4>


1. Get Magnitude of a Vector Normal ||<2,3,4 >|| = sqrt(4+9+16) = sqrt(4+9+16) = 5.38

2. Find arbitrary point on plane (0, 0, 1.25) <=== wrong point. Should be (0, 0, -1.25)

3. Vector form = (0, 0, 1.25) + 10( 2, 3 , 4)/5.38

4. 2(x - 20) + 3(y - 30) + 4(z - 40)) = 0
(1/5.38) (40 + 0 , 90 + 0 , 160 + 1.25 ) -> (40 + 90 + 160 + 1.25) = 295/5.38

2x + 3y + 4z - 295/5.38 = 0

2x + 3y + 4z -54.780125 = 0


new plane equation offset 10 along normal

2x + 3y + 4z = 54.780125





thanks in advance
See above. Also, you are mixing normalized and un-normalized points

The way I would do it is something like the following: Assume we have a plane
P0: x + 4 y + 8 z + 9 = 0
and we want another plane offset by 10 units along the vector (1, 4, 8).

First normalize the (1, 4, 8) vector, that is divide each component as well as the 9 by 9=\(\displaystyle \sqrt{1 + 16 + 64}\) to get
P0: \(\displaystyle \frac{1}{9}\) x + \(\displaystyle \frac{4}{9}\) y + \(\displaystyle \frac{8}{9}\) z + 1 = 0
for the original plane. Now the 1 is the distance from (0,0,0) to the plane. To offset it an additional 10 units, just add 10 to the 1 to get
P1: \(\displaystyle \frac{1}{9}\) x + \(\displaystyle \frac{4}{9}\) y + \(\displaystyle \frac{8}{9}\) z + 11 = 0
 
See above. Also, you are mixing normalized and un-normalized points

The way I would do it is something like the following: Assume we have a plane
P0: x + 4 y + 8 z + 9 = 0
and we want another plane offset by 10 units along the vector (1, 4, 8).

First normalize the (1, 4, 8) vector, that is divide each component as well as the 9 by 9=\(\displaystyle \sqrt{1 + 16 + 64}\) to get
P0: \(\displaystyle \frac{1}{9}\) x + \(\displaystyle \frac{4}{9}\) y + \(\displaystyle \frac{8}{9}\) z + 1 = 0
for the original plane. Now the 1 is the distance from (0,0,0) to the plane. To offset it an additional 10 units, just add 10 to the 1 to get
P1: \(\displaystyle \frac{1}{9}\) x + \(\displaystyle \frac{4}{9}\) y + \(\displaystyle \frac{8}{9}\) z + 11 = 0

great... your way is much easy to understand thank you!
 
Top