proc transform
	filen	xforms.icn
	local	0,001000,p
	local	1,001000,M
	local	2,000020,pl
	local	3,000020,i
	local	4,000000,put
	local	5,000000,mult_matrix
	local	6,000000,copy
	con	0,002000,1,1
	con	1,004000,1.0
	declend
	line	30
	colm	11
	mark	L1
	mark0
	var	4
	pnull
	pnull
	var	2
	pnull
	pnull
	line	35
	colm	22
	llist	0
	line	35
	colm	21
	llist	1
	line	35
	colm	18
	asgn
	int	0
	line	35
	colm	26
	subsc
	mark	L4
	pnull
	var	0
	line	35
	colm	32
	bang
	esusp
	goto	L5
lab L4
	real	1
lab L5
	line	35
	colm	13
	invoke	2
	pop
lab L2
	efail
lab L3
	unmark
lab L1
	mark	L6
	pnull
	var	2
	var	5
	var	2
	var	1
	line	39
	colm	21
	invoke	2
	line	39
	colm	7
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	0
	var	6
	var	0
	line	43
	colm	13
	invoke	1
	line	43
	colm	6
	asgn
	unmark
lab L7
	mark	L8
	mark0
	pnull
	var	3
	pnull
	int	0
	pnull
	var	0
	line	44
	colm	20
	size
	push1
	line	44
	colm	17
	toby
	line	44
	colm	12
	asgn
	pop
	mark0
	pnull
	pnull
	var	0
	var	3
	line	45
	colm	8
	subsc
	pnull
	pnull
	var	2
	int	0
	line	45
	colm	17
	subsc
	var	3
	line	45
	colm	20
	subsc
	line	45
	colm	12
	asgn
	unmark
lab L9
	efail
lab L10
	unmark
lab L8
	mark	L11
	mark	L12
	var	0
	line	47
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	49
	colm	1
	pfail
	end
proc transform_points
	local	0,001000,pl
	local	1,001000,M
	local	2,000020,xformed
	local	3,000000,put
	local	4,000000,transform
	declend
	line	51
	colm	11
	mark	L1
	mark0
	var	3
	pnull
	var	2
	pnull
	line	54
	colm	25
	llist	0
	line	54
	colm	22
	asgn
	pnull
	var	4
	pnull
	var	0
	line	54
	colm	40
	bang
	var	1
	line	54
	colm	39
	invoke	2
	line	54
	colm	29
	bang
	line	54
	colm	13
	invoke	2
	pop
lab L2
	efail
lab L3
	unmark
lab L1
	mark	L4
	mark	L5
	var	2
	line	56
	colm	4
	pret
lab L5
	pfail
	unmark
lab L4
	pnull
	line	58
	colm	1
	pfail
	end
proc set_scale
	local	0,001000,x
	local	1,001000,y
	local	2,000020,M
	local	3,000000,identity_matrix
	con	0,002000,1,3
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	60
	colm	11
	mark	L1
	pnull
	var	2
	var	3
	int	0
	int	0
	line	63
	colm	24
	invoke	2
	line	63
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	pnull
	var	2
	int	1
	line	65
	colm	5
	subsc
	int	1
	line	65
	colm	8
	subsc
	var	0
	line	65
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	pnull
	pnull
	pnull
	var	2
	int	2
	line	66
	colm	5
	subsc
	int	2
	line	66
	colm	8
	subsc
	var	1
	line	66
	colm	12
	asgn
	unmark
lab L3
	mark	L4
	mark	L5
	var	2
	line	68
	colm	4
	pret
lab L5
	pfail
	unmark
lab L4
	pnull
	line	70
	colm	1
	pfail
	end
proc set_trans
	local	0,001000,x
	local	1,001000,y
	local	2,000020,M
	local	3,000000,identity_matrix
	con	0,002000,1,3
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	72
	colm	11
	mark	L1
	pnull
	var	2
	var	3
	int	0
	int	0
	line	75
	colm	24
	invoke	2
	line	75
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	pnull
	var	2
	pnull
	var	2
	line	77
	colm	6
	size
	line	77
	colm	5
	subsc
	int	1
	line	77
	colm	9
	subsc
	var	0
	line	77
	colm	13
	asgn
	unmark
