Difference between revisions of "Silhouette Edges"
Line 23: | Line 23: | ||
Implementing this algorithm requires some vector arithmetic, as described in the pages on [[Vector|vectors]] and [[Matrix|matrices]]. These include:<br /><br /> | Implementing this algorithm requires some vector arithmetic, as described in the pages on [[Vector|vectors]] and [[Matrix|matrices]]. These include:<br /><br /> | ||
− | ==Computing the surface normal of a | + | ==Computing the surface normal of a face== |
This is discussed in the page on surface normals, but it involves the cross product of two vectors. These vectors may be <br /> | This is discussed in the page on surface normals, but it involves the cross product of two vectors. These vectors may be <br /> | ||
::(a) two adjacent edge vectors from a facet, or <br /> | ::(a) two adjacent edge vectors from a facet, or <br /> | ||
Line 29: | Line 29: | ||
derivatives. <br /> | derivatives. <br /> | ||
Cross products are order-sensitive, so you need to arrange these two vectors so that the angle between the first E1 and second E2 is positive in the usual sense, that is, that the second is counterclockwise from the first. Then the surface normal to the facet is the cross product <math> N = E1 \times E2 </math>. This is shown in the figure below: <br /> | Cross products are order-sensitive, so you need to arrange these two vectors so that the angle between the first E1 and second E2 is positive in the usual sense, that is, that the second is counterclockwise from the first. Then the surface normal to the facet is the cross product <math> N = E1 \times E2 </math>. This is shown in the figure below: <br /> | ||
+ | [[Image:Computingsurfacenormal.jpg|400px|center]] | ||
|other=Graphics | |other=Graphics |
Revision as of 13:34, 30 June 2011
Silhouette Edges |
---|
Silhouette Edges
- placeholder
Contents
Basic Description
placeholder
A More Mathematical Explanation
- Note: understanding of this explanation requires: *Graphics
If you have a 3D object, either surface or solid, a silhouette edge is the collection of points where [...]
If you have a 3D object, either surface or solid, a silhouette edge is the collection of points where the surface normal is orthogonal to the view vector.
If the object is composed of facets, a silhouette edge is comprised of the common edges between a facet whose surface normal points toward the viewer and a facet whose surface normal points away from the viewer. This is then an algorithm for finding silhouette edges:
- For every facet in the object
- Compute the surface normal of the facet
- If the surface normal points toward the viewer
- For every edge of the facet
- Identify the facet that shares this edge
- Compute the surface normal for that facet
- If this surface normal points away from the viewer
- Add the edge to the collection of silhouette edges
- endif
- endfor
- For every edge of the facet
- endif
- endfor
Implementing this algorithm requires some vector arithmetic, as described in the pages on vectors and matrices. These include:
Computing the surface normal of a face
This is discussed in the page on surface normals, but it involves the cross product of two vectors. These vectors may be
- (a) two adjacent edge vectors from a facet, or
- (b) two tangent vectors at a point in the facet computed by partial
- (a) two adjacent edge vectors from a facet, or
derivatives.
Cross products are order-sensitive, so you need to arrange these two vectors so that the angle between the first E1 and second E2 is positive in the usual sense, that is, that the second is counterclockwise from the first. Then the surface normal to the facet is the cross product . This is shown in the figure below:
Why It's Interesting
placeholder
How the Main Image Relates
placeholder
Teaching Materials
- There are currently no teaching materials for this page. Add teaching materials.
Related Links
Additional Resources
placeholder
References
references
Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.