VBA assistance
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
VBA assistance

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
BOUBA
Guest





Posted: Sun Nov 20, 2005 5:10 pm    Post subject: VBA assistance Reply with quote

Dear Friends,

I am a new subscriber, and I would like to ask for your assistance
regarding a simple VBA program:

I would like to know how to write the VBA algorithm for the following
program :

Computing Clockwise Rotation
Determining if a point is to the left or right of a line
One effective computational geometry task is to determine if a point is
located clockwise from
a straight line. This is useful to determine if a point is inside a
polygon, or if a house is located
on a particular side of the street.

Given a straight line segment, and an individual point as defined
below:

Line := (10,10)
(50,50)

Point := (25,26)



The cross product of the line matrix can be computed through standard
arithmetic. If the
sign of the cross product is positive, then the directed segment p1pn
is clockwise from p1p2.


Crossprod:=(point0-line0,0).[line1,1-line0,1]-(line1,0-line0,0).(point1-line0,1)

Crossprod=-40


I am looking forward your assistance at your soonest convenience

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB