Ray and plane intersection

Source: Internet
Author: User

It's actually a very simple question. I forgot all about mathematics. Mark it.

Transferred from "computer graphics" Third Edition sun jiaguang p530

 

Assume that the ray is defined as X = DT + E (t> = 0) (9-6-1)

E = (E1, E2, E3) is the ray start point, corresponding to the viewpoint or visible point; D = (D1, D2, D3) is the ray direction, | d | = 1; X = (x, y, z) indicates the radiation point.

 

Assume that the plane equation is AX + by + cz + D = 0 (9-6-2)

(9-6-1) is substituted into (9-6-2) to obtain N * (DT + E) + d = 0, where N is the vector (A, B, C)

That is, (N * D) T + (n * E) + d = 0

Obtain T0 =-(N * E + d)/(n * D) (when N * D is not equal to 0)

When N * D = 0, the rays are parallel to the plane and can be treated as non-intersecting. When N * D is not equal to 0, the intersection is X0 = dt0 + E0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.