Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Oct 2007
Offline Last Active Jan 13 2015 02:06 AM

Topics I've Started

Sphere -> Cube Map -- find region...

13 December 2014 - 01:45 PM

I have a series of vectors, each of which is assigned to one of 6 cube map walls and an x/y value on those walls, depending on each vector's direction.


The full set of possible vector directions corresponds to a sphere, while the walls of the cube map are each 2D.


If I want to search for vectors pointing in directions along a circular region along the surface of this sphere, this circle on the surface of the sphere would have to be projected or otherwise transformed onto the surface of the cube map, in order to account for the distortion.  I assume it would be a derived form of a point in circle test ultimately.


Likewise, if I query a rectangular region on the surface of the sphere, this too much be projected or otherwise transformed to account for distortion.


What kind of techniques or relationships might be helpful in transforming this test?  I can't seem to find any lead on it.

Simple Question about Finding Tangent Vectors for Surfaces...

28 April 2014 - 12:10 AM

Suppose you have a parametric equation for a surface, for example:



x = 3*cos(s)+cos(t)*cos(s)

y = 3*sin(s)+cos(t)*sin(s)

z = sin(t)


The partial derivative of this wrt s is:

dsx = -3*sin(s)-cos(t)*sin(s)

dsy = 3*cos(s)+cos(t)*cos(s)

dsz = 0


The partial derivative of this wrt t is:

dtx = -sin(t)*cos(s)

dty = -sin(t)*sin(s)

dtz = cos(t)


Which of these is the tangent in the s direction, and which of these is the tangent in the t direction? 

I would have thought the tangent in the s direction is the derivative wrt s above and that the tangent in the t direction is the derivative wrt t, but I seem to remember hearing the opposite.

Open Source Mudbox-like tool?

30 March 2014 - 04:41 PM

Does anyone know of an open source equivalent to Autodesk Mudbox that allows virtual sculpting of an object?


Simpler is better.  I was interested in using the user interface in such a tool for a programming project...

GLSL Devil Visual C++ Question...

09 March 2014 - 06:34 PM

I downloaded GLSL Devil in order to try and debug GLSL shader code, here:



I want to use it with Visual C++ (2010), but am not sure how to hook up GLSL Devil to Visual C++.


I tried telling GLSL Devil to load both my .vert and .frag files for GLSL, but it does not seem to do anything with them.


I used the shader set up code at - http://www.cse.ohio-state.edu/~hwshen/5542/Site/Slides_files/shaderSetup.C

Is this code not saving a binary file to disk that I need to connect GLSL Devil to?


Both my .vert and .frag files work at the moment - they are successfully transforming vertices and applying colors as needed.  I just want to use GLSL Devil to help debug some additional changes I need to make.

Using the product rule for a partial derivative of a vector/matrix function...

24 November 2013 - 01:28 PM

I was working on a physics animation, and I need to compute the Jacobian in order to solve a partial differential equation.


Suppose we have a function consisting of a series of matrices multiplied by a vector:
f(X) = A * B * b
--where X is a vector containing elements that are contained within A, b, and/or b,
--A is a matrix, B is a matrix, and b is a vector

Each Matrix and the vector is expressed as more terms, ie...
X = (x1, x2, x3)

A =
[ x1 + y1        y4       y7 ]
[      y2   x2 + y5       y8 ]
]      y3        y6  x3 + y9 ]

B =
[      y1   x2 + y4  x3 + y7 ]
[x1 +  y2        y5       y8 ]
]      y3        y6       y9 ]

b = [y1 y2 y3]'  (' means transposed)

Now we want to find the Jacobian of f - ie the partial derivative of f wrt X.

One way to do this is to multiply the two matrices and then multiply that by the vector, creating one 3x1 vector in which each element is an algebraic expression resulting from matrix multiplication.  The partial derivative could then be computed per element to form a 3x3 Jacobian.  This would be feasible in the above example, but the one I'm working is a lot more complicated (and so I would also have to look for patterns in order to simplify it afterwards).

I was wanting to try to use the chain rule and/or the product rule for partial derivatives if possible.  However, with the product rule you end up with A' * B * b + A * B' * b + A * B * b', where each derivative is wrt to the vector X.  I understand that the derivative of a matrix wrt a vector is actually a 3rd order tensor, which is not easy to deal with.  If this is not correct, the other terms still have to evaluate to matrices in order for matrix addition to be valid.  If I use the chain rule instead, I still end up with the derivative of a matrix wrt a vector.

Is there an easier way to break down a matrix calculus problem like this?  I've scoured the web and cannot seem to find a good direction.