1
votes

I'm trying to draw a cube in openGL with parameters read from Parasolid x_t file. Can anyone guide me in drawing a plane surface in openGL with the following inputs,

  • point on the plane
  • normal to the plane (unit vector)
  • x-Axis of the plane (unit vector)

These are the inputs I read from parasolid *.x_t file. Using this I have to find y-Axis vector which is the cross product of normal and x-Axis. I'm totally confused with the process or equation I should use in my c++ code in order to get the other three points of the plane surface.

1

1 Answers

0
votes

Given Normal [nx,ny,nz], X-vector [xx,xy,xz] and Point on the plane P=[px,py,pz]
then Y-vector = N cross X;

We could just assume for now, that P represents bottom left corner of a cube face.
Then bottom_right = P+X, top_right = P+X+Y and top_left = P+Y.