Thread: create plane in 3D and

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    create plane in 3D and

    Hi ,
    I have severel Point (XYZ) and would like to do the following:

    1) Pick out three points randomly and create a plane.

    2) in a further step I would like to check if the remainig points are on the plane or not.

    Is there a function or a library which I can use to create a plane using 3 points and check the distance of the remaining points to the created plane????


    Has anybody an idea??

    Thanks a lot.

    Michi

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    For real life distances I believe the only, or best way to do it is to just use straight mathematics. As far as creating the plane and checking it, opengl or directX can do this.

  3. #3
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Check this out: http://www.swiftless.com/tutorials/o...pengltuts.html

    Simple, easy, just from the basic.

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    2
    Hi,
    thanks for your reply.
    But I don't want to display the a plane. I`m just interested in the equation of the plane(defined by 3 Points) and the distances of the remaining points.

    Isn't there a function which can do that???

    Thanks

    Michi

  5. #5
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Sorry, I think by visualizing it would be much easier

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by michi7 View Post
    Hi,
    thanks for your reply.
    But I don't want to display the a plane. I`m just interested in the equation of the plane(defined by 3 Points) and the distances of the remaining points.

    Isn't there a function which can do that???

    Thanks

    Michi
    There will be, once you get done writing it. The mathematics is pretty straightforward, you just need to decide how you're going to store your plane.

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The math for this is simple:

    p dot n = d
    ax + by + cz + d = 0

    x,y,z = (0,1,2)

    a(0) + b(1) + c(2) + d = 0

    I'll let you figure out the rest.

    Moved to Tech board for lack of a better place to put it.
    Last edited by VirtualAce; 07-22-2008 at 04:36 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux 3d!
    By lruc in forum Tech Board
    Replies: 13
    Last Post: 11-10-2008, 10:07 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. How to create a file association program?
    By eShain in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2006, 12:15 PM
  4. Cannot create MDI Client Win
    By JaWiB in forum Windows Programming
    Replies: 1
    Last Post: 10-31-2005, 10:05 PM
  5. Clipping plane prob?
    By gazsux in forum Game Programming
    Replies: 7
    Last Post: 07-04-2003, 09:49 PM