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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:58:07+00:00 2026-05-22T18:58:07+00:00

I have seen some cool 3D stuff done with css3 3d translations, for instance:

  • 0

I have seen some cool 3D stuff done with css3 3d translations, for instance: http://www.webkit.org/blog-files/3d-transforms/morphing-cubes.html
9requires webkit)

Dose anyone know of a way to do collision detection? I can see how one could do it in 2D but I can’t fathom the math it would require to do it in 3D. Still, it seems like some JavaScript could pull it off.

In the above link the planes (divs) intersect at times, it would be cool if they would avoid each other.

Any ideas?

  • 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-22T18:58:07+00:00Added an answer on May 22, 2026 at 6:58 pm

    If you have a triangle p0, p1, p2 (three-component vectors) and a segment x,y, you can easily check if that segment intersects the triangle by solving this matrix linear equation:

    ((p1-p0) (p2-p0) (x-y)) (A B C)T = x-p0

    where A B C are scalar coefficients, ‘T’ is the matrix transpose (that is, (A B C)T is a column of three variables). ((p1-p0) (p2-p0) (x-y)) stands here for the 3×3 matrix with corresponding vectors as columns, and x-p0 is a column of three components, too.

    You solve this system and find A, B, and C. If A>0, B>0, A+B<1 and 0 < C < 1 then there is intersection.

    Having two triangles in 3d space, you can check if they intersect by checking the sides of the first triangle agains the second and then the sides of the second triangle against the first. I hope this helps.

    Update: changed the formula a bit.

    Update2: if the equation cannot be solved, then the segment is in the same plane as the triangle. It makes the task even easier: translate your coordinates to that plane and find if the segment intersects the triangle in 2d space…

    Update3: actually, the condition was wrong: A and B should be more then 0 but their sum A+B should be less then 1.

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

Sidebar

Related Questions

I have seen some very weird for loops when reading other people's code. I
I have seen some websites use the following tag: <meta type=title content=Title of the
I have seen some C++ classes with a destructor defined as follows: class someClass
Today, I have seen some legacy code. In the destructor there is a statement
How to build a simple recommendation system? I have seen some algorithms but it
Are there any tools to effectively compare two XML schema's? I have seen some
I have seen the following code: [DefaultValue(100)] [Description(Some descriptive field here)] public int MyProperty{...}
I have seen various rules for naming stored procedures. Some people prefix the sproc
I have a need to convert Pixels to Points in C#. I've seen some
I have seen some articles that show how to use AlternationIndex with ListBox es

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.