Raster Autocad [better] -

;; --- Generate Raster Points --- (setq pt-list '()) (setq total-points (* rows cols)) (princ (strcat "\nGenerating " (itoa total-points) " points..."))

;; Calculate dimensions (setq width (abs (- (car p2) (car p1))) height (abs (- (cadr p2) (cadr p1))) ) raster autocad

includes an optional Z-axis sine wave pattern – replace the math with your own elevation data (e.g., from a CSV file or formula). ;; --- Generate Raster Points --- (setq pt-list

;; Get number of rows and columns (initget 7) ; Non-zero, non-negative, no enter (setq cols (getint "\nNumber of columns (horizontal divisions): ")) (initget 7) (setq rows (getint "\nNumber of rows (vertical divisions): ")) from a CSV file or formula).

;; Ensure width and height are positive (if (or (<= width 0.0) (<= height 0.0)) (progn (princ "\nError: Width and height must be greater than zero.") (exit) ) )

;; Loop through rows (Y direction) and columns (X direction) (setq i 0) ; row index (while (< i rows) (setq y-pos (+ (cadr p1) (* i y-spacing))) (setq j 0) ; col index (while (< j cols) (setq x-pos (+ (car p1) (* j x-spacing))) ;; Create point at (x-pos, y-pos, elevation z from p1) (setq point-obj (command "_.POINT" (list x-pos y-pos (caddr p1)))) (setq j (1+ j)) ) (setq i (1+ i)) )