Boost logo

Boost :

Subject: Re: [boost] GSoC Proposal[game dev and boost c++]
From: David Bellot (david.bellot_at_[hidden])
Date: 2015-01-07 11:39:52


I'm not sure I understand what you wanna do. Rotation and Translations when
expressed as linear operations are nothing more than multiplications and
additions of matrices. Of course, uBLAS basic purpose is to do these types
of operations.
I mean translation is simply solved like that:

Let's say V=(vx,vy,vz,1) is your translation vector in homogenous
coordinates and p=(px,py,pz,1) is your point, then its translation by V
will be:
[image: T_{\mathbf{v}} \mathbf{p} = \begin{bmatrix} 1 & 0 & 0 & v_x \\ 0 &
1 & 0 & v_y\\ 0 & 0 & 1 & v_z\\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}
p_x \\ p_y \\ p_z \\ 1 \end{bmatrix} = \begin{bmatrix} p_x + v_x \\ p_y +
v_y \\ p_z + v_z \\ 1 \end{bmatrix} = \mathbf{p} + \mathbf{v}]

and the rotation by an angle theta on, for example, the axis X, Y or Z is
again done by a simple matrix multiplication:
[image: \begin{alignat}{1} R_x(\theta) &= \begin{bmatrix} 1 & 0 & 0 \\ 0 &
\cos \theta & -\sin \theta \\[3pt] 0 & \sin \theta & \cos \theta \\[3pt]
\end{bmatrix} \\[6pt] R_y(\theta) &= \begin{bmatrix} \cos \theta & 0 & \sin
\theta \\[3pt] 0 & 1 & 0 \\[3pt] -\sin \theta & 0 & \cos \theta \\
\end{bmatrix} \\[6pt] R_z(\theta) &= \begin{bmatrix} \cos \theta & -\sin
\theta & 0 \\[3pt] \sin \theta & \cos \theta & 0\\[3pt] 0 & 0 & 1\\
\end{bmatrix} \end{alignat}]

(image source: Wikipedia :-) )

So nothing, really has to be done for game programming as it is already
implemented by basic linear algebra. We have plenty of work to do on uBLAS,
that require lots of hands.

I think you should spend some time learning about uBLAS, and why not having
a look at other libraries like Eigen and Armadillo and see what is missing
in uBLAS and could be implemented. There are millions of linear algebra
libraries in the world and lots of ideas to pick up.

I'm happy to help you sorting out and finding a good proposal for GSOC'15.

Cheers,
David

On Wed, Jan 7, 2015 at 3:04 PM, Mudit Sharma <sharma.mudit16_at_[hidden]>
wrote:

> Respected all,
> As we all know in game development Rotation and Translation play the most
> important role..I propose to implement either[whichever is relevant to
> boost]
> using boost geomtry(of course) and uBLAS(will make calculations easier)...
> Can this be taken up as a project for summers?
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk