Tag Archives: Valentine’s Day

Bonus Friday Post “Fractal Valentines Day!”

Many of you have probably seen this old XKCD comic:

sierpinski_valentine

But it takes a special brand of geek to see that drawing as a challenge. Here’s my first attempt and its axiom:

heartLSysFirstStage

heartLSys_lq

Unfortunately, L-Systems aren’t really designed well for curves. You can draw them, but you’ve got to do something like “move forward small amount, turn 1 degree, repeat 180 times”. In L-System code this looks like this:

“DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DF”

DF = Move D forward, E+ = Turn 1 degree

But this is Valentine’s Day, and Valentine’s day should be a little hard. So here’s attempt 2:

heart2LSysFirstStage

heart2LSys_lq

 

As you can see a little closer to the mark, but we’ve got some overlap and the heart is kind of pointy at the curve transition. For attempt three I did a trick I used to do with cakes. Take a square, and add two-halves of a circle to two sides:

heart3LSysFirstStage

heart3LSys_lq

And then because it’s me, I thought, “can we make the heart just a tidge taller”:

heart4LSysFirstStage

heart4LSys_lq

Now most people would stop there, but I played around with a couple of other variants:

heart5LSysFirstStage

heart5LSys_lq

heart6LSysFirstStage

heart6LSys_lq

And then I thought, well now that I have this heart object, what else can I do with it?

heart4CloverLSys_lq

heart6CloverLSys_lq

heart12CloverLSys_lq

Here’s the code for “Heart 3” my first successful attempt, which works with the programs in Chapter 4 of my book:

<?xml version="1.0">
<lSystemSpec>
 <imageAttr prefix="heart3LSys" lvl="6" scaling="0.5"></imageAttr>
 <ruleMappings turnAngle="15" length="250">
 <rule cmd="forward" char="F"></rule>
 <rule cmd="right" char="+"></rule>
 <rule cmd="left" char="-"></rule>
 <rule cmd="begRecr" char="["></rule>
 <rule cmd="endRecr" char="]"></rule>
 <rule cmd="move" char="fg"></rule>
 </ruleMappings>
 <transformations axiom="Cg[X]BgA-TfRS-[X]S-RTfA-Bg[X]">
 <replace char="X" replStr="Cg[X]BgA-TfRS-[X]S-RTfA-Bg[X]"></replace>
 <replace char="f" replStr="F"></replace>
 <replace char="R" replStr="DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DFE+DF"></replace>
 </transformations>
 <variables>
 <var char="A" value="9"></var>
 <var char="B" value="4.25"></var>
 <var char="C" value="-4.25"></var>
 <var char="D" value="0.034906585039886591538473815369772"></var>
 <var char="E" value="0.066666666666666666666666666666667"></var>
 <var char="S" value="3"></var>
 <var char="T" value="4"></var>
 </variables>
</lSystemSpec>

Technically the “R’s” should be replaced with the whole long string and you can get rid of the R replacement rule, but I left it this way for readability. High-quality versions of the image are available by clicking on the image.

Happy Valentine’s Day, especially to you, the little red-haired girl 😉

2 Comments

Filed under Uncategorized

Copy Center “The Dance”

The following is a story I wrote about ten years ago. A girl I liked couldn’t decide whether to go with me or someone else to the valentine’s dance. Feeling frustrated, but wanting to put that frustration to good use, I wrote this. While I have changed a word or two here and there, I swear the ending is as I wrote it 10 years ago:

Monday’s Harold Emmet sat behind the glass wall of his office awaiting his next customer. There were actually five Harold Emmets, one for each day of the week, and this happened to be Harold’s day at the office instead of being home with his extended family. This Harold actually enjoyed being at the office more than the chaos of home. He sometimes filled in for other Harold’s simply to experience the joy of seeing his name printed on the glass of his office in big blue letters.

His next customer was a pretty blonde, tall and thin, a carbon copy of the world’s current image of beauty. The year before his largest clientele had been brunettes but he didn’t care enough to argue about taste. It took all kinds to make a world, and he had a certain variety for himself.

The girl seemed to have built up the courage to knock on his door, and he pushed the button that slid it aside in a large friendly gesture. He indicated the seat in front of his desk, and the blonde slid into it neatly. He made the mental observation to himself that a blonde might be a nice change a pace, and began his pitch.

