06NovMusings Comments Off
There is still one more part of Color Curves yet to be written, but it requires significant research and development into methods of algorithmically generating intermediary control points between the two blended colors, taking into account neighboring control points. (For the transition between two curves to be visually smooth, it must be continuous, which means that the end point and the control points on either side must be collinear, i.e. they are all in a straight line.)
But that is a post for another day. Today’s post requires much less education in maths to understand. The topic: chat ranges!
Attention: Maths ahead! Non-geeks may prefer to avoid the equations, and just look at the pretty colors instead.
Previously, on Jacek Writes: our hero introduced the topic of smoothly blending between two colors algorithmically.
Last time, I defined an equation for blending linearly between two color vectors
t, increases from 0 to 1:
line(t, a, b) = a + t * (b - a)
After a little algebra, we can rewrite that function as:
line(t, a, b) = (1-t)(a) + bt
Linear blending looks just fine for blending between two colors, as demonstrated above. Starting from the left, we progress from red to blue, passing through magenta and purples. Looks pretty good, right?
I wrote a post about “section radius” recently, which involved drawing curves with a discreet number of anchor points. The application there was a more robust replacement for the Taper attribute of prims. Of course, the usefulness of using a curve instead of one or two numbers is not limited to Taper alone—there are innumerable other uses for them, completely aside from the Object attributes.
One of my backburner obsessions for the past few months has been color. (No surprise there, given that I’m currently enrolled in a color theory class, I suppose.) In particular and with regard to SL, two aspects have been on my mind. The first is using a base color as input to an algorithm to generate related colors (lighter tint, darker shade, blue-shifted, red-shifted, visual complement…). The second is blending between two colors in a smooth and visual appealing fashion.
This is where curves come in.
I didn’t conciously realize this when I first started writing here, but my feature requests have a very specific agenda. To put it succinctly:
I want Second Life to be more like a high-level 3D modelling application.
Yes, every Linux-using Resident of Second Life is now brimming over with love and affection for Tofu Linden, the Linux client developer for Linden Lab!
Today marks the first time the Linux client has had any sort of file upload/download capacity! Right now it’s pretty rough around the edges, as there is still no file browser/picker, but it works! (Just rename the image to upload.tga and place it in your SecondLife/your_name/ folder, then use the upload menu item.) Tofu tells us that the file picker is in the works, which is also very nifty!
What I’m proposing here is fairly radical, in that it represents a very different method of building in Second Life. But, like everything I propose, it is not only possible, but feasible; I could devise the algorithm for it myself, with a bit of research as needed. This feature would require a more significant change to the data structure for prims than before, but the possibilities are astounding.
Throw away the Taper attribute for objects. It was great, but it will be made entirely obsolete by the feature I am proposing: section radii. Instead of describing the relative size of the beginning and end of the prim, as Taper does, Section Radius would describe the size of the prim at every point along its path.
NB: Every prim, with the exception of Sphere, can be represented as a two-dimensional shape such as a square or circle, which is extruded along a path to create a three-dimensional surface. For Box, Cylinder, and Prism, that path is a straight line; for Tube, Torus, and Ring, that path is a circle.
Take a look at my fancy diagram (to the right, click for a larger version). In (1), we are describing 5 different sections (solid lines), with another 4 values being interpolated between them (dotted lines). The gray line at the bottom represents the full span of the path from beginning to end.
In (2), we see a top-view of a cylinder with the sections that were defined in (1). Note that by smoothly interpolating between the defined sections, we can achieve a very smooth result without defining a large number of sections. In (3), we see a top-view of a torus with the same sections (or, at least, a passable representation of one; it’s hand-drawn, not mathematically computed, so it may not be very accurate).
In the example, all the sections were equally spaced, but that need not be the case. Nor need there be a set number of sections. An arbitrary number of sections could be defined, with data storage increasing linearly with the number of sections defined (i.e. if we define twice as many sections, it takes twice as much space to store the data).
Today, a joyful reunion marks the end of an amazing true story of struggle, perseverance, and hope.
Prim, a purebreed plywood cube and the adored pet of Jacek Antonelli, was returned to his owner today after being missing for nearly two weeks. “I had almost given up hope of ever seeing my dear Primmy again,” says Antonelli. “I’m so glad he’s back. My life just wasn’t the same without him.”
Prim went missing on September 4 after he bounced away from the cottage where he resided in Hallasan (located along the south-east coast of the Most-Southern Continent). “Prim needed some excercise, so I set him on physical and gave him a script to set his llTargetOmega,” tells Antonelli. “But I forgot to put on his leash before I closed the edit window, and he bounced up into the air, right over the house! I was so surprised.”
Jacek Antonelli searched for hours to find Prim, but he was nowhere to be found. When Prim hadn’t been returned after several days, Antonelli feared the worst: “I thought he must have bounced into the ocean and drowned, or gotten trapped in a sex club and asphyxiated.”
Mera offered a thought stream which got me thinking about deriving identity in activity—the idea that you are what you do. If you center yourself around doing N, who would you be if you stopped doing N?
(I am reminded here of the crises of people who, after working their entire lives at the same job, reach retirement and are at a loss as to how they should spend their time. The job had become their identity.)
This struck a chord with me because I do tend to derive a lot of my identity from what I do. In both Lives, I keep myself perpetually buried in projects, so that I will always have some activity to define myself in relation to.
I create, so I am a creator.
I teach, so I am a teacher.
I do, so I am.
Assuming, of course, that it is undesirable to be left in a state of doubt about one’s identity, one should endeavor to prevent and cure such a state. Defining oneself in relation to only one or two things is risky; interests come and go, and the anchor that holds today may not tomorrow. A less risky option (and the one I am prone to do) is to grab hold of as many activities as possible, so that each matters less. If one fails, the others are there as backup. But there is a danger to this too, that of spreading oneself too thin, so that there is no meaningful benefit in anything.
No matter how we define ourselves in relation to other things and activities, there is always the very real possibility that we will lose or shift away from them.
But what if we define ourselves not in relation to something else, but as being ourselves, no matter how we change?
I am myself.
I look a certain way, act a certain way, and enjoy certain things.
In the future, I will look another way, act another way, and enjoy other things.
I will be myself then, too.