Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Command: perl -pe's/.*([0-9a-f]{6})./\U$1/' input | dc -fpart2.dc
- # ASSUME: Every line is a 90 degree turn (just swap x and y on the stack each time)
- 16i # hexadecimal input
- 0d ? # y x colour
- [
- 10~ # y x len dir
- 2~ # y x len upleft=dir/2 vert=dir%2
- 2*1- r2*1- # y x len vert=(1|-1) upleft=(1|-1)
- 3Rd lb+sb * # border += len; y x vert delta=upleft*len
- d 4R+ _4R # x+=delta y vert delta
- *r d3R * # x y vert*delta*y
- la+sa # area += vert * delta * y; x y
- ? z2<M
- ] dsMx
- [Part 2: ]n lad*v lb+ 2/ 1+p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement