IV.2

SIMPLE CONNECTION ALGORITHM FOR 2-D DRAWING

IRIS s.r.I.

Claudio Rosati,     Paliano, Italy

Publisher Summary

This chapter presents a simple algorithm for computing the minimal orthogonal path connecting two objects. Only the endpoint’s coordinates, the start-point outward direction, and the end-point inward direction is required. A minimal orthogonal path between two objects is the simplest orthogonal-segments path not crossing the objects, starting from an Out pad and ending at an In pad. When connecting two objects with a minimal orthogonal path, a rotation symmetry can be seen so that the path shape depends solely on the relative position of the Out and In pads. The lines passing over the pad and over the object’s upper edge divide ...

Get Graphics Gems III (IBM Version) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.