Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleFind the orientation of a polygon (clockwise or counterclockwise) in Visual Basic .NET
DescriptionThis example shows how to find the orientation of a polygon (clockwise or counterclockwise) in Visual Basic .NET.
Keywordspolygon, orientation, clockwise, counterclockwise, graphics, VB.NET
CategoriesGraphics, VB.NET
 
This program calculate the polygon's signed area. The result is negative if the polygon is oriented clockwise. See the HowTo Calculate a polygon's area in Visual Basic .NET for information on finding a polygon's signed area.
 
' Return True if the polygon is oriented clockwise.
Public Function PolygonIsOrientedClockwise(ByVal points() _
    As PointF) As Boolean
    Return SignedPolygonArea(points) < 0
End Function
 
For more information on graphics programming in Visual Basic, see my book Visual Basic Graphics Programming.
 
 
Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated