Create arrays

I wish to create an array of points, these arrays of points should be extracted from the rectangle's divided in section's middle point, variable N sections (columns and rows) like a grid, then store it in a list or array object.

In the image, I need to save the store point represented by the points.

Any help?

Comments

  • So you just want the circle points or the line points as well, pretty easy you are talking 1/4 & 1/2 dist along the rectang shape.

    So this will get the 4 corner points then just use divide method, to work out the other points.

    (setq plent (entsel "\nPick rectang"))
    (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))))

    A big question will the rectangs be rotated ? As there is 2 ways to work out the new points. Polar & mapcar +