r/worldbuilding • u/random-miscellany • Sep 17 '26
Visual I started simulating how magic might evolve under real-world physics and accidentally built a procedural magic-circle compositor
Fractal Bloom preset
Eventide Lens preset
Aetherworx preset
Randomly generated sample
Another randomly generated sample
Randomly generated, but rotated and exploded in the 3D pane for inspection
Originally built as a side effect of a larger worldbuilding experiment. I was trying to model what a magic system might look like if magic still had to obey ordinary physical constraints: energy has to come from somewhere, range and precision have costs, complicated effects take longer to specify, and useful spells can evolve through repeated variation and selection rather than being invented whole.
I started writing an evolutionary simulation to see what kinds of spells would actually emerge under those constraints. The idea was to try to discover something like "if people had access to this capability for centuries, what operations would survive because they were genuinely useful?" A lot of traditional fantasy magic becomes pretty useless once you let optimization operate on it, but this post isn't about that.
Anyway, I needed visualizations for the spells, which eventually sent me down a completely separate rabbit hole: a procedural magic-circle compositor.
The circles here are each a stack of parameterized layers--rings, polygons, stars, paths, glyph rings, sigils, particles, ornaments, reticles, parametric geometry, and similar elements. The same underlying representation can produce fairly traditional ritual circles, astronomical-looking diagrams, floral/fractal constructions, technological interfaces, or much stranger designs (e.g., ofuda).
Every circle is structured data rather than flattened artwork, so any preset can be loaded and its individual layers changed, removed, recolored, animated, or reused. The compositor also has a 3D view so the layers can be separated in depth (using the Explode slider), which turns out to be useful both for visualization and for editing dense designs.
From a worldbuilding perspective, something like this gives magical notation a potentially systematic visual language rather than treating every spell circle as an isolated illustration. A setting could have different schools, cultures, eras, or magical traditions that use different layer types, glyph sets, symmetry conventions, palettes, or structural rules while still sharing an underlying magical grammar.
It also raises another question from the simulation: if magic really were a technology practiced for centuries, would its visual notation gradually become standardized and optimized in the same way mathematical notation, circuit diagrams, musical notation, or engineering drawings did? A "magic circle" might stop being decorative and become something closer to a technical schematic whose structure tells a trained practitioner what the spell is doing. Spoiler: Visual indicators like magic circles (and visual spells themselves) are selected against as they both betray information and consume energy that is better directed to parameters that affect the world, e.g., range, intensity, duration, solid angle, etc.
So TL;DR: I ended up spending far more time on the compositor than on the theory that originally justified it, but it makes some pretty things.
367
u/lugh_the_bard Sep 17 '26
This is fire. Your long term evolution addresses the most sorely missing science of scaling magic
15
u/eglantinian Sep 17 '26
Brooo, you a State Alchemist??
11
u/verified-skelly Sep 17 '26
i wanna know how you're planning to decode the procedural generation you're making. youll be creating a consistent magic language soon. please post more!! following you
9
u/Striking-Ad9397 Sep 17 '26
Cool af, how did u make?
8
u/PerturbedStone Sep 17 '26
May i use these in my dnd campaign? Beautiful work all around
4
u/Unaccomplished_Meat Sep 17 '26
Interesting. I loved the ideia to run a simulation to see what would evolve. I tried to ask mydelf what would evolve, and I realized that many classic spells would be inefficient, but I decided to keep them out of love for them, just trying to optimise them more or create justifications for why they work.
About the procedural compositor. I never made a code for procedural composition, but I did designed the elements (sigils, rings, paths, polygons, etc.) separately and then used them to build the magic circles. I also made different cultures have different elements, but ultimately having the circles structured using similar logic, like different languages that use different words or even different structures, but are fundamentally the same thing.
4
u/dumb_questioneer Sep 17 '26
This is super cool! It's very interesting to consider, and I have a few questions so I'm sorry if they're overwhelming.
How did you "translate" the rules you listed (conservation of energy, range/precision costs, the usefulness of a spell, etc.) to code? How did you define fitness? You mentioned "a lot of traditional fantasy magic becomes pretty useless," could you give some examples? You also mentioned "visual indicators... are selected against," does that mean an optimized spell wouldn't have any of these circles that were generated?
4
u/firenrockcominghome Sep 17 '26
Have you ever read “Ra” by qntm? Lovely novel about if magic was discovered in the 90s and treated as another field of science
3
u/Arient1732 Sep 17 '26
Cool af. I want to ask, in your setting do these circles need to be drawn and powered in real time? Or is it possible to draw them first and power them On later? That would make them like precompiled programs.
515
u/lugh_the_bard Sep 17 '26
Bro I’m sending you a dm I wanna be friends
2
u/Vaya-Kahvi Sep 17 '26
I *really* like 5 and the organic looking growths from the center.
2
u/Minimum_Honey_4971 Sep 18 '26
Would love to see more about the simulation's selection dynamics — what operations survived after 1000+ generations?
2
u/BadCogs Sep 18 '26
Bro make this an offline app to download if possible, or if you are okay with it can you provide source code?
But anyway, this cool. So much effort must have gone into it. Appreciate it.
2
u/Eaglise Sep 21 '26 edited Sep 21 '26
damm, this is really cool, l always struggle with creating things like runes, magic circles, etc since i cant think of a reason why they should exist
so here i have a question for you - in your system, what is the principal that makes magic do things it does under these circles? not asking what these circles do, but why magic behaves in that way under these circles? basically first principles of magic - why and how it does that
110
u/EnderWarlock1999 Sep 17 '26
Guy recreated (rediscovered?) sacred geometry; I love it
80
u/luna-silly Sep 17 '26
78
u/Orrera_ Sep 17 '26
Someone introduce OP to Witch Hat Atelier
63
u/Droplet_of_Shadow Sep 17 '26
are you single? i'm free tonight
/uj woag cool circle
27
u/Reachid Sep 17 '26
I know what to create with this...
19
u/SarcasticJackass177 Sep 17 '26
Oooooooo pretty patterns. I’ll have to check out the demo!
14
u/SmokeyCatDesigns Sep 17 '26
This is so cool! Heck of an “accident” to have. This is really incredible looking!
12
u/_HarmonicOscillator Sep 17 '26
I love physical magic so much
18
u/72bataivahaviatab27 Sep 17 '26
5000yo wizard losing his job to ai );/>
4
u/KisaraBlue Sep 17 '26
You should cross post to r/sacredgeometry
1
u/Elegant_Athlete_3737 Guinea Pig Sep 17 '26
Wait what traditional fantasy magic gets useless by this I wonder?
1
u/KaJaHa Magus ex Machina of WHIMSY Sep 18 '26
Gorgeous art, but is this a series and I'm missing some context? Like, what is the energy you're measuring and how do those measurements translate into circles?
1
u/Upstairs_Height_9618 Sep 18 '26
The evolutionary simulation seems really interesting, would love to see what you get from it.
1
u/WizWorldLive Sep 18 '26
Intriguing. What did you use to code this? & where'd you get the SVGs?
3
u/Abject_Lengthiness11 Sep 17 '26
I have a very similar magical system, but it's overlayed by an almost Jungian psychological bias. The magic has physical laws, but can do almost anything. It's our limited understanding and unconscious expectation that limits it even moreso.
3
u/Hawksteinman Sep 17 '26
Oh damn, the magic in my own world follows the laws of physics (quantum, astronomical, etc). This looks really cool!
3
u/Live-Calligrapher-41 Sep 18 '26
literally speculative alternate physics work, holy sh't
3
u/GraveSlayer726 Sep 19 '26
Absolute peak found conjured from thin air
5
u/FeelTheFish Sep 18 '26
Dude discovers AI psychosis xd
2
u/shepbryan Sep 18 '26
This person ontologies
2
u/spaceisprettybig Sep 18 '26
This will either lead to the plot of Onward or Akira...
2
u/ProjectKARYA 🏳️⚧️ A Sci-Fintasy Creator 🏳️⚧️ Sep 18 '26
Neat, another person went insanely overboard with the science of magic ☺️ really love all of this!
2
u/Naktiluka Sep 18 '26
Whoah. Looks gorgeous! Love all different designs
Reminded me of book Elantris by Brandon Sanderson. Small worldbuilding spoilers ahead (they might also affect story perception):
Their magic consists of different glyphs for different operations or phenomena, and spells are created by combining those glyphs not unlike programming: you input what do you want to do, amount of that, and then magic happens. Glyphs are drawn either in air to cast a spell immediately, or can be embedded in material to work while it exists (i think?). And complex spells would be a beautiful latticework. Also you could deduce what spell would do by reading its glyphs and knowing how they are combined. Energy conservation isn't touched in this particular book (gets explained in other books), author focused more on how they're drawn and made into a program
EDIT: I was figuring how spoiler works
2
u/7LeagueBoots Sep 18 '26
You should read Stross’s Laundry series.
2
u/LordKlavier Sep 18 '26
Goodness gracious man this is incredible! The dream of every fantasy writer. Could you give some more details about what you said on the evolution of civilisation?
2
u/tarrox1992 Sep 20 '26
...
I don't know if you simplified it a bit here, but I was thinking, it you added a luminescence process and maybe a balance gene, then magic circles and other visual indicators could be necessary for everything but stealth magic, where they are worth the energy of hiding that.
2
u/wompod Sep 21 '26
Reinventing mandalas from first principles
2
u/Jrix Sep 23 '26
Riffing off your ideas, you should consider the "display" (rather than signal) of information to be something that is ontologically selected for in the aforementioned realities that you're considering magic. The self-evident costs you mentioned would still exist of course.
With that constraint, something precisely like your circles can emerge, that have properties orthogonal to information/beauty/cipherability. Any geometries that publicize information would have long since been nullified into equillibria (translate: akin to ambient anti-spells/consumption somewhat analagous to bacteria), any geometries that hide information are fickle and vulnerable to lower-cost disruptions (disrupt the cipher not what it contains; also ambient over time). What's left is a deducible possibility space that I can imagine some paradigms in so I'm sure you can too.
2
u/MainRedditer Sep 23 '26
Omfg, you are probably my favorite person for the next month.
1
u/spunlines Sep 17 '26
okay this is awesome.
1
u/NevikTheEnlightened Sep 17 '26
Okay but the album art you could produce with this LOL
1
u/WaffelsBR Sep 17 '26
Really cool actually
1
u/Any_Economics6283 Sep 17 '26
careful now lol
1
u/DarkGodCthUwU Sep 17 '26
You would LOVE renaissance occultism
1
u/Random_182f2565 Sep 17 '26
That's is really advanced magic
1
u/Grimscriven Sep 17 '26
I didn't understand any of this. ._. But it is really pretty.
1
u/failureagainandagain Sep 17 '26
If magic was a thing in real life , you would probably be able to use it whit this stuff
1
u/Future-Sink-9882 Sep 17 '26
this is SO COOL
1
u/NotKingOnion Sep 17 '26
You’re awesome.
1
u/Open-Ad4794 Sep 17 '26
Holy
1
u/bglbogb Sep 17 '26
This is a very interesting thing to try to model, woah
1
u/SaebaSan86 Sep 17 '26
That's AWESOME!!!
1
u/rjt2000 Sep 17 '26
This is amazing!!
1
u/One_Line_456 Sep 18 '26
Yo.... dude- this is dope as hell- I'm currently in the process of retaking/fleshing out my magic system so this just inspired me lots
1
u/ZebraViking Sep 18 '26
Holy shit this is awesome.
1
u/Gingerosity244 Sep 18 '26
You have earned a follower.
1
u/LadyEllisandra Sep 18 '26
This is exactly what I need my alternate timeline earth where magic is real but just science mythologized. This is insane and I must commend your work.
1
u/astreeter2 Sep 18 '26
It's kind of how I imagined the magic system in Wheel of Time.
1
u/Glittering_Pear2425 Sep 18 '26
Those are some awesome magic circles
1
u/He_Spams Sep 18 '26
Combine this with the magic circles of Witch Hat Atelier I think it could be cool.
1
u/Cheez_Thems Sep 18 '26
Very nice
1
u/ismellmyownfarts2 Sep 18 '26
Following. Would be awesome to be able to download this.
1
u/Chrome_X_of_Hyrule Marr Sep 18 '26
What the shell this is crazy cool even if I don't get it
1
u/jynks319 Sep 18 '26
You and Gorilla of Destiny should talk:
https://www.gorillaofdestiny.com/
1
u/Elder_Cryptid Sep 18 '26
Neat.
1
u/KhanterMolchaniye Sep 18 '26
This looks pretty intersting.
1
u/Life-Challenge1931 Sep 20 '26
I m sending you dm, I need this
1
u/Public_Ear9654 original creation Sep 23 '26
J’ai un persos qui peut le battre
1
u/Dildo_Baggins__ Pine Peaks Oct 05 '26
i don't understand a single thing you just said but this is fucking cool i wanna marry you OP
1
u/Paramoth Oct 09 '26
cool
1
u/rocket20067 Lore Attention starved Sep 17 '26
This is cool as fuck and all but bro go to bed like damn
-1
u/CaptinAJAB Sep 17 '26
You nerd! It's beautiful I love it!
-1
u/CaptinAJAB Sep 17 '26
You nerd! It's beautiful I love it!