2dprojection

Описание программы

Вдхоновленный невероятным Projective2D
приложение опубликованное талантливым программистом — Шон Тесьер, здесь я представляю open-source AutoLISP программу с аналогичным функционалом

Эта программа предоставляет пользователю  проекционное преобразование (также известный как омографии, коллинеации, или менее технически, «перспективное» преобразование), проекция выбранного набора плоских объектов из одной системы отсчета в другую другому.Программа дает пользователю возможность

Upon issuing the command syntax 2dpro at the AutoCAD command-line, the user is prompted to select a
set of 2D coplanar objects to be projected. This selection is restricted to Arcs, Circles, Elipses, Lines, LWPolylines, 2D (Heavy)
Polylines, 2D Splines & Points.

The user is then prompted to select a source reference frame & a destination reference frame. For each of these prompts, the
program requires the user to select a closed planar polyline (LWPolyline) with four non-collinear vertices. Following each selection,
the program will ensure the points defining the reference frame are counter-clockwise oriented with the points ordered such
that the lower-left vertex appears first.

Following valid user responses, the program will then convert the four 2D points defining each reference frame into homogeneous
coordinates, and will calculate the transformation matrix to map from the source reference frame (or projective space) to the
destination reference frame.

The program will then iterate over the set of selected objects and, for each object, will calculate a 2D point set describing
or (in the case of curved objects) approximating the object. Each point is then converted to homogeneous coordinates and mapped
to the destination reference frame using the tranformation matrix, before being converted back to cartesian coordinates.

The program will then generate either a Point, Line or LWPolyline from the mapped point(s) with properties matching those
of the original object.

Demonstrations

Следующие примеры демонстрируют работу программы: произвольный набор объектов в ортогональной перспективе проецируется

Below are two examples demonstrating the use of the program to project a set of objects from an orthogonal reference frame to a
skewed perspective, and then from one skewed perspective to another. Please note that the text in the following example was created
using the Express Tools TXTEXP command and is hence composed of lines & polylines.

Пример 1

2D Projection Example 1

Пример 2

2D Projection Example 2

Пример 3

2D Projection Example 3

Как загрузить и запустить программу на AutoLisp

Добавить комментарий

Имя *
E-mail *
Сайт