given image above,
I would like to check both segments (maroon/orange line could be in any slope value) which are parallel to each other if they intersect.
dashed lines are the perpendicular lines of the maroon or of the orange line (my plan is to use these to get the intersections) .
The problem now is, how can i get the points of the perpendicular lines.
Im welcome for other suggestions.
On Cadence support search for clinecut. It should return a link to clinecut.il it should a good example to finding intersections. Also you can try axl_ol_ol2.
Thanks Craig for the suggestion.
I to look for the clinecut.il but its not what i want.
Yes, Im already using axl_ol_ol2 to get the intersections.
My problem was,
how can i create a perpendicular(dashed line, see above image) by using either orange or maroon lines to detect if both parrallel lines face each other.Even with only one intersection result can prove that both parallel lines are facing each other.
To get the perpendicular line you will need to do some vector math. First get the unit vector of the marroon/yellow line (pt1 pt2). From the unit vector you can get he perpendicular vector (-pt2 pt1).
Well I guess doing what you suggested is problem.
If its ok for you, can u give me an example?
Get the vector of the line (marron/yellow) for this example the line has coords of ((1,2) (4,4))
v = (x2-x1), (y2-y1) = (3, 2))
v(perp) = (-2, 3) or (2, -3)
To create a line that starts an one of the points, say (1, 2) to get the end point add the v(perp) to the start point (1-2, 2+3) or (-1, 5). If you want a longer or shorter line scale the vector.
You can also use unit vector and magnitude but this should be easier. Pull out your Calculas II textbook or search the web for vector math.