Monday, December 2, 2024

Random Programming Project

I used to write software for a living, and every once in a while I pick a fun project and mess around with it a bit. My current project is a program that will create a digital fore-edge image.

What's a fore-edge?

It's the surface of a book opposite the spine, where the red arrow is pointing.


What's a digital fore-edge?

Okay, so there are a couple ways to put a picture on the fore-edge. The most common way is to literally hold the pages closed and paint it. That gives you the best results, but it's expensive and only some printers offer it.

The other way is to print a slice of the image at the very edge of the page when you're printing the text of the book. When all the slices are put together, you have something like the original image.

For example, if I wanted to put this b&w dragon on my fore-edge (green background added for clarity):


First, I would slice the picture up sort of like this:

Then I would put one slice at the margin of each page of the book and when the book is held closed (or maybe with the pages slightly flexed), you would see the dragon.

That sounds easy

I mean, yeah, it's not that hard in concept. But the way they print books adds a few complications. Basically, they start with a larger page, print the words, and then chop off the edges.

Except...

There's a margin of error when cutting off the edges. So I need to account for that.

Anyhow, it's not really all that complicated. I'm using Python and I was able to quickly create a program that adds an image to a page on a pdf, so I know it can be done. (Then I changed a bunch of stuff in my program and broke it completely. This is how we code.)

How do you test it?

Yeah. This is one of the drawbacks. I won't know for sure if my program works until I load the paperback and buy a copy. (I'll probably use Barnes & Noble, because they allow authors to load a book and not make it public.)

If it works, great! If it doesn't... this could get expensive to debug.


Anyhow. This is what I do for fun.

Belated Holidailies

Hey, did you know that December started yesterday? It wasn't until KarenD left a comment on an old blog entry that I remembered it's time for Holidailies, the blog every day challenge for December (plus January 1st, if you're following the rules).

So, a quick introduction: Hi, I'm Theresa! I raise kittens and write books. I also dabble in other crafts that I am pretty terrible at, which makes them fun. I live in California with a dog and two feral cats.

I can't actually remember how many kittens I've raised this year, but I haven't had less than two litters at a time for the last four months, so it's a lot. (It's been a bad kitten season.) I currently have nine kittens in the house, though these five are leaving tomorrow to go find their forever homes.

(The Squashes: l-r Butternut, Sugar Pie, Spaghetti, Delicata, Acorn)

That leaves me with four tuxedo kittens who have a tentative surgery appointment in seventeen days, so I will be stuffing them with food at every opportunity to maximize their chances of being big enough by then.

My publishing schedule has been a little bare this year, with just one omnibus (Penelope Standing Unleashed) and one new book (Theoretical Magic). But I'll have a couple of books out in the first quarter of next year, so it will even out.

One of the reasons I only had one new book out this year is that I narrated an audiobook (Shift Happens — that's the Audible link since that's what most people use, but it's also available from Kobo and Spotify and maybe even your library), which was a monumental undertaking. Now that it's done, I'm really happy with it and I learned a ton, both about narrating and writing. But it took me a lot more time and effort than I had planned.

Anyhow, hello, and welcome back! I can't wait to see what everyone else is blogging about this year!

Friday, October 11, 2024

When Kittens Go Bad

With ten bottle babies in the house currently, pretty much every time I turn around it's time to feed a kitten. But it does mean that I have an abundance of kitten photos at the moment.

This kitten is actually adorable and sweet. I still think this image is funny.

Is it spooky? Meh.



Thursday, October 10, 2024

As Long as it Works

I may have achieved either peak redneck or peak MacGyver over here. Or possibly I am just a cautionary tale about idiots owning a home.

Anyhow, I had my kitchen faucet replaced a few years ago. I was going to do it myself, but then I couldn't get the valves to turn off under the sink and my plumbing rule is that if the water to the house has to be shut off, I'm paying someone else to do it.

The problem is, the faucet I used to replace the previous one (which was literally crumbling to pieces, was a cheap piece of crap. After a couple years, the handle got loose. Then it started falling off, which is a pain because I had to slot it back on the stem while the water was running.

View of the underside of the handle

But I lived with it like that until I realized I couldn't leave it like that when my petsitter came by. That was when I looked more closely and realized I could shove an allen wrench through the hole in the handle and tighten the screw that holds it on the stem. Problem solved.

... for about six months. Then it got loose again. I ignored it for a few months, then tightened it again. And so on. But lately the time between tightening and falling off has been decreasing to days, so I looked more closely — the metal ring that fits on the stem is broken. So every time I tighten it, it just opens a bit more.

View inside from the bottom

Ideally, I would replace the faucet, but I'm between plumbers at the moment and I don't feel like dealing with it. This is my solution. How often do I need to use my socket wrench anyhow?

New handle created by parts from my socket wrench set

It works great.

Wednesday, October 9, 2024

Random semi-spooky "art" - day 9

Once again, I'm realizing that I was influenced by Lisa Frank during my formative years, so asking me to produce "spooky" is like asking a neon dolphin to solve a Rubik's cube. I mean, it could happen, but it would probably be by accident.

Today I tried to draw a pumpkin. A four-year-old can draw a pumpkin, but I required an artistic filter to fix what I'd done. Then I tried to make it fun. Is it spooky? Not so much. But I kind of like it.



Tuesday, October 8, 2024

Random semi-spooky "art" - day 8

Today I was just playing around in GIMP. This wasn't what I intended to make, but I like it better than what I had planned.

Is it spooky? Well... I think I would call it more "atmospheric". Click on it to make it bigger — that improves it.



Monday, October 7, 2024

Random semi-spooky "art" - day 7

I decided to go back into DazStudio today and try to get the dForce stuff to work. The idea is that you have clothing with certain values set such that it hangs naturally on the 3D model when you tell it to run the simulation.

Since non-hooker clothing is rare in Daz, I was excited to see a nice shirt. It's a little hard to see here, but it's what's known as a "batwing shirt".


The problem is, when I put it on the 3D model it looks like a puffy jacket before I run the simulation, and when I run the simulation, it goes completely off the rails. This is where it was going when I finally killed it off today. The tornado of gold polygons heading off to the upper right corner is the shirt.


I have no idea what I'm doing wrong. Oh well.

Anyhow, while I was in Daz Studio, I messed around with some options and made a green person. I should have worked on the lighting a bit, but I'd already wasted a bunch of time on that shirt simulation, so... Yeah.

Is it spooky? No, not unless you are frightened by my complete lack of perfectionism. Maybe I'll re-render it someday with lighting that doesn't wash out all the features. But dang, those trousers look great!