(apply '/ (getvar 'screensize))
That looks rather MP'ish.
That looks rather MP'ish.
Code: [Select](defun VPCords ( )
( (lambda (offset)
( (lambda (viewctr)
(list
(mapcar '- viewctr offset)
(mapcar '+ viewctr offset)
)
)
(getvar "viewctr")
)
)
( (lambda (halfHeight aspectRatio)
(list
(* halfHeight aspectRatio)
halfHeight
)
)
(* 0.5 (getvar "viewsize"))
(apply '/ (getvar "screensize"))
)
)
)
....old people, hehe! To make this more relevant you all aren't so old, my grandfather was programming military systems in fortran in the 50's and 60's.
(ACET-GEOM-VIEW-POINTS)
((3737.61 598.711 0.0) (10595.1 3058.81 0.0))
ACET Elapsed: 1.528 sec.
ve Elapsed: 9.859 sec.
LM:ViewportExtents Elapsed: 9.813 sec.
vpcords Elapsed: 9.891 sec.
express tools, meh
(defun acet-geom-view-points ( / a b c d x )
(setq b (getvar "viewsize")
c (car (getvar "screensize"))
d (cadr (getvar "screensize"))
a (* b (/ c d))
x (trans (getvar "viewctr") 1 2)
c (list (- (car x) (/ a 2.0))
(- (cadr x) (/ b 2.0))
0.0
)
d (list (+ (car x) (/ a 2.0))
(+ (cadr x) (/ b 2.0))
0.0
)
c (trans c 2 1)
d (trans d 2 1)
)
(list c d)
)
(setq vext (ACET-GEOM-VIEW-POINTS))
lee,
I like the:Code: [Select](apply '/ (getvar 'screensize))
Neat!
ymg
< ..>
What is more of a problem is that documentation for them is kind of sparse,
plus some of the functions are less than ideal. So your mileage may (will) vary.
ymg