Skip to content

Question about the getProjectionMatrix2 function #187

@Irving87

Description

@Irving87

Hello, can i ask some question about the getProjectionMatrix2 function in graphics_utils.py?

  1. why the "left right top bottom" calculate in this way?
left = ((2 * cx - W) / W - 1.0) * W / 2.0
right = ((2 * cx - W) / W + 1.0) * W / 2.0
top = ((2 * cy - H) / H + 1.0) * H / 2.0
bottom = ((2 * cy - H) / H - 1.0) * H / 2.0
  1. The P[0,2] and P[1,2] in the code are:
P[0, 2] = (right + left) / (right - left)
P[1, 2] = (top + bottom) / (top - bottom)

and z_sign = 1.0, so why don't they calculate like this:

P[0, 2] = -(right + left) / (right - left)
P[1, 2] = -(top + bottom) / (top - bottom)

or can you tell me how the camera coordiante looks like?

Any help would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions