mysticsymbolic / mysticsymbolic.github.io

Fun with procedurally generated visionary art!
https://mysticsymbolic.art/
Other
52 stars 11 forks source link

Mating Halves #40

Open ninapaley opened 3 years ago

ninapaley commented 3 years ago

I want to add a YELLOW ( FFFF00 ) line to denote some symbols can function as "halves." halves sketch Translation of my messy morning handwriting in the illustration above:

Yellow line snaps to other yellow line. Then nest something on top of it! Then consider this unit a symbol. CENTER it.

The yellow lines determine scale; scale each "half" so the yellow lines are the same length, then superimpose the lines over each other and you have a new half-and-half symbol. Their respective ANCHOR points (red) should be pointing away from each other.

Then nest another symbol on top of the "seam." The "seam" overrides the magenta bounding boxes on both halves; once two halves are mated, ignore the magenta boxes completely. The size of the nested symbol should be proportionally smaller than the yellow lines (per the illustrations below in which I visualized it generating a transparent blue virtual bounding box).

Then consider the whole unit a new symbol, and center it in a "creature."

tail half hand half halves demo - line box halves demo - nest halves demo

Symbols with yellow lines don't have to be mated as halves, they can still function as regular symbols, as the "fish_head" and "fish_tail" already do. (This is why the blue CROWN and dark red TAIL points are different in the examples above; only the ANCHOR points should determine orientation of halves when mating.) But they can also mate with other halves per above.

Does that make sense @toolness ? If it does, can you make the system not explode if I start putting yellow lines on a few symbols? I will wait until you give me the all-clear.

toolness commented 3 years ago

Ooo, ok I still need to look more closely at this, but for now, I think it might make sense for me to do the same thing I just did with making the TOML files less explodey and simply log warnings if we find spec colors that we don't know what to do with, instead of exploding outright. That way you won't have to wait for me to add non-exploding support!

ninapaley commented 3 years ago

OK! Look out for the occasional yellow lines and hopefully I won't screw up too many other things without noticing.

toolness commented 3 years ago

Cool! Er just FYI, I haven't yet added the code to make it not explode when you add yellow, but I will soon!

ninapaley commented 3 years ago

OK, let me know when you do! I will hold off until then.

toolness commented 3 years ago

Ok I just added support for ignoring unrecognized spec colors in 6ce30b1... Can you try uploading just one SVG with the yellow specs to see if it explodes or not? I'm crossing my fingers that it won't but it might be easier to debug if it's just one that causes things to go awry.

ninapaley commented 3 years ago

Upload of first symbol with yellow line successful! Here it is in situ: capricorn tail in situ

ninapaley commented 3 years ago

We will need a line like "always_mate_half" in the TOMLs for some of these. Some will only look good when mated to other halves, and shouldn't show up by themselves.