Recent content by STENDEC

  1. S

    Insight/Intuition into rotations in R²

    I've been using rotation matrices for quite some time now without fully grasping them. Whenever I tried to develop an intuitive understanding of... x' = x\cos\theta - y\sin\theta \\ y' = x\sin\theta + y \cos\theta ... I failed and gave up. I've looked at numerous online texts and videos, but...
  2. S

    Issue with behavior of ray-plane intersection algorithm

    Ah I'm dumb, I had only seen the change in the last line and missed the first l1 - l0 subtraction in the assignment to t. That also explains why your code seemed more "off" to me than what I had before. Now that both lines have this operation, the projection works correctly no matter how I...
  3. S

    Issue with behavior of ray-plane intersection algorithm

    Correct, same approach for both. Yes, I visualized n to confirm that it's the normal of the plane offset from the origin of the coordinate system, just as one would expect. I've created two images that hopefully help illustrate the behavior: Ray at origin, ray offset from origin (along the y...
  4. S

    Issue with behavior of ray-plane intersection algorithm

    My setup might have sent a confusing message, sorry! P0 and P1 are the two vertices of a line representing the plane normal, where P0 sits on the plane and P1 offset from P0 by the plane's "normal". I did this because I wanted to work with geometry (a line primitive needing two end points) in a...
  5. S

    Issue with behavior of ray-plane intersection algorithm

    I'm trying to determine the point, in 3D space, where an arbitrary line/ray intersects with an infinite plane. Using an article on Wikipedia, I tried to reproduce the presented formulas in code. This seems to work fine so long the ray is emitted from the origin of the coordinate system (0, 0...
  6. S

    How does the cross product work?

    Ok, thank you. Not being particularly talented at math, a response such as this from someone so experienced convinces me to lay the issue to rest; I'll just accept that it works and see it as a tool.
  7. S

    How does the cross product work?

    Hello, I hope this is the right forum section. I'm having trouble understanding how calculating the cross product arrives at the final result. When I do something simpler like multiplying a vector by a scalar, I can easily visualize in my head how each component "shrinks" or "grows". With the...
  8. S

    3x3 Identity and rotation matrices and how they work

    Thanks a lot guys, sorry I didn't respond earlier. I won't reply to each post individually, but note that they've been very helpful to me! In doing further reading I realized that I'm using pre-multiplication and row-major matrices; I would have avoided confusion if I had mentioned that from the...
  9. S

    3x3 Identity and rotation matrices and how they work

    Yes, based on what DrZoidberg said, and on my positive results with X and Y rotations, I thought that somehow these triplets define a point's offset (or vector's magnitude). Replacing the 1's in the ID matrix with smaller/larger numbers, results in a corresponding offset change. When applying...
  10. S

    3x3 Identity and rotation matrices and how they work

    I have a 3x3 identity matrix. I have three rotation matrices as defined in online sources. I multiply the identity matrix with the rotation matrices (each separately). From the resulting matrix, I retrieve new point coordinates from the third column ([1][3], [2][3], [3][3] if you will)...
  11. S

    3x3 Identity and rotation matrices and how they work

    I'm aware of that, check my first post. My question was about how to move the point away from the Z-axis; that part doesn't seem to work as I expect it to. In above image, I would want a rotation that adds the third circle to the existing two.
  12. S

    3x3 Identity and rotation matrices and how they work

    Ok, I'll try. This is what happens with the 3 rotation matrices multiplied by the identity matrix. X and Y rotate the point, Z just has it sitting there. The way I understood your vector explanation, I thought I could somehow move the "point" (I want to rotate) away from the Z-axis, e.g...
  13. S

    3x3 Identity and rotation matrices and how they work

    I'm trying to understand what you're saying. If I rearranged the 1's an 0's in the ID matrix, couldn't I get a point(vector) that would respond to the z-axis rotation? By analogy with a roundabout, couldn't I move the vector from standing straight up to pointing outward, lying on the rotating...
  14. S

    3x3 Identity and rotation matrices and how they work

    I'm trying to rotate a point about the origin (0,0,0) and starting with an identity matrix, this works fine for the x- and y-rotation axes, but fails with the z-axis, where the point just sits in place. \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} M_{ID} \times M_Z...
  15. S

    Determining whether grid coordinates lie within a circle

    That's the help I needed. I'll think about your hint on whether/how sqrt can be avoided in this scenario. I'm not solid in math as is evident I think :shy:
Back
Top