So I have been working on marketing a local tattoo shop online, but here's the catch: the guy in charge is one of those who claims he'll never own a smartphone. To make matters worse, he had resources scattered about, half finished listings in directories, and almost no login information for any of it.
So my first task was simple, but such a headache that I wound up smoking more. I needed to wrangle all these loose ends online and tie them together.
I began by creating accounts for the shop on the popular social media systems, like Twitted and tumblr. All these were tied to either his personal email, or the shop email I later discovered which the boss knew nothing about.
During this task I also pestered him for login information to everything, and told him to keep copies of this information in a secure place that he could access. I think he did that last part, but I'm storing most of it myself, just in case.
Then I began the fun and exciting task of building a new website that would make it possible for him to post once, then forget about it. That meant connecting all the social media to the website with an automated posting script for photos and news.
With that done, I worked to repair the damage of his neglected online presence. This was where it got really fun, and by fun I mean exasperating.
After correcting the flaws in all the directory listings, revitalizing the Google+ page, and establishing a working and attractive website that was also mobile friendly, I had to show him how easy it all was. At this point I was doubting if this would pay off, he was very reluctant to listen and trust me.
Managing to convince him to invest pocket change in an online advertising campaign through Google, it's a very inexpensive way to advertise to millions, I knew we were finally ready to see results. Ironically, the results were actually better than I had anticipated.
After only working on this campaign for a couple weeks we saw a significant increase in business and much of that was verified to be from social media and Google. So now I am looking at the possibility of getting four solid contracts to do this for other businesses, most without the baggage of neglected online activities.
This experience has encouraged me to offer some advice to brick and mortar shops, so here goes.
* Keep your accounts, while this sounds like common sense many people have created accounts for their business and just stopped caring. They lose the login information and ultimately they lose that account. Keep the records somewhere, even if you don't think the internet presence is helping.
* Do not ignore the power of social media. Billions of people use this medium for recommendations, contacts, information of all sorts, even product searches. If you have an inactive social media presence you will be less likely to gain any new customers than a business that sells junk. Ask any online marketing expert how to gain attention and they'll tell you social media is the best medium.
* Have a super friendly website, this means mobile, desktop, fast loading, visually appealing, and informative. If you want people to call or visit the store for a lot of information then include as much information for how to do that as possible. But remember, the more options for contact the better. Answer questions on social media if you are able, post regular changes in products and services as well, if in doubt, post a silly joke.
* Photos, video, and graphics are you best friend and worst enemy. While you will need a lot of this, do not use super hi-res or hi-def, make it small enough to load quick, big enough to notice. This is why hiring people like me is your best option, even someone with a little less experience than me will be able to give a better idea of what works, just ask for a geek.
* Don't be afraid to offend, Ty still does not get this point yet, but you will offend a lot of people no matter what you do, and many people online are searching for reasons to be offended anyway. You won't get noticed if you don't offend anyone, so be offensive if the opportunity arises. Mainstream media has been using offensiveness as a tool to increase ratings since the caveman, you can ride those waves to gain more attention.
* Brand everything! I cannot stress this enough, don't worry about copyrights online, they don't exist, but branding is more affective because of that. So be the first to use an image or icon, then post it everywhere. People will seek out it's origin, and they will find it.
Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts
Thursday, July 16, 2015
Friday, February 13, 2015
Matrix And Quaternion - The Coder's Nightmare
A change of pace, I will explain matrix math to coders (software developers) who struggle with it. Well, I'll try, specifically in the context of three dimensional maths.
The matrix is essentially a rigid set of instructions, a 4x4 one is used for 3d coordinates. The first thing to consider is the order of operation, it always matters when multiplying matrixes, the right hand of the formula is always computed first.
That's the simplest part of the matrix, the second simplest part is the coordinate instructions, the first three rows of the fourth column in OpenGL. This is just the coordinate of the center of the object, that last row basically says "influence anything by this much," in most cases just leave that as 1.0.
The fourth row of the other three columns has odd effects on coordinates that I will not cover here. These are best left at 0 unless you know a lot about matrix maths, eventually I may explain these but don't hold your breath.
The most important instructions are in the first three rows of the first three columns. These instructions are simple but appear very complex when you are jumping into them.
Often the 3x3 matrix is called a rotation matrix, but really it's a scale matrix. The columns each represent one of the three axis in order of x, y, and z.
The amount of influence each initial axis has over the final value of the multiplication is from each row of that column. So column 1, row 1 has determines how much of the original x value is added to the new x value; column 1, row 2 is how much of the original y value is added to the new x value; etc.
Now the part that seems even more complicated than it is. Rotating is essentially shifting the effect one axis has on another's final value, the hard part is how this is calculated, but otherwise it's just another scale value multiplied by the length of that column.
You read that right, the actual scale value is multiplied by the rotation scale values of that column, and the rotation values are always normalized. This means that the length sqrt(x² + y² + z²) is the scale value for that column.
As long as skewing or twisting is not applied as well, don't try to comprehend those until you get the basics or you'll have a bad time. The scaling values for the rotations are enough for the beginner to worry about, so here goes the most dreaded of those rotations, quaternions.
First, a quaternion is like a coordinate with an imaginary dimension added, so it's 4 dimensional. This makes them both scary and annoying for most people, I am finding them easier to work with the more I incorporate them into my code.
A quaternion is an angle, where something points to using the fourth dimension as the imaginary reference. Trying to work them out in your head will just make you wish you'd never tried so I recommend that you look at this c code instead.
void matrix_3d_setRotationFromQuaternion(GLfloat md[], int offd, float qx, float qy, float qz, float qw)
{
GLfloat lenx = matrix_3d_getScaleX(md, offd);
GLfloat leny = matrix_3d_getScaleY(md, offd);
GLfloat lenz = matrix_3d_getScaleZ(md, offd);
md[offd] = (1.0 - (2.0 * (qy * qy)) - (2.0 * (qz * qz))) * lenx;
md[offd + 4] = ((2.0 * qx * qy) - (2.0 * qz * qw)) * leny;
md[offd + 8] = ((2.0 * qx * qz) + (2.0 * qy * qw)) * lenz;
md[offd + 1] = ((2.0 * qx * qy) + (2.0 * qz * qw)) * lenx;
md[offd + 5] = (1.0 - (2.0 * (qx * qx)) - (2.0 * (qz * qz))) * leny;
md[offd + 9] = ((2.0 * qz * qy) - (2.0 * qx * qw)) * lenz;
md[offd + 2] = ((2.0 * qx * qz) - (2.0 * qy * qw)) * lenx;
md[offd + 6] = ((2.0 * qy * qz) + (2.0 * qx * qw)) * leny;
md[offd + 10] = (1.0 - (2.0 * (qx * qx)) - (2.0 * (qy * qy))) * lenz;
};
Because of the nature of the quaternion, it can represent a rotation matrix on it's own, making it very easy to use with matrixes. So now you can see why I prefer them, also they tween and stack well for skeletal animations.
Converting them from axis/angle coordinates is likely your most common method when you incorporate them into any project, because you can picture those in your head easier but then you will want them as quaternions for the actual maths. The main reason to consider using matrixes and quaternions is because they use less to accomplish more.
This Java code should explain the conversion well.
public void axisAngleToQuaternion()
{
float angle = vec[3] * 0.5f;
float sa = (float)Math.sin(angle);
normalize();
vec[0] *= sa;
vec[1] *= sa;
vec[2] *= sa;
vec[3] = (float)Math.cos(angle);
normalizeAsQuaternion();
}
As you can see, the quaternion only uses 180 degrees, or 2*pi radians, half a circle. "vec" is the float array in the Java object, the fourth index has the angle and the w coordinate is stored there when finished, normalizing is done only for the x, y, and z coordinates.
The x, y, and z coordinates indicate a point along one axis, the second angle is in the w, rotating the circle by this. There you go, that's a quaternion simplified.
Another reason to use them is that there is a very simple method for multiplying then with a vertex coordinate that requires only basic math and works well in shaders, in GLSL it looks like this.
vec3 qrot(vec4 q, vec3 v)
{
return v + 2.0*cross(q.xyz, cross(q.xyz,v) + q.w*v);
}
If you're doing 3d you should know a cross product by now. The above GLSL function will multiply a vector v by a quaternion q, and it produces no lag in shaders even for thousands of vertexes.
I came upon this while I was struggling to understand the quats, it explained them to me the best, just seeing this formula made it all connect in my head. If you don't know GLSL, I suggest you learn about swizzling to understand the above function.
Now the reasons to use these for everything, not just graphics. Matrixes can contain a large number of instructions for any operation, and multiplying them uses far fewer CPU/GPU cycles than if done procedural. I only touched on the very basics of these great mathematical concepts feared by most coders, and focused on one use.
Quaternions and matrixes can help you write applications for scientific studies, video games, even data crawling. I am working on an OpenGL game library for Android, and after that a neural network simulator with 3d interface and visualization.
Matrixes will become invaluable in the field of artificial intelligence, they are actually the computer's language. The biological brain has it's own complex and sloppy language, so we can correct that mistake by making the computer efficient and fast, we can use matrixes.
The matrix is essentially a rigid set of instructions, a 4x4 one is used for 3d coordinates. The first thing to consider is the order of operation, it always matters when multiplying matrixes, the right hand of the formula is always computed first.
That's the simplest part of the matrix, the second simplest part is the coordinate instructions, the first three rows of the fourth column in OpenGL. This is just the coordinate of the center of the object, that last row basically says "influence anything by this much," in most cases just leave that as 1.0.
The fourth row of the other three columns has odd effects on coordinates that I will not cover here. These are best left at 0 unless you know a lot about matrix maths, eventually I may explain these but don't hold your breath.
The most important instructions are in the first three rows of the first three columns. These instructions are simple but appear very complex when you are jumping into them.
Often the 3x3 matrix is called a rotation matrix, but really it's a scale matrix. The columns each represent one of the three axis in order of x, y, and z.
The amount of influence each initial axis has over the final value of the multiplication is from each row of that column. So column 1, row 1 has determines how much of the original x value is added to the new x value; column 1, row 2 is how much of the original y value is added to the new x value; etc.
Now the part that seems even more complicated than it is. Rotating is essentially shifting the effect one axis has on another's final value, the hard part is how this is calculated, but otherwise it's just another scale value multiplied by the length of that column.
You read that right, the actual scale value is multiplied by the rotation scale values of that column, and the rotation values are always normalized. This means that the length sqrt(x² + y² + z²) is the scale value for that column.
As long as skewing or twisting is not applied as well, don't try to comprehend those until you get the basics or you'll have a bad time. The scaling values for the rotations are enough for the beginner to worry about, so here goes the most dreaded of those rotations, quaternions.
First, a quaternion is like a coordinate with an imaginary dimension added, so it's 4 dimensional. This makes them both scary and annoying for most people, I am finding them easier to work with the more I incorporate them into my code.
A quaternion is an angle, where something points to using the fourth dimension as the imaginary reference. Trying to work them out in your head will just make you wish you'd never tried so I recommend that you look at this c code instead.
void matrix_3d_setRotationFromQuaternion(GLfloat md[], int offd, float qx, float qy, float qz, float qw)
{
GLfloat lenx = matrix_3d_getScaleX(md, offd);
GLfloat leny = matrix_3d_getScaleY(md, offd);
GLfloat lenz = matrix_3d_getScaleZ(md, offd);
md[offd] = (1.0 - (2.0 * (qy * qy)) - (2.0 * (qz * qz))) * lenx;
md[offd + 4] = ((2.0 * qx * qy) - (2.0 * qz * qw)) * leny;
md[offd + 8] = ((2.0 * qx * qz) + (2.0 * qy * qw)) * lenz;
md[offd + 1] = ((2.0 * qx * qy) + (2.0 * qz * qw)) * lenx;
md[offd + 5] = (1.0 - (2.0 * (qx * qx)) - (2.0 * (qz * qz))) * leny;
md[offd + 9] = ((2.0 * qz * qy) - (2.0 * qx * qw)) * lenz;
md[offd + 2] = ((2.0 * qx * qz) - (2.0 * qy * qw)) * lenx;
md[offd + 6] = ((2.0 * qy * qz) + (2.0 * qx * qw)) * leny;
md[offd + 10] = (1.0 - (2.0 * (qx * qx)) - (2.0 * (qy * qy))) * lenz;
};
Because of the nature of the quaternion, it can represent a rotation matrix on it's own, making it very easy to use with matrixes. So now you can see why I prefer them, also they tween and stack well for skeletal animations.
Converting them from axis/angle coordinates is likely your most common method when you incorporate them into any project, because you can picture those in your head easier but then you will want them as quaternions for the actual maths. The main reason to consider using matrixes and quaternions is because they use less to accomplish more.
This Java code should explain the conversion well.
public void axisAngleToQuaternion()
{
float angle = vec[3] * 0.5f;
float sa = (float)Math.sin(angle);
normalize();
vec[0] *= sa;
vec[1] *= sa;
vec[2] *= sa;
vec[3] = (float)Math.cos(angle);
normalizeAsQuaternion();
}
As you can see, the quaternion only uses 180 degrees, or 2*pi radians, half a circle. "vec" is the float array in the Java object, the fourth index has the angle and the w coordinate is stored there when finished, normalizing is done only for the x, y, and z coordinates.
The x, y, and z coordinates indicate a point along one axis, the second angle is in the w, rotating the circle by this. There you go, that's a quaternion simplified.
Another reason to use them is that there is a very simple method for multiplying then with a vertex coordinate that requires only basic math and works well in shaders, in GLSL it looks like this.
vec3 qrot(vec4 q, vec3 v)
{
return v + 2.0*cross(q.xyz, cross(q.xyz,v) + q.w*v);
}
If you're doing 3d you should know a cross product by now. The above GLSL function will multiply a vector v by a quaternion q, and it produces no lag in shaders even for thousands of vertexes.
I came upon this while I was struggling to understand the quats, it explained them to me the best, just seeing this formula made it all connect in my head. If you don't know GLSL, I suggest you learn about swizzling to understand the above function.
Now the reasons to use these for everything, not just graphics. Matrixes can contain a large number of instructions for any operation, and multiplying them uses far fewer CPU/GPU cycles than if done procedural. I only touched on the very basics of these great mathematical concepts feared by most coders, and focused on one use.
Quaternions and matrixes can help you write applications for scientific studies, video games, even data crawling. I am working on an OpenGL game library for Android, and after that a neural network simulator with 3d interface and visualization.
Matrixes will become invaluable in the field of artificial intelligence, they are actually the computer's language. The biological brain has it's own complex and sloppy language, so we can correct that mistake by making the computer efficient and fast, we can use matrixes.
Wednesday, February 4, 2015
The Real Illuminati
The computer world is not only real, it is controlled by us geeky atheists. The geeks have inherited the Earth, and this is a good thing.
First, often people will call the physical world the "real" world and refer to the computer world as just "the internet." The computer world is real though, and the physical world today is dependent on the computer world's state, in such profound ways that no human society can exist without it now.
This is evidenced in regions where they attempt to censor or ban access to the computer world, those regions are often blights on our species, chaos and disease run the societies there. Modern society, the very health we all enjoy, money, business, everything depends on the computer world and has depended on it since the 1950s, in spite of some nostalgic lies told by deluded old fools in bars.
Our masks in the physical world are gone online, the honest personality, the real us, is exposed when we are typing in text. Often people will use slurs like "keyboard commando" when someone else shows their true colors, and this is true but it's the reason you can actually see who they are online, but not in the physical world.
In the physical world we wear masks, we are vulnerable and our fear forces most of us to behave how society demands even if contrary to our own personality, even if the behavior is bad. In the computer world we are not forced to behave based on social tenets and thus, we become ourselves.
The second part is why atheists and geeks control the computer world, most geeks and atheists are persecuted or even physically harmed by societies. In the computer world that we created we are safe to share facts, information, and blasphemy, in the safety of the world we created where we are in control of everything.
The drawback is that to avoid being hypocrites we must allow all people the same privilege, at least some think this is a drawback. It is actually a very great thing, for those who are causing the physical world societies to be dangerous to us are showing their true colors online, and it's easy to get them to say the stupid things online that they fear saying in the physical world.
The funny part is that they actually think they are anonymous, but only Anonymous is truly anonymous, and they remain such as a way of keeping control. Anonymous is our police, our military, and our judges for the computer world, so they are welcomed by geeks and atheists, feared by the religious, and hated by dictators, because Anonymous is us, all of us.
Since the first computer systems were installed, no one alive today has lived before that, geeks have had control of everything. From government defenses to records of everything you do and are, every keystroke is filed and recorded, every phone call is tracked and the number stored, every purchase (even with cash) is also on file somewhere.
The point is, the conspiracy nuts are all wrong, there is an Illuminati like organization, we are just not very organized.
First, often people will call the physical world the "real" world and refer to the computer world as just "the internet." The computer world is real though, and the physical world today is dependent on the computer world's state, in such profound ways that no human society can exist without it now.
This is evidenced in regions where they attempt to censor or ban access to the computer world, those regions are often blights on our species, chaos and disease run the societies there. Modern society, the very health we all enjoy, money, business, everything depends on the computer world and has depended on it since the 1950s, in spite of some nostalgic lies told by deluded old fools in bars.
Our masks in the physical world are gone online, the honest personality, the real us, is exposed when we are typing in text. Often people will use slurs like "keyboard commando" when someone else shows their true colors, and this is true but it's the reason you can actually see who they are online, but not in the physical world.
In the physical world we wear masks, we are vulnerable and our fear forces most of us to behave how society demands even if contrary to our own personality, even if the behavior is bad. In the computer world we are not forced to behave based on social tenets and thus, we become ourselves.
The second part is why atheists and geeks control the computer world, most geeks and atheists are persecuted or even physically harmed by societies. In the computer world that we created we are safe to share facts, information, and blasphemy, in the safety of the world we created where we are in control of everything.
The drawback is that to avoid being hypocrites we must allow all people the same privilege, at least some think this is a drawback. It is actually a very great thing, for those who are causing the physical world societies to be dangerous to us are showing their true colors online, and it's easy to get them to say the stupid things online that they fear saying in the physical world.
The funny part is that they actually think they are anonymous, but only Anonymous is truly anonymous, and they remain such as a way of keeping control. Anonymous is our police, our military, and our judges for the computer world, so they are welcomed by geeks and atheists, feared by the religious, and hated by dictators, because Anonymous is us, all of us.
Since the first computer systems were installed, no one alive today has lived before that, geeks have had control of everything. From government defenses to records of everything you do and are, every keystroke is filed and recorded, every phone call is tracked and the number stored, every purchase (even with cash) is also on file somewhere.
The point is, the conspiracy nuts are all wrong, there is an Illuminati like organization, we are just not very organized.
Subscribe to:
Posts (Atom)