Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 689329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:19:16+00:00 2026-05-14T02:19:16+00:00

I want to project my Polygon along a vector to a plane in 3d

  • 0

I want to project my Polygon along a vector to a plane in 3d Space. I would preferably use a single transformation matrix to do this, but I don’t know how to build a matrix of this kind.

Given

  • the plane’s parameters (ax+by+cz+d),
  • the world coordinates of my Polygon. As stated in the the headline, all vertices of my polygon lie in another plane.
  • the direction vector along which to project my Polygon (currently the polygon’s plane’s normal vector)

goal
-a 4×4 transformation matrix which performs the required projection,

or

  • some insight on how to construct one myself

UPDATE

Thank you for the answer, it works as intended.

A word of caution to the people who found this: If the Plane of projection’s normal is parallel to the projection vector, the Denominator D will become (almost) 0, so to avoid strange things from happening, some kind of handling for this special case is needed. I solved it by checking if D < 1e-5, and if so, just translate my polygon along hte extrusion vector.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:19:17+00:00Added an answer on May 14, 2026 at 2:19 am

    Suppose one of the polygon’s vertices is (x0, y0, z0), and the direction vector is (dx,dy,dz).

    A point on the line of projection is: (x,y,z) = (x0 + t*dx, y0 + t*dy, z0 + t*dz).

    You want to find the intersection of this line with the plane, so plug it into the plane equation ax+by+cz+d = 0 and solve for t:

    t = (-a*x0 - b*y0 - c*z0 - d) / (a*dx + b*dy + c*dz)
    

    And then you have your target vertex: x = x0+dx*t, etc.

    Since this is an affine transformation, it can be performed by a 4×4 matrix. You should be able to determine the matrix elements by writing the three equations for x,y,z as a function of x0,y0,z0 and taking the coefficients.

    For example, for x:

    x = x0 - (a*dx*x0 + b*dx*y0 + c*dx*z0 + d*dx) / D
    x = (1 - a*dx/D)*x0 - (b*dx/D)*y0 - (c*dx/D)*z0 - d*dx/D
    

    Where D = a*dx + b*dy + c*dz is the denominator from above. y and z work similarly.

    Result matrix:

    1-a*dx/D    -b*dx/D    -c*dx/D   -d*dx/D
     -a*dy/D   1-b*dy/D    -c*dy/D   -d*dy/D
     -a*dz/D    -b*dz/D   1-c*dz/D   -d*dz/D
        0          0          0         1
    

    (Note: On Direct3D this matrix should be transposed, because it uses row vectors instead of column vectors).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project want to use kohana framework, and the composition of this
I have project I want to upgrade to .Net4 and it use BackgroundCopyManager.dll. Anyone
The general problem is projecting a polygon onto a plane is widely solved, but
I would like to use some build parameters from Project 1 in Project 2.
I have real world 3D points which I want to project on a plane.
I want a project directory like this: app/ | src/ Makefile All of the
I created a visual studio setup project. I want this project to install the
When creating a new project, i want this project to become available from a
In my OpenGL project, I want to dynamically create smoothed polygons, similiar like this
I have a matrix, each cell has an RGB value. I want to project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.