;\begin{verbatim} ;+ ; NAME: alignmul ; PURPOSE: Multiple operation of two alignment structures ; CALIING SEQUENCE: ; C=alignmul(A, B) ; INPUTS: ; A the first alignment structure ; representing the mapping: (l,m) ---> (i,j) ; B the second alignment structue ; representing the mapping: (i,j) ---> (t,u) ; OUPUT: ; C the multiplication of A and B, ; representing the mapping: (l,m) ---> (t,u) ; REMARK: ; the order of inputs A and B are important. function alignmul, a, b ; Compatability Check check = a.object eq b.reference check = check and a.obj_aspect eq b.ref_aspect if not check then begin print, "Incompatible Inputs in ALIGNMUL" return, a endif c = alignstr() c.reference = a.reference c.ref_aspect = a.ref_aspect c.object = b.object c.obj_aspect = b.obj_aspect c.flip = a.flip*b.flip c.scale = a.scale*b.scale c.rotation = a.rotation + a.flip(0)*a.flip(1)*b.rotation c.ref_origin = a.ref_origin c.obj_origin(0) = b.obj_origin(0) + $ ( (a.obj_origin(0)-b.ref_origin(0))*cos(b.rotation) + $ b.ref_aspect*(a.obj_origin(1)-b.ref_origin(1))*sin (b.rotation)) $ /(b.flip(0)*b.scale) c.obj_origin(1) = b.obj_origin(1) + $ (- (a.obj_origin(0)-b.ref_origin(0))*sin(b.rotation) + $ b.ref_aspect*(a.obj_origin(1)-b.ref_origin(1))*cos (b.rotation)) $ /(b.flip(1)*b.scale*b.obj_aspect) return, c end ;\end{verbatim}