shithub: 9intro

ref: a351bcdccdf5a4273bc8dc3360a48fbb8b8aa9ea
dir: /9intro.pic/

View raw version
define tower {
	scale=1/$1
	right
	shift=0.25
	boxht=1
	boxwid=shift*2
	A: box fill 0.9
	B:box fill 0.9
	C: line from A.nw to A.nw + (-shift, shift)
	D: line from A.ne to A.ne + (-shift, shift)
	E: line from B.ne to B.ne + (-shift, shift)
	F: line from A.sw to A.sw + (-shift, shift)
	line from F.end to C.end
	line from C.end to D.end
	line from D.end to E.end

	boxht=0.1
	for b = 1 to 4 do { box fill at A.nw + (shift, -(b*boxht) + boxht/2) }
	box fill at A.sw + (shift, boxht/2)	
	box fill at B.sw + (shift, boxht/2)
}

define xterm {
	scale=1/$1
	outwid=0.8
	outht=0.45
	inner=0.9
	boxht=outht
	boxwid=outwid
	A:box
	B:box fill 0.95 wid outwid*0.9 ht outht*0.9 at A.c
	line from B.nw to A.nw
	line from B.ne to A.ne
	line from B.se to A.se
	line from B.sw to A.sw

	C:line from A.c + (-0.25, 0.3) to A.c + (0.25, 0.3)
	line from A.nw to C.start
	line from A.ne to C.end

	box fill 0.5 ht 0.2 wid outwid/2 at A.c - (0, outht/2 + 0.1)

	D: line from A.c + (-0.5, -0.5) to A.c + (0.5, -0.5)
	E: line from A.c + (-0.6, -0.6) to A.c + (0.6, -0.6)
	line from D.start to E.start
	line from D.end to E.end
	box fill 0.95 wid 1.2 ht 0.05 at E.c - (0, 0.0125) 
}

define flatpanel {
	scale=1/$1
	panelscale=40
	bht=9/panelscale
	bwid=16/panelscale
	A:box ht boxht wid boxwid fill 0.95
	B:box ht boxht*0.9 wid boxwid*0.8 fill 0.9 at A.c
	line from B.nw to A.nw
	line from B.ne to A.ne
	line from B.se to A.se
	line from B.sw to A.sw
}