-2

Hello everyone :) I need to calculate a 3d point by specific angle. I allready know the plane where is the circle (point from this plane and normal vector), and the angle. The plane can be positioned in any possible way (not only with the normal (0, 1, 0), (1, 0, 0), or (0, 0, 1)) Can anyone help me please? Thank you in advance!

Simona
  • 1
  • 1
  • I'm voting to close this question as off-topic because it is about geometry and [math.se] instead of programming or software development. – Pang Nov 21 '17 at 05:30
  • I develop an app using Unity, where i need that i put in this question. Maybe here it seems that this is only math, but i really need this to my application. – Simona Nov 21 '17 at 13:38

1 Answers1

3

This data does not define circle starting angle.

You can get arbitrary vector orthogonal to normal:
Choose components with the largest magnitude and with the second magnitude.
Exchange its values, negate one of them, and make the third component zero.
For example, if n.y is the largest and n.z is the second, make

v = (0, n.z, -n.y)

Then calculate one more vector in the plane using cross product

u = n x v 

Normalize v and u. Calculate circle points using center point C as

C + R * v * cos(fi) + R * u * sin(fi)
MBo
  • 77,366
  • 5
  • 53
  • 86
  • How can i calculate a magnitude for a component from a vector? i know tha magnitude is calculating for vectors... Can you detail first part? – Simona Nov 21 '17 at 14:01
  • What is magnitude of `-1.5`? Abs(-1.5) = 1.5 – MBo Nov 21 '17 at 15:47