Smooth cone normals

后端 未结 2 932
予麋鹿
予麋鹿 2021-01-16 08:17

I\'m trying to calculate smooth normals for a cone. In looking around for code samples and explanations, I consistently come across directions for face normals. I\'ve posted

2条回答
  •  感情败类
    2021-01-16 08:39

    At any point on the surface of a cone except the apex, there are two obvious kinds of tangent vectors: one tangent to the cross-sectional circle, or one up the slope. If you express the surface as a parametric equation with two parameters, you can get these tangent vectors as the two partial derivatives. Take the cross product of the tangents, and you get a normal vector. The order of the product determines whether the normal points inward or outward. Of course, the bottom face must be handled separately.

提交回复
热议问题