“Hello, and welcome to our little copy center. I hope the people out front were friendly.” Harold said, extending a hand “Sometimes they can be a little prying with the forms.”

The blonde shook her head. “No, everything was fine.”

“Good, just a few more routine questions and we can have you on your way, Miss…?”

“Bansom. Rebecca Bansom.”

“Ah… good. We like to make sure that you’re the original and not a copy trying to do a second burn.” Harold tapped another control which brought a thin image screen into position on his desk. Scanning the information displayed, he commented. “First timer, eh? The boys out front like to send you to me cause they say I’ve got a friendly looking face. I think that’s rather nice of them, but a little complicated when you consider there are four more of me running around.”

“You seem like a very nice man, Mr. Emmet.”

“Call me, Harold. So why have you decided to come to us Miss Bansom? I know it’s not always easy that first time.” Harold leaned back sympathetically in his chair.

“Well…I need it…I mean her,” Rebecca said shyly “to go to a dance with me.”

Harold tried to conceal a frown. He hoped this wouldn’t be one of those cases. Some people have a rather unusual love of themselves, that thanks to the miracle of technology, can take on a new extreme. Rebecca seemed to sense this attitude and responded quickly. “It’s nothing obscene or anything like that. I just need her to help me solve a problem.”

“What sort of problem?”

“Well…I’m not sure you could guess this Harold, but I’m the sort of girl who attracts well, numerous suitors.” Bansom was reddening a little at this point, but she also seemed pleased at the thought as well.

“I could imagine,” Harold smiled, “How are you planning on using your copy to solve the problem?”

“Well, I think it would be obvious. There are two guys who are really great, Seth and Gene, both intelligent, handsome, and both have madly declared their love for me. Trouble is, I can’t choose between them. I don’t want to hurt either of them and I really want to go to the dance with both of them. So I will.”

Harold was bemused by this elegant solution, “So you’ll dance with one, and your copy will dance with the other. Which one will it be for you?”

“Both.”

“Rebecca, I work in duplicated people, but I can’t actually make you be in two places at once.”

“I know that, Harold. I’ll dance with both of them and so will she.”

“Wouldn’t it be sort of hard to hold a conversation with these guys if you’re switching back and forth?”

“It’s not about the talking, silly, just the dancing. Seth and Gene will be too busy noticing how beautiful we are to notice what we say. Besides, if she’s a copy of me won’t she think in the same patterns?”

“Well yes, but it wouldn’t duplicate actual words. You wouldn’t even know what the other guy said. In fact your clone might have just as much trouble choosing…” Harold caught himself when he thought of his commission. “Well, I suppose it would be alright. Just don’t do anything you wouldn’t do, as we like to say around here.”

Rebecca laughed and got out her credit card. “It isn’t too expensive is it?”

Harold shook his head forward as he passed the final forms across the table for her to sign. “Equipment’s pretty cheap these days, and our initial investment has paid off very well, so we’re able to do better on our per customer rate.”

Rebecca slid the card over to Harold. “You’ve been very nice, Mr. Emmet. Maybe I should clone myself for you too.”

“No thanks, Miss Bansom.” Harold said sliding the card back across the desk. “Things are confusing enough at home as it is. We collected your DNA from your chair, and with our advanced metabolic growth process, your copy should be ready in about fifteen minutes. You have a pleasant afternoon, and a fun dance.”

Rebecca smiled as she slid out the door, and Harold pushed it shut again. He lit up another cigar and leaned back chuckling to himself. ‘Maybe a blonde wouldn’t be such a good idea.’ He pondered thoughtfully. ‘Guess I’ll stick to redheads.’

2 Comments

Filed under Short Stories, Writing

Little Red Haired Girl

Today is the fifth anniversary of my wife and I’s first Valentine’s day together. I was still a student at OSU and classes were canceled due to weather.  She picked me up and we played Risk and drank hot chocolate and ate a cheesecake pie I made with just a bowl and a fork.  Five years later we’re still keeping things simple but fun for both of us.  She creamed me today at Monopoly, we ate homemade lasagna, and watched 30 Rock. The best part of it all was spending the time with my little red haired girl (my wife, I’m kind of a big Peanuts fan if you hadn’t guessed).  There’ll be a full post tomorrow, but for what remains of the day, Happy Valentine’s Day! Spend it with someone you love, and spend it doing things you both enjoy.

2 Comments

Filed under Introduction