Hello,
How can I get the four different result as (t1x, t1y) for the 'min-x, min-y',
(t2x, t2y) for the 'max-x, max-y', (t3x, t3y) for the 'max-x, min-y', and
(t4x, t4y) for the 'min-x, max-y' respectively.
What should I add to below code?
Thanks for your help.
Sungwoo
;--------------------------
(setf max-distance 0
temp-room-x 0
temp-room-y 0)
(loop for x-value in (list min-x max-x max-x min-x)
for y-value in (list min-y max-y min-y max-y)
do (loop for i from 0 to stroke-index
as delta-x = (- (aref stroke-array-x i) x-value)
as delta-y = (- (aref stroke-array-y i) y-value)
do (if (> (sqrt (+ (* delta-x delta-x) (* delta-y
delta-y))) max-distance)
(setf max-distance (sqrt (+ (* delta-x delta-x) (*
delta-y delta-y)))
temp-room-x (aref stroke-array-x i)
temp-room-y (aref stroke-array-y i))
nil)
finally (setf t1x temp-room-x
t1y temp-room-y)))
;--------------------------
--
--
<^)++<