|
373 | 373 |
|
374 | 374 | # Extensive ray tests
|
375 | 375 | # Spehere for testing
|
376 |
| - |
377 | 376 | p1 = Float64[0.7944654, 1.1890014, -9.944]
|
378 | 377 | p2 = Float64[0.7944654, 1.1890014, 9.944]
|
379 | 378 | p3 = Float64[1.0111626, 1.0111626, 9.944]
|
|
423 | 422 | # All points that lie to the left of the sphere center and in the circle in the yz plane
|
424 | 423 | # should have a contact. Contacts to the right of the sphere center should only occur if the point is
|
425 | 424 | # inside the sphere
|
426 |
| - |
427 | 425 | x_plus_calculated_contacts = []
|
428 | 426 | for i in 1:size(points, 2)
|
429 | 427 | if points[1, i] <= sphere.x[1] && norm(points[2:3, i] .- sphere.x[2:3]) <= sphere.r
|
|
439 | 437 | # All points that lie to the right of the sphere center and in the circle in the yz plane
|
440 | 438 | # should have a contact. Contacts to the left of the sphere center should only occur if the point is
|
441 | 439 | # inside the sphere
|
442 |
| - |
443 | 440 | x_minus_calculated_contacts = []
|
444 | 441 | for i in 1:size(points, 2)
|
445 | 442 | if points[1, i] >= sphere.x[1] && norm(points[2:3, i] .- sphere.x[2:3]) <= sphere.r
|
|
455 | 452 | # All points that lie below the sphere center and in the circle in the xz plane
|
456 | 453 | # should have a contact. Contacts above the sphere center should only occur if the point is
|
457 | 454 | # inside the sphere
|
458 |
| - |
459 | 455 | y_plus_calculated_contacts = []
|
460 |
| - |
461 | 456 | for i in 1:size(points, 2)
|
462 | 457 | if points[2, i] <= sphere.x[2] && norm(points[[1,3], i] .- sphere.x[[1,3]]) <= sphere.r
|
463 | 458 | push!(y_plus_calculated_contacts, i)
|
|
472 | 467 | # All points that lie above the sphere center and in the circle in the xz plane
|
473 | 468 | # should have a contact. Contacts below the sphere center should only occur if the point is
|
474 | 469 | # inside the sphere
|
475 |
| - |
476 | 470 | y_minus_calculated_contacts = []
|
477 |
| - |
478 | 471 | for i in 1:size(points, 2)
|
479 | 472 | if points[2, i] >= sphere.x[2] && norm(points[[1,3], i] .- sphere.x[[1,3]]) <= sphere.r
|
480 | 473 | push!(y_minus_calculated_contacts, i)
|
|
489 | 482 | # All points that lie below the sphere center and in the circle in the xy plane
|
490 | 483 | # should have a contact. Contacts above the sphere center should only occur if the point is
|
491 | 484 | # inside the sphere
|
492 |
| - |
493 | 485 | z_plus_calculated_contacts = []
|
494 | 486 | for i in 1:size(points, 2)
|
495 | 487 | if points[3, i] <= sphere.x[3] && norm(points[1:2, i] .- sphere.x[1:2]) <= sphere.r
|
|
505 | 497 | # All points that lie above the sphere center and in the circle in the xy plane
|
506 | 498 | # should have a contact. Contacts below the sphere center should only occur if the point is
|
507 | 499 | # inside the sphere
|
508 |
| - |
509 | 500 | z_minus_calculated_contacts = []
|
510 | 501 | for i in 1:size(points, 2)
|
511 | 502 | if points[3, i] >= sphere.x[3] && norm(points[1:2, i] .- sphere.x[1:2]) <= sphere.r
|
|
516 | 507 | end
|
517 | 508 |
|
518 | 509 | @test z_minus_p_contacts == z_minus_calculated_contacts
|
519 |
| - |
520 | 510 | end
|
521 | 511 |
|
522 | 512 |
|
|
0 commit comments