yomikoma: "Yomikoma" in Circular Gallifreyan (gallifreyan)
[personal profile] yomikoma
An abstract circular diagram with inscribed triangles and hexagons, in black calligraphic lines on a white background. An abstract circular diagram with inscribed triangles and hexagons, in black calligraphic lines on a white background.

I came up with this two weeks ago, just spending some time noodling with postscript and the libraries I've written to make it easier to work with. Here's the source:

%!
(dmmlib/base.ps) run
(dmmlib/lines.ps) run

/ncircle { /n arg /rad arg /y arg /x arg
    x y translate
    n {
        0 0 rad 90 dup 360 n div add sparc
    } circrepeat
    closepath
    x neg y neg translate
} def
/tcircle { 3 ncircle } def
/hcircle { 6 ncircle } def

/HexaSomething {
    gsave
        32 recip setlinewidth
        0 0 0.5 tcircle cstroke
        0 0 1 tcircle cstroke
        3 {
            gsave
                0 -1 translate
                0 0 1 hcircle cstroke
                { 0.5 -0.5 goto 0.5 -1.25 goto cstroke } hmirror
            grestore
        } circrepeat
        3 { 0 -1 1.5 -60 -120 arcn } circrepeat
        closepath cstroke
        3 {
            0 1 1.5 60 120 arc
            0 1 goto
            closepath
            cstroke
            0 2 0.5 tcircle cstroke
        } circrepeat
        6 { 0 2 goto } circrepeat closepath cstroke

        6 { 2.250 0 dot } circrepeat
        6 { 0 2.5 goto 0 2.75 goto cstroke } circrepeat

        0 0 2.75 hcircle cstroke
        0 0 3 hcircle cstroke
    grestore
} def
%%EndProlog
72 softscale
4.25 5.5 translate
1.25 softscale
HexaSomething
showpage

Hopefully you can see how my circrepeat and hmirror (yes, there's also a vmirror) make it easy to play with lines and come up with something fun without much tedious work. Some of this was happy accidents - the triangular structure connecting to the outer pie-shaped pieces was supposed to be a large triangle with rounded edges, but I messed up the arc direction and decided I liked this better. I'm proud of making it easier for myself to easily create.

Date: 2022-11-10 10:29 pm (UTC)
cnoocy: green a-e ligature (Default)
From: [personal profile] cnoocy
I see that there are useful functions in there but not how they produce that exact image.

Date: 2022-11-11 12:45 am (UTC)
cnoocy: green a-e ligature (Default)
From: [personal profile] cnoocy
Yes, especially if you used it as a way to document your libraries.

May 2025

S M T W T F S
    123
45678910
1112131415 1617
18192021 222324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 17th, 2025 12:16 am
Powered by Dreamwidth Studios