Here's the code I promised:

And output from a sample run with the 4A limit set manually to an arbitrary value that produces limited output:

[17:54:13.90] C:\test>979082 -LIM4A=15 R: 5 [ -18.388, -2.409, -9.308 ] [ 7.506, 282° +] S:259 angle: 32.607° [ -6.126, -0.957, 0.400 ] [ 9.944, 249° +] R: 6 [ -18.784, -3.016, -7.671 ] [ 7.821, 269° +] S:259 angle: 19.401° [ -6.126, -0.957, 0.400 ] [ 9.944, 249° +] R: 7 [ -17.107, -3.128, -6.966 ] [ 8.391, 268° +] S: 7 angle: 10.377° [ -3.823, -2.789, 0.030 ] [ 11.980, 258° +] S:255 angle: 18.214° [ -4.814, 0.899, 0.400 ] [ 8.401, 250° +] S:254 angle: 18.338° [ -4.738, 1.093, 0.400 ] [ 8.231, 250° +] S:259 angle: 18.570° [ -6.126, -0.957, 0.400 ] [ 9.944, 249° +] S:258 angle: 20.395° [ -5.825, 0.591, 0.400 ] [ 8.548, 248° +] S:257 angle: 20.599° [ -5.970, 0.493, 0.400 ] [ 8.620, 247° +] S:256 angle: 21.740° [ -5.562, 1.600, 0.400 ] [ 7.653, 246° +] S:245 angle: 25.796° [ -5.672, 3.533, 0.140 ] [ 5.782, 242° +] R:140 [ -18.510, -10.387, -3.385 ] [ 15.732, 252° +] S:259 angle: 2.897° [ -6.126, -0.957, 0.400 ] [ 9.944, 249° +] R:141 [ -17.411, -10.096, -2.922 ] [ 15.769, 252° +] S:259 angle: 2.729° [ -6.126, -0.957, 0.400 ] [ 9.944, 249° +] S:258 angle: 4.554° [ -5.825, 0.591, 0.400 ] [ 8.548, 248° +] S:257 angle: 4.758° [ -5.970, 0.493, 0.400 ] [ 8.620, 247° +] S:256 angle: 5.899° [ -5.562, 1.600, 0.400 ] [ 7.653, 246° +] [17:54:14.34] C:\test>

As you can see, the run takes around 1/2 a second to process the 146 rotation points against the 254 stop point of your sample data. The runtime will be linear in the number of points.

The output shows that rotatable point 5 [original 3D cartesian coords] [2D polar coords (radius/angle) about z-axis]

will collide with stop point 259 after being rotated 32.607°</c>

Rot point: 6 will collide with stop point 6 after being rotated 19.401°.

Rot point 7 will collide with stop point 7 after being rotated 10.377°, and stop point 245 after being rotated 334.204° the opposite way.

And so on.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^8: Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis? by BrowserUk
in thread Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis? by fraizerangus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.