#dragonCurve

mx alex tax1a - 2020 (6)atax1a@infosec.exchange
2025-11-05

#postScript #dragonCurve

/bd{bind def}bind def
/1-{1 sub}bd
/1+{1 add}bd
/right{90 rotate}bd
/left{-90 rotate}bd
/forward{0 1 rlineto}bd
/pageSetup{
0.05 setlinewidth 2 setlinecap 2 setmiterlimit 0 setgray
3600 127 div dup scale % cm
15 7 translate % tweak this to keep the curve on the page
}bd
/dragonSetup{
newpath
0 0 moveto
}bd
% the curve turns 90 degrees left or right at each point.
% per wikipedia, you can obtain the direction of the turn
% by finding the bit above the lowest one-bit of the current
% iteration. this formula is due to hackers delight, probably.
/turn{dup dup 1- xor 1+ and 0 eq {left}{right}ifelse}bd
/dragon{-1 1 {turn forward} for}bd
pageSetup
dragonSetup
125 dragon
stroke
showpage

cc @jernej__s

2024-10-28

The Dark Side of the Dragon Curve

Full Version: youtu.be/7mbigfFo6Io

#creativecoding #dragoncurve #mastoart

2024-01-28

Genuary Prompt 28: Skeuomorphism

I abused my Selfsimilar Tiling code to create a Line Fractal.

The Sequence of the line segments gets jumbled up in the iteration process.

Full Musical Version: youtu.be/lKI5uT1nRs8

#genuary #genuary28 #genuary2024 #dragoncurve

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst