I’m finding that Mandelbulber is really addictive. First off, two Mandelbulb explorations:
I wised up and started doing a 1px field blur in Photoshop on the rendered images, which helps a lot in getting rid of sharp artifacts. On the first image I also painted in some dots and ran lens blur.
Next, a Mandelbox (Tglad’s variant):
I cheated a bit and used the liquify and oil paint filters in Photoshop to get a more surreal, painted look (hopefully giving it a little more humanity, making it less sterile).
Finally, a Menger sponge:
Going for a folk art look here. I will try very hard not to overuse the oil paint filter. I really will. I promise.
I’ve been playing around with Blender’s relatively new Open Shading Language support, and mmm, it’s powerful. I’m still bending my mind around shader construction, though — writing shaders is really different from writing graphics code the normal way. For example, here’s how you’d draw a circle in JavaScript on Canvas:
context.arc(x, y, radius, 0, 2 * Math.PI);
context.stroke();
But shaders don’t work that way. Instead, the shader program gets called for every pixel on the material, so you have to do something like this instead (using a distance field in this case, based on this GLSL code):
point pt = P; // The point that gets passed in
float x = pt[0]; // OSL uses array indices for x,y
float y = pt[1];
// Get the distance from (0, 0) to the point we're processing and then
// subtract from the radius to get the distance from the circle to the point
float dist = radius - sqrt(x * x + y * y);
// If dist < 0, point is outside the circle
// If dist > border, point is inside the circle
// If dist <= border && dist > 0, point is on the circle
float t = 0;
if (dist > border) {
t = 1;
} else if (dist > 0) {
t = dist / border;
}
// Add the intensity control and make sure the value >= 0
float final = abs(intensity / t);
// Create the output color (and drop the red channel by half)
color c = color(final / 2, final, final);
Longer, definitely. But also much more powerful. Here’s what it looks like rendered:
I’m not sure if doing a parametric circle like this would even be possible in Blender’s material nodes system, but with OSL it’s fairly simple (if a bit mathy) and very customizable. Add some more circles, a noise function on the distance field, and a little postprocessing and you get this:
Another example, where the OSL shader is on the box in the middle:
The shader looks at the x coordinate, and if it’s to the left of the divider (with a sine wave applied), it gets the blue material, and if it’s to the right, it gets the metallic material. It also adds the yellow band. Everything is exposed to the node system through parameters (inputs to the shader), so it’s easy to change values to get different looks:
(The lower right one is a bit more of a tweak, changing the band to emit light and using a clamped abs/mod combo instead of a sine wave.)
This is all just scratching the very top layer of the surface, of course. Now I just need to brush up on my math…
Some more Mandelbulbery, this time exploring the Mandelbox fractal instead of the Mandelbulb:
My process for these is to choose a fractal type in Mandelbulber, play around with the fractal parameters till I find an interesting shape, move the camera around until I get a good view, and render it. I then tweak the shader values (colors, specular, ambient occlusion, etc.) and the lights (position, color, etc.) and re-render till I get what I like. Finally I turn on depth of field and add a little fog.
Once I’m happy with the image in Mandelbulber, I export to PNG and open it in Photoshop to add some texturing. I also scale the image down a bit to get rid of some of the rendering artifacts. (It’s not wholly successful, but it does make a big difference.)
And here we are going for an underwater type of atmosphere (via aqua-colored fog and some vignetting in Photoshop):
Ever since seeing the IPython notebook, I’ve been thinking about how its notebook idea would be great for genealogical research. So I put together a (very rough) proof of concept:
Some notes:
A text-based query interface (the queries are in purple) to get information from a database. I don’t know that the best query language would be natural language like this — it’s more just to get the idea across — but the important thing is being able to easily do these types of queries against the genealogical information you’ve stored, enabling all sorts of analysis. “Who in my tree is born more than nine months after their father died?” “Who got married when they were younger than 12 years old?” “Who are all the children who died when they were younger than eight years old?” And so on.
Interleaving queries, their results, and other text (using Markdown, of course). This is the core notebook idea. Or you can look at it as an annotated transcript of a query session. Rather than just having a list of queries and their results, you sort of embed them in between your writing about the research. (Similar to literate programming.) For me, writing things out helps me to see what I think and wrap my head around the research.
There’s a lot of room for data visualization here. I’ve only shown pedigree charts and some basic tables, but it’d be easy enough to have a query return any other type of chart — bar, pie, fan, you name it. Including interactive things like the family analysis tool.
I didn’t include this in the mockup (because I, uh, just barely thought of it), but you could extend the query language to support hypotheticals. “Show me what William Crowder’s family would look like if he and Sarah got married in 1820” or “From now on, pretend Samuel Shinn was born in 1860.” And then following queries would act as if that were true. It’s nice to be able to establish a few suppositions and then see what the ramifications would be, whether they’re plausible, etc. Or to compare two different hypotheses.
Which brings us to the purpose of all this: to have a good place to do the rough, messy side of genealogical research. Thinking through things, seeing what comes of it, and keeping a record of the journey, basically.
Since the information in the database would be subject to change (as you do more research), it would probably be good to cache the results. Or maybe highlight the queries whose results have changed when you reload a notebook. Personally, I lean more towards caching, so that the notebook accurately represents the database at the time it was written (making it a valuable historical record of your research), but you could also look at it as a living document that updates automatically when the background data is updated.
Anyway, the proof of concept is just a static HTML page. I’m not planning to do anything more with it, but I wanted to get the idea out there.
At the request of one of my Twitter friends, I’ve thrown together a quick script to go through the conference transcripts (available as of today) and make a list of all the scriptures cited.
If a talk shows up more than once for a given passage, that’s because the talk cites that passage more than once.
Yes, scriptures.byu.edu does this, but it takes some time for new transcripts to get added to their index. This is a stopgap solution for the interim.
Watching general conference today, I was reminded again how absolutely critical it is to stay immersed in the word of God.
See, the world is seductive. The world is persuasive. And, in a lot of things, the world is dead wrong. But of course that’s not kosher to say these days (one of Satan’s victories, sadly), and in our tendency to try to fit in and be “normal,” we sometimes forget who we are and what’s actually true.
The solution — the only reliable solution, really — is to study the word of the Lord every day. I’ve found that the longer I go without being in the scriptures (or conference talks), the less real the gospel seems and the more rational and acceptable the world’s perspective starts looking. And that’s dangerous. Really, really dangerous.
And behold, others he flattereth away, and telleth them there is no hell; and he saith unto them: I am no devil, for there is none—and thus he whispereth in their ears, until he grasps them with his awful chains, from whence there is no deliverance. (2 Nephi 28:22)
If you don’t believe in a real, unseen devil who is (insanely) trying to dethrone God and, as part of his plan, trying to pull you down and turn you into an agent of evil, then yeah, scriptures and conference and commandments and covenants and all the rest don’t seem to matter that much. Try to be a good person and not hurt others and you’re good to go, right?
But the words of the prophets and apostles are clear and have always been clear: there is an adversary, a cunning, ruthless mastermind who wants to destroy everything good in this world and who will use any tactic he can to get what he wants. He’s not folklore or myth. He’s not the invention of campfire storytellers or the concoction of priests trying to control congregations. He’s real. And he’s deadly.
The thing is, it’s not cool anymore to believe in Satan — which, of course, is exactly what he wants.
I’m not saying we need to fixate on the devil and keep him in our thoughts continually. That’s ridiculous. But if we forget that there’s a devil, it’s not very hard to also forget that we desperately need a Christ to save us. Without a real evil, real good means nothing. It becomes watered down, diluted to the point where it makes no visible difference in our lives. And if there’s anything the gospel is meant for, it’s to make a difference in our lives. God gave us the gospel to change us, to raise us up and transform us from earthy mortals into gods and goddesses.
Getting back to the beginning of this post, the more we study and live by the word of God, the more clearly we see the difference between good and the fool’s good Satan tries to pawn off on us. Distractions and deceptions don’t work on people who truly live by the Spirit. And it’s not just defense — resisting Satan is merely the baseline, and God is certainly not defined as “not Satan.” He’s far more than that. If we’re living by every word that proceedeth forth from the mouth of God, strengthened by daily infusions of light, we’re filled with power to do good, to build the kingdom and make our home here a far better place in a lasting, eternal way.
If we want to stay true to the Lord — and that’s the only sane thing to do, honestly — then we have to make the word of God a part of us every single day. And if we don’t do that, it’s all too easy to be carried away by the winds of the world, tumbled down off the mountain of the Lord, over the foothills and through the valleys and out far into the wastelands till we finally forget who that God fellow was and why he even mattered.