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 7045383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:31:26+00:00 2026-05-28T02:31:26+00:00

So, I have this algorithm to calculate cross-section of 3D shape with plane given

  • 0

So, I have this algorithm to calculate cross-section of 3D shape with plane given with normal vector.

However, my current problem is, that the cross-section is set of 3D points (all lying on that given plane) and to display it I need to map this coordinates to XY plane.

This works perfect if the plane normal is something like (0,0,c) – I just copy x and y coordinates discarding z.

And here is my question: Since I have no idea how to convert any other plain could anybody give me any hint as to what should I do now?

  • 1 1 Answer
  • 0 Views
  • 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-28T02:31:27+00:00Added an answer on May 28, 2026 at 2:31 am

    Your pane is defined by a normal vector

    n=(xn,yn,zn)
    

    For coordination transformation we need 2 base vectors and a zero point for the pane

    Base vectors

    We chose those “naturally” fitting to the x/y pane (see later for edge case):

    b1=(1,0,zb1)
    b2=(0,1,zb2)
    

    And we want

    b1 x b2 = n*c (c const scalar)

    to make sure these two are really bases

    Now solve this:

    b1 x b2= (0*zb2-zb1*1,zb1*0-1*zb2,1*1-0*0) = (zb1,zb2,1)
    zb1*c=xn
    zb2*c=yn
    1*c=zn
    
    c=zn,
    zb2=yn/c=yn/zn
    zb1=xn/c=xn/zn
    
    b1=(1,0,yn/zn)
    b2=(0,1,xn/zn)
    

    and normalize it

    bv1=(1,0,yn/zn)*sqrt(1+(yn/zn*yn/zn))
    bv2=(0,1,yn/zn)*sqrt(1+(xn/zn*xn/zn))
    

    An edge case is, when zn=0: In this case the normal vector is parallel to the x/y pane and no natural base vectors exist, ind this case you have to chose base b1 and b2 vectors by an esthetic POV and go through the same solution process or just chose bv1 and bv2.

    Zero point

    you spoke of no anchor point for your pane in the OQ, but it is necessary to differentiate your pane from the infinite family of parallel panes.

    If your anchor point is (0,0,0) this is a perfect anchor point for the coordinate transformation and your pane has

    x*xn+y*yn+z*zn=0,
    (y0,y0,z0)=(0,0,0)
    

    If not, I assume you have an anchor point of (xa,ya,za) and your pane has

    x*xn+y*yn+z*zn=d
    

    with d const scalar. A natural fit would be the point of the pane, that is defined by normal projection of the original zero point onto the pane:

    P0=(x0,y0,z0)
    

    with

    (x0, y0, z0) = c * (xn,yn,zn)
    

    Solving this against

    x*xn+y*yn+z*zn=d
    

    gives

    c*xn*xn+c*yn*yn+c*zn*zn=d
    

    and

    c=d/(xn*xn+yn*yn+zn*zn)
    

    thus

    P0=(x0,y0,z0)=c*(xn,yn,zn)
    

    is found.

    Final transformation

    is achieved by representing every point of your pane (i.e. those points you want to show) as

    P0+x'*bv1+y'*bv2
    

    with x’ and y’ being the new coordinates. Since we know P0, bv1 and bv2 this is quite trivial. If we are not on the edge case, we have zeroes in bv1.y and bv2.x further reducing the problem.

    x’ and y’ are the new coordinates you want.

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

Sidebar

Related Questions

I have to implement this algorithm in Mathematica: My problem is that I don't
I have this algorithm that I want to implement on VB6. Sub Main() dim
What's a good algorithm to solve this problem? I have three groups of people
I enjoy developing algorithms using the STL, however, I have this recurring problem where
I have a problem trying to work out the correct algorithm to calculate a
I have this algorithm in Java to store passwords in database. I'd like to
This is regarding AES algorithm. Suppose i have implemented a AES algorithm and encrypt
I have a language-agnostic question about an algorithm. This comes from a (probably simple)
I have this code in jQuery, that I want to reimplement with the prototype
I have this idea for a free backup application. The largest problem I need

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.