Cylindrical Surface Normal Vector

Source: Internet
Author: User

Today, the teacher asked me to create a surface model of the cylindrical surface. Because we need to add illumination, we need to obtain the normal vector of each vertex, however, because the cylindrical surface can be rotated and transformed, the difference between CP3 (x, y, z) and CP3 (0, Y, 0) cannot be used to obtain the normal vector. Later I thought that because the cylindrical surface has the symmetry before and after, we can use the difference between the two relative vertices to obtain the normal vector of a certain point.

The details are as follows:

The above table is an expanded diagram on the side of a cylindrical surface. Suppose we divide the cylindrical surface into N1 segments along the circumference, N2 as the height direction, and the two components of the V point represent the height direction and the circumference direction respectively, then the coordinates of the two relative points are vs (x, (Y + N1/2) % N1), ve (x, y ). Using these two points, we can obtain the method vector of.

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.