### Function

# Gimp vector_3d_to_2d

#### Declaration [src]

    void
    gimp_vector_3d_to_2d (
      gint sx,
      gint sy,
      gint w,
      gint h,
      gdouble* x,
      gdouble* y,
      const GimpVector3* vp,
      const GimpVector3* p
    )

#### Description [src]

Convert the given 3D point to 2D (project it onto the viewing plane, (sx, sy, 0) - (sx + w, sy + h, 0). The input is assumed to be in the unit square (0, 0, z) - (1, 1, z). The viewpoint of the observer is passed in vp.

This is basically the opposite of gimp_vector_2d_to_3d().

#### Parameters

`sx` | `gint`
| The abscissa of the upper-left screen rectangle.
`sy` | `gint`
| The ordinate of the upper-left screen rectangle.
`w` | `gint`
| The width of the screen rectangle.
`h` | `gint`
| The height of the screen rectangle.
`x` | `gdouble*`
| The abscissa of the point in the screen rectangle to map (return value).
| The data is owned by the caller of the function.
`y` | `gdouble*`
| The ordinate of the point in the screen rectangle to map (return value).
| The data is owned by the caller of the function.
`vp` | `GimpVector3`
| Position of the observer.
| The data is owned by the caller of the function.
`p` | `GimpVector3`
| The 3D point to project to the plane.
| The data is owned by the caller of the function.