lab L2
	mark	L3
	pnull
	pnull
	pnull
	var	2
	pnull
	var	2
	line	78
	colm	6
	size
	line	78
	colm	5
	subsc
	int	2
	line	78
	colm	9
	subsc
	var	1
	line	78
	colm	13
	asgn
	unmark
lab L3
	mark	L4
	mark	L5
	var	2
	line	80
	colm	4
	pret
lab L5
	pfail
	unmark
lab L4
	pnull
	line	82
	colm	1
	pfail
	end
proc set_xshear
	local	0,001000,x
	local	1,000020,M
	local	2,000000,identity_matrix
	con	0,002000,1,3
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	84
	colm	11
	mark	L1
	pnull
	var	1
	var	2
	int	0
	int	0
	line	87
	colm	25
	invoke	2
	line	87
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	pnull
	var	1
	int	1
	line	89
	colm	5
	subsc
	int	2
	line	89
	colm	8
	subsc
	var	0
	line	89
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	mark	L4
	var	1
	line	91
	colm	4
	pret
lab L4
	pfail
	unmark
lab L3
	pnull
	line	93
	colm	1
	pfail
	end
proc set_yshear
	local	0,001000,y
	local	1,000020,M
	local	2,000000,identity_matrix
	con	0,002000,1,3
	con	1,002000,1,2
	con	2,002000,1,1
	declend
	line	95
	colm	11
	mark	L1
	pnull
	var	1
	var	2
	int	0
	int	0
	line	98
	colm	24
	invoke	2
	line	98
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	pnull
	var	1
	int	1
	line	100
	colm	5
	subsc
	int	2
	line	100
	colm	8
	subsc
	var	0
	line	100
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	mark	L4
	var	1
	line	102
	colm	4
	pret
lab L4
	pfail
	unmark
lab L3
	pnull
	line	104
	colm	1
	pfail
	end
proc set_rotate
	local	0,001000,x
	local	1,000020,M
	local	2,000000,identity_matrix
	local	3,000000,cos
	local	4,000000,sin
	con	0,002000,1,3
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	106
	colm	11
	mark	L1
	pnull
	var	1
	var	2
	int	0
	int	0
	line	109
	colm	24
	invoke	2
	line	109
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	pnull
	var	1
	int	1
	line	110
	colm	5
	subsc
	int	1
	line	110
	colm	8
	subsc
	var	3
	var	0
	line	110
	colm	18
	invoke	1
	line	110
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	pnull
	pnull
	pnull
	var	1
	int	2
	line	111
	colm	5
	subsc
	int	2
	line	111
	colm	8
	subsc
	pnull
	pnull
	var	1
	int	1
	line	111
	colm	16
	subsc
	int	1
	line	111
	colm	19
	subsc
	line	111
	colm	12
	asgn
	unmark
lab L3
	mark	L4
	pnull
	pnull
	pnull
	var	1
	int	1
	line	112
	colm	5
	subsc
	int	2
	line	112
	colm	8
	subsc
	var	4
	var	0
	line	112
	colm	18
	invoke	1
	line	112
	colm	12
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	pnull
	var	1
	int	2
	line	113
	colm	5
	subsc
	int	1
	line	113
	colm	8
	subsc
	pnull
	pnull
	pnull
	var	1
	int	1
	line	113
	colm	17
	subsc
	int	2
	line	113
	colm	20
	subsc
	line	113
	colm	15
	neg
	line	113
	colm	12
	asgn
	unmark
lab L5
	mark	L6
	mark	L7
	var	1
	line	115
	colm	4
	pret
lab L7
	pfail
	unmark
lab L6
	pnull
	line	117
	colm	1
	pfail
	end
