Could you explain in more detail?
Do you just want to collect the point of the intersections of the x’s and y’s?
Use the polar function and the repeat function


Registered forum members do not see this ad.
Suppose that I have a room and I want to divide it into specific points.
My codes are running well up to the crossing points. I mean How can I support
the X and Y for the divided points at X and Y as well ?
Code:(defun c:cen (/ pt1 pt3 pt2 pt4 XLen YLen Xnum Ynum) (setq pt1 (getpoint"\n Specify The Left corner: ") pt3 (getcorner pt1 "\n Specify the Right corner: ") ) ;; ******** the rest of rectangl points **************** (setq pt2 (list (car pt3)(cadr pt1)) pt4 (list (car pt1)(cadr pt3)) ) ;; ****** Lengths of X and Y ************** (setq XLen (distance pt1 pt2) YLen (distance pt1 pt4) ) ;; ****** divide the X and Y ************** (setq Xnum (getint "\n Specify Number of X elements: ");; for instance 5 Ynum (getint "\n Specify Number of Y elements: ");; for instance 4 )


Could you explain in more detail?
Do you just want to collect the point of the intersections of the x’s and y’s?
Use the polar function and the repeat function




Can not see any problem you just need a loop within a loop
(repeat Xnum
(repeat ynum
( do your thing here)
)
(setq xnum (+ xnum Xlen))
)
Last edited by BIGAL; 12th Aug 2010 at 03:57 am. Reason: typo


The crosses in RED are what I would like to get. Although these points
are would be changed according to user input.
Many thanks
Michaels
I wrote this lisp for enforcements some moons ago
Looks like this is exactly what you looking for
Change to suit
~'J'~
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)


Thanks fixo,
I have two questions about your codes ,
- Why did you use the following since you didn't use it later in the routine ?
- And what does it mean?
Code:pc (mapcar (function (lambda (x y)(* (+ x y) 0.5)))
It is really works fine, But I am looking forward to learing how codes are running and should be built with according to user inputs.
Any suggestion from any one would be highly appreciated.
Regards
Sorry,
I can't to expalin the things good because of my english level
and by this reason I'm afraid to mix something
Feel free to change the code to your suit
~'J'~
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)




Hello,
I still worndering how to get the intersection points in the pose.
Any idea ?
Best regards,


Registered forum members do not see this ad.
what are you not understanding?
do you know how to use the polar and repeat functions?
Bookmarks