1. ## adding values to points in alisp

Registered forum members do not see this ad.

Could someone tell me how to add values to points. I want to make a square using a user input first point. How would I create a second point by adding values to the first point?

2. after you have the first point, you then extract the X & Y values (and possibly Z), then you add the figures you need to concoct the next point. which figures all depend upon which way you want to draw the rectangle from the first point.
I think you need to provide a little bit more info here

3. There are several ways to approach this:

(setq p1 '(2 3 0))

maybe:

(setq p2 (mapcar '+ p1 '(2 2 0)))

or:

(setq ap (lambda (p s)
(list (+ (car p) s)

(setq p2 (ap p1 2))

-David

4. Here are some more examples.
Lets start at point 2,2 and go around a square.

Code:
```(setq x 2
y 2
)

(setq p1 (list x y)
p2 (list x (+ y 5))
p3 (list (+ x 5) (+ y 5))
p4 (list (+ x 5) y)
)

(command "._pline" p1 p2 p3 p4 p1 "")```
Lets go from p3 to 10,10
We need to add 3 to x & y
Code:
`(setq p5 (list (+ (car p3) 3)(+ (cadr p3) 3)))`

5. Registered forum members do not see this ad.

There's always "getcorner"

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts