Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Point reflection vector

  1. Jun 2, 2014 #1
    Please excuse my terminology as I am teaching myself linear algebra.

    I am attempting to construct a vector which can provide reflection from the origin, eventually I want to be able to move this point of reflection anywhere (translation and rotation) but I'm starting at the origin since that is the simplest case. Lets say my object, the "reflectee", is defined as G(t) where t is time. The only real constraint on G(t) seems to be that it produces a m x n matrix that matches my reflection vector such that the reflection vector is a m x 1 matrix. I've found that when |G(0)| < 1 the reflection vector can be assigned as the column vector (tanh(t),...) but when |G(0)| >= 1 the reflection vector is an identity column vector (1,...). What options are available to meet these constraints as a single vector to eliminate the conditionals?

    |G(0)| < 1 → (tanh(t),...) * G(t)
    |G(0)| >= 1 → (1,...) * G(t)
    Last edited: Jun 2, 2014
  2. jcsd
  3. Jun 2, 2014 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    You cannot have a reflection from a point - only from a surface.
  4. Jun 2, 2014 #3
    Thank you for the correction. I would delete this thread if I could, but I can't. I don't believe for one minute that it is impossible but for now I'll just keep using these ugly conditionals since they work. I'll post the solution when I solve it myself. I know I've seen a function that is ~ 1 when from -1 to 1 and zero else-ware, but I can't remember the function.
    Last edited: Jun 2, 2014
  5. Jun 2, 2014 #4
    The following "function" can be used in my vector in 2 dimensional space to get an idea for what I'm looking for.

    (1−tanh(G(0)m,n^100)) * tanh(t) + tanh(G(0)m,n^100)

    This is certainly not an ideal solution but it gets rid of the conditional. This formula was developed in 2 dimensional space so it probably needs some work to perform the appropriate operation in n dimensional space. These G(0)m,n clearly need to be changed into a distance formula to the zero vector. I would also need to find a better method that doesn't require the use of a large even exponent.
    Last edited: Jun 2, 2014
  6. Jun 2, 2014 #5
    I'm not sure if you're just at a point way beyond me right now, or if you're making this way more complicated than it needs to be.
    Given a point, P, using regular cartesian coordinates, you can define a vector, v, whose endpoint is that point. It's essentially a position vector. When you multiply a vector by -1, the vector maintains its magnitude ('distance from the origin', if you will), but is in an opposite direction, which is what I think you're saying when you say reflect in the origin.

    Say you have a point (3, 2). You want it to be reflected so that it is 'opposite' of what it was relative to the origin. Just multiply that point/vector by -1 to get (-3, -2). Same exact thing with 3, 4, n dimensions.
  7. Jun 2, 2014 #6
    Thank you, this is exactly what I'm trying to define. I'm almost positive that I've overcomplicated the situation. My end-goal is to create a multidimensional CAD application that utilizes solids and virtual physics to produce the environment instead of the current methods of points, edges, faces, and raytracing. In this environment objects would be defined as reflection & absorption functions of the objects surface. Basically creating a field of functions which manipulate lighting functions. The lighting functions will probably be fairly easy as they generate an n dimensional sphere of various frequencies so in this example G(t) is actually the lighting source. I have barely scratched the surface on how I could model a camera in such a complex environment but I suspect once the field is established it should be a fairly trivial problem of entering space-time positional vectors that map to the pixels on the screen. In the past I've made only the lighting functions which is where this idea came from but without any physics it was a fairly useless environment. I could define light sources and the light would intermingle, but without solids (reflection and absorption functions) I couldn't do anything useful with it. I only recently discovered that I could use tanh to approximate reflection and I believe it can be easily rotated and translated.
    Last edited: Jun 2, 2014
  8. Jun 2, 2014 #7
    Not just position vectors. For things like that, to get accurate displays, I think you'll need to spend some in-depth studying time with Linear Algebra. I'd recommend a community college course if you're not in college, or a course in it if you are, since self-studying is pretty difficult, ESPECIALLY for a subject such as Linear Algebra.

    If you are set on not taking a holistic course on it, I can highlight the topics you will need to learn.

    1: Basic stuff. How to reflect a vector. How to rotate a vector, and translate a vector. For your purposes, all you need to do is replace 'vector' with 'point' and you'll see what you need. A much simpler way than hyperbolic functions (to me, now, anyways) plus other Calculus stuff is to create transformation matrices that mimic this stuff. For example, if you want to rotate the vector (3, 4, 7) by 45 degrees around the x-axis, you can create a 3x3 matrix that does that when you multiply it by the vector. This I learned in my third or fourth week of my Linear Algebra course.

    2: Eigen-everything. It'll give you perspective. Eigenvectors are vectors associated with a matrix such that all scalar multiples of those eigenvectors will also be an eigenvector. When you multiply a matrix H by any of its eigenvectors, the vector's direction/angle is preserved, but its magnitude ('length') is changed. I learned this stuff about 3/4th of the way through my course.

    3: This is vital: Projections. Projections from three dimensions to three dimensions (sometimes), and three dimensions to two dimensions (the computer monitor; vital for what you're planning). That way people can get an accurate view of what they are modeling. Projections will also be heavily used in your lighting, especially since people will want different lights in different places.

    Those are most vital and yet things you might overlook; I've probably overlooked some things. But definitely focus on those.
  9. Jun 2, 2014 #8
    @ModestyKing, thanks for your help. About half of the things you suggest I'm already very familiar with and the other half I'll need to look into. I have a family and do full time freelance work so that doesn't really leave me the time to return to college, but even if I did have the time I could never cope with the slow-pace. I've been using the Youtube MIT open-courseware and that has been getting me through. So far I've been able to fly through the courses at 1 to 2 classes a day for as much as I could stand before taking a few months off. I'm now back to it but Linear Algebra is a lot more to swallow than calculus was, even though I've been working with arrays every day of my life and they're very similar to vectors. Very little of what I'm doing is really marketable, it is more of a hobby for me since the clients I have aren't really looking for advanced systems. I have 2 Radeon 280X video cards which produce about > 2 teraflops of computing power that are just sitting idle so I figured this could be a productive way to spend my free time and computing power. Over the past year I've only used calculus once or twice to solve an actual work-related problem but I'd rather know how to do this and not need to, than need to and not know. From what I've seen about the capabilities of GPU's and massive multi-core processors that are being developed I'm sure the day will come where linear algebra is going to be much more vital to my industry, but chances are I'll be retired before those days hit since most companies don't advance nearly as quickly as technology does.
    Last edited: Jun 2, 2014
  10. Jun 3, 2014 #9

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    You can use the "report" button and ask a moderator to delete it.

    ... it is probably more to do with the proper terminology.
    By definition, the word "reflection" refers to an operation involving a surface - like with a mirror: "angle of incidence equals angle of reflection" and all that. This does not make sense for a point since there is no unique solution for the angles.

    Perhaps if you drew a diagram of what you want to achieve?

    It sounds very much like you are overcomplicating things.
    Position vectors are pretty straight forward to use with matrix manipulation.

    It is not clear what this means.

    In this context, a "surface" would usually be the same sort of thing as a "face"... which you don't want to use.

    "n dimentional sphere of various frequencies" again, does not mean anything.

    I can see that you have a feeling for the kind of thing you want to achieve, but you don't seem to have the right words to describe it.

    Since you say you have a background in algebra etc, perhaps it will be helpful to describe what you want to do in standard maths terms?

    i.e. an object would normally be located by a position vector p (and described by geometry terms.)

    If we define a plane with normal vector n that passes through the origin, then the reflection of p in the plane, at the origin, is easy to describe. Similarly the image of the object would be straight-forward to find and describe.

    You appear to have set yourself a very big subject. i.e.
    Surfaces of the object would need to be represented by reflection, absorption, and scattering functions of wavelength (color). Not all reflections are like mirror reflections - surfaces can be dull, they may reflect only a few wavelengths etc. Currently surface properties are handled by "textures". And that's just in 3D ... you wanted n-dimensions.

    I think it is very important to get the language down if you hope to communicate your ideas to others.

    Good luck.
  11. Jun 8, 2014 #10
    Thanks, my level of frustration was much higher at the time but I'm sure this information will come in handy eventually.

    This is the only disadvantage of being self-taught, I absorb concepts much quicker than terminology and can model those concepts in computer simulations without ever knowing the proper terminology, but simply having a symbolic understanding of the concepts.

    This will never happen. It took me almost a week to draw a single 9 dimensional graph, drawing n dimensional graphs, excluding possibly Einstein's style of graphs, would be nearly impossible. It is my understanding now that higher order tensors provide the level of computation I'm trying to achieve but I have a ways to go before I can work with tensors with orders > 2.

    Yes I have, but it seems I'm in the right direction by using hyperbolic functions as they're a common tool in modern physics.

    A face in computer rendering is typically defines as a filled triangle. I intend to define the surface by functions.

    Yes it does, and I can even give you the formula for an n-dimensional sphere.

    radius = sqrt(x_1^2 + x_2^2 ... x_n^2)

    Taking a small symbolic leap I can apply this as a Fourier series and you can see how I can define a n dimensional sphere of various frequencies. I'm not exactly sure what form the end product would be, but I suspect it will be a matrix of the Fourier series multiplied by (sqrt(x_1^2 + x_2^2 ... x_n^2) x I) where I is the identity matrix. This is good for my light sources and for my objects I somehow need to expand on this with a reflection function for some frequencies, and an absorption function for others. There is also a transformation of this key reflection algorithm in such a way that the reflection is relative to the surface of this n dimensional sphere. It is obvious I don't know the full solution, but I have a general idea of the direction I'm headed. Not everything in this virtual world is going to be spheres but that may be a good place to start since the formulas are fairly simple to get to n dimensions.

    I've been down that road before, nearly 20 years ago. I'd have better luck using a permutation of all mathematical functions than trying to use standard mathematics to achieve my goals. Nothing short of linear algebra can achieve what I'm trying to achieve.

    This is somewhat close to what I'm trying to describe and in this case a graph could more easily show it as the graph would have lines follow y= mx +b for all cases where |b| < 1 in the two dimensional case. Moving from two dimensions to three dimensions to n dimensions is something I still need a great deal of work on.

    I have always been in the habit of biting off more than I can chew, and this case is no different. Achieving the primary objective would be nice, but the massive amounts of information I learn by the process is what I'm really after. You have contributed a great deal to this process, while you didn't reduce the entire problem to a grand-unified theory, you have pointed out a key issue that I need to learn how to communicate mathematical ideas using "normal" language. Something that will take me a great deal of learning since I think symbolically, and not the nice orderly symbols you see in your typical math-books. Closer to Einstein's formula's where anything I perceive as being implied is simply excluded from the model, but unlike Einstein I don't have a set system. Modern computer languages are perfectly suited for executing symbolic ideas so I rarely run into the need to communicate those ideas to others.

    As for your comment "Not all reflections are like mirror reflections - surfaces can be dull, they may reflect only a few wavelengths etc". I'm fully aware there is a large number of things that can be done to light that would be difficult to model, but solid colors is my first step, which is simply reflection of some wavelengths and absorption of others. I will be ecstatic if I can even achieve this part of the problem.
    Last edited: Jun 8, 2014
  12. Jun 8, 2014 #11

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    ... and then you have to talk to someone else and you end up with the Tower of Babel effect.

    It is routine for people working in fields like string theory ... it's not as hard as it appears, you have just not had contact with others enough to get the experience. You start out by describing your concepts in simple terms that are easy to sketch then you extrapolate the resulting maths to higher dimension counts.

    The standard description of a reflection has an easy representation in 2D, which you can draw, which translates to 3D then 4 and then many ... defining the metrics as you go for more complicated topological spaces.

    But you absolutely cannot get help for any of this if you refuse to adopt standard terminology: nobody can talk to you if you do not have a common language.

    which functions will have to describe a filled triangle at some level... i.e. they will do the same thing.

    So long as those goals do not include being able to tell anyone about your ideas you are free to be as unconventional as you like.

    ... The described rays for reflection in a given plane at the origin would be lines for y=mx+b only for b=0 (taking the y axis in the direction normal to the plane and x as a radial direction along the plane.) The value of m would be given by the law of reflection.

    It is easy to generalize that description to n dimensions - write the equation of the plane you want the reflection in as n-D, work out the n-D normal vector and use the dot and cross products normally.


    They are nice and orderly for a reason ... since you are talking about objects, you should be able to use a concrete form to describe your ideas and so gain the language that will let you describe how your ideas apply to more tricky geometries.

    If your symbolism cannot be used to produce something concrete then you have to ask if the symbolism actually means anything in the first place.

    This also means you are re-inventing the wheel a lot, and also you have no idea if the path you have taken has turned out to be a dead end.

    i.e. you have no way of taking advantage of the work of others as a shortcut to your own understanding.

    Right now, in this thread, in these forums, nobody can help you because you are unable to communicate your ideas. It sounds to me like you are probably on a dead-end course... I have learned to pick up the signs. It is vital that you get outside support.

    What a lot of people do in your position is actually hire someone to listen to them and ask questions, someone who has the right language - maths grad students can sometimes be paid for this. They act as a translator. It boils down to how much it is worth to you (and the translator) to pursue your goals.

    Certainly there is zero to be gained by someone doing all that for free.
  13. Jun 16, 2014 #12
    This is actually part of my process. I re-invent the wheel and then compare it to whats been done by others and take the best from both for my final "marketable" products. As for dead-ends, I rarely run into any actual dead ends as there always seems to be some way to refactor to repair problems that are run into. I'm not sure if this is a matter of experience or evidence of some higher order to things. Regardless in this project I've already reached my first dead-end, the scalability problem, the functions I've been working with are fine for the large scales, but break down on micro scales. I'm looking into quantum mechanics and logarithmic functions for a solution. The hyperbolic reflection algorithm lends itself to a logarithmic adjustment fairly nicely, but I need to make sure this isn't going to be completely incompatible with quantum physics or else the system will probably break down when I try to use it to model more complex materials.

    (edit) As for the absorption function, I think I just figured that one out also. Laser cooling was my hint. I should be able to model absorption as a reflection function that changes the frequency of the light source. This is effectively how laser cooling works, but when a black surface absorbs light it gives off heat which for the sake of this system is not very relevant, but if I push the frequency to infrared bands that aren't visible than reflection also provides my required absorption functions. This ads a slight bit more complexity to the calculations, but it still seems to be possible.

    It looks like by random chance I really am in the right direction with this project. Based on the first 20 minutes of this lecture on Lagrange fields () the accuracy of my method depends on the derivative of my chosen function being quadratic. The derivative of tanh seems to be quadratic though I've never dealt with sech2 before so that will take some additional research. I'll need to continue my research to get more familiar with the actual quantum field equations but it seems reasonable to believe that I can start with tanh and swap it out later if a better function is found. It seems I should be able to utilize ln of my view-port dimensions to establish exponents that maintain the same level of detail for any view-port dimensions. This effectively solves scalability, reflection, absorption, and scattering. So I simply need to get these functions into proper n dimensional transformation matrices that can be rotated and translated and I should be able to start coding.
    Last edited by a moderator: Sep 25, 2014
  14. Jun 17, 2014 #13

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    So you have managed to produce a marketable product from this process?
    Please provide a link.
  15. Jun 18, 2014 #14
    I don't know why you would think this. Reflection with respect to points and lines are perfectly well-defined: http://en.wikipedia.org/wiki/Point_reflection
  16. Jun 18, 2014 #15

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    Fair enough, but is there anything in the above posts to suggest that this is what tanus5 was referring to by "a vector which can provide reflection from the origin".
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook