how do i get my first perpendicular line?
- Cross the normal with any arbitrary vector. We'll call this result1 and it is on the plane & perp to the normal.
- Cross the normal & result1 and this result (result2) is perpendicular to both normal & result1.
If the normal & the arbitrary vectors are unit length, and you normalize result1, your results will be a basis for an orthonormal rotation matrix.
edit - for the arbitrary vector, make sure it's not parallel to the normal.