- #1

TheDestroyer

- 402

- 1

I have a file that contains planes in the form of norms that have lengths (magnitude not always 1). The file looks like this:

A1 B1 C1

A2 B2 C2

A3 B3 C3

...

Every A B C define the components of a norm to a plane. These sets of planes form a polyhedron. I'm trying to find a way to convert every 3 components of the norms to a plane equation of the form:

ax + by + cz = d

The problem arises when trying to define d, where a, b and c are obviously equal to A, B and C respectively. The problem is there because the norm defines the direction of the plane being perpendicular to a vector from the origin to the plane. While d defines the distance from the origin in the z axis direction.

As a try I defined d to be positive or negative by the sign of C, because this defines whether the slope of the plane on the xy-plane is positive or negative, and the value of d is the magnitude of the vector (A,B,C), because I think the distance in the z axis is this magnitude. So:

d = Sign(C)*sqrt(A^2+B^2+C^2)

This definition for the plane does not give the right shape when redrawing the polyhedra.

Have I thought in the right way? any ideas?

Could anyone tell me how to define d in the right way? or maybe if there's a different definition for a,b,c other than what I've given.

Thank you