# Solve 3D matrix transformations subject to constraints

Your project is to establish the mathematical foundation for an intuitive camera control system for 3D touch-screen applications utilizing an overhead 3rd person view of an environment.

Given:

A 3D left-handed cartesian coordinate system called &quot;world space&quot;,

&quot;World Space&quot; contains a number of &quot;child&quot; cartesian coordinate systems called &quot;child frames&quot;, which may themselves contain their one children.

A single affine 4D transformation matrix specifies the transformation of points from parent to child frame and is termed the local transform&quot;.

The hierarchy of coordinate systems is termed the &quot;scene graph&quot;.

A child frame of &quot;World&quot; space is named &quot;LookAt&quot; (a 3D perspective camera will be aimed at the origin of this frame).

The LookAt local transform is single translation in the XZ plane (Y=0) named &quot;M_la&quot;

A child frame of &quot;LookAt&quot; is named &quot;WorldYRotation&quot;.

The &quot;WorldYRotation&quot; local transform is a single rotation around the Y axis named &quot;M_yrot&quot;

A child frame of &quot;WorldYRotation&quot; is named &quot;XRotation&quot;.

The XRotation local transform is a non-zero rotation around the X axis named &quot;M_xrot&quot;

A child frame of &quot;XRotation&quot; is named &quot;CameraSpace&quot;

The PushBack local transform is a translation matrix in the negative Z direction named &quot;M_ztrans&quot;

A child coordinate system of CameraSpace is named &quot;ViewportSpace&quot;

The ViewportSpace local transform is a perspective projection matrix which remains constant named &quot;M_proj&quot;

(The camera is rendered in looking in the positive-z direction)

A child coordinate system of ViewportSpace is named &quot;ScreenSpace&quot;

The ScreenSpace local transform is a composed of scaling and translation in the X and Y axes named M_ss

The concatenation of (M_ztrans * M_xrot * M_yrot * M_la) is termed &quot;M_view&quot;

Thus, the to transform a point from World Space to Screen Space, the mathematical operations are:

P' = M_ss * M_proj * M_view * P

where P is the point (x,y,z,1) in the &quot;World Space&quot; coordinate system

P' is the point (x0/w, y0/w, z0/w, 1) in the &quot;Screen Space&quot; coordinate system

Now that we've established the foundations of 3D computer graphics... :-D

Problem 1:

Holding the following constant: M_ss, M_proj, M_ztrans, M_xrot, M_yrot.

Assuming M_la is of the from:

1, 0, 0, 0

0, 1, 0, 0

0, 0, 1, 0

x_la, 0, y_la, 1

Given: a ray r0 defined by (screen space: sx0, sy0, z) where Z is from 0 to infinity and sx0, sy0 are constant along the ray.

Find the intersection of the ray and (world space: XZ plane y=0). This point is the &quot;handle location&quot;

Given a new ray r1 defined by (screen space: sx1, sy1, z1)...

***Find new values for m_la (x_la, y_la) so the &quot;handle location&quot; intesects ray r1.

Motivation: As a finger touches a screen in screen space, the user grabs &quot;ahold&quot; of a &quot;handle&quot; location on the Y=0 plane. Further movements of the finger in screen space drag the handle around the screen by moving the camera in the XZ plane.

Problem 2:

Same as above, but a second finger touch to the screen is added to solve two new variables:

y_worldRotation, and zoomValue.

The following from problem 1 are now no longer constant:

M_ztrans, M_xrot, M_yrot

M_ztrans and M_xrot are specified by zoomValue.

M_ztrans has the following form:

1, 0, 0, 0

0, 1, 0, 0

0, 0, 1, 0

0, 0, z_ztrans, 0

where z = Czm * zoomValue + Czb (0 &lt; zoomValue &lt; 1, Czm and Czb are constants that guarantee z &lt; 0)

M_xrot = rotation matrix around the x axis were the rotation is xrot = Cxm * zoomValue + Cxb

(0 &lt; zoomValue &lt; 1, and Cxm and Cxb are constants that guarantee the final camera placement in world space is Y&gt;0 with the camera aimed downwards.)

Motivation: As the camera is zoomed in, it moves closer to the target and is rotated more horizontally than vertically.

***Given two initial screen space rays that create to &quot;handles&quot; in the Y=0 plane, for any new values for each screen space ray solve for x_la, y_la, z_ztrans, and zoomValue to keep the handles intersected with the new rays.

The job is done when your solution is working in my code (Unity3D)

Kemahiran: Matematik

Tentang Majikan:
( 0 ulasan ) United States

ID Projek: #1598866

## 4 pekerja bebas membida secara purata \$224 untuk pekerjaan ini

samitXI

\$250 USD dalam 3 hari
(82 Ulasan)
6.3
bchandra1955

Professional engineer having experience of 3D transformation and good MATLAB hold can help you.

\$245 USD dalam 15 hari
(28 Ulasan)
4.4
vietmaixuan15

I have aready done same works more time. You can beleive me. I am suru that you will be satisfied with me.

\$200 USD dalam 2 hari
(0 Ulasan)
0.0
vualangbat

I think i can solve problem in 1 day with minimum money

\$200 USD dalam sehari
(0 Ulasan)
0.0