PDA

View Full Version : Intersection with cutting plane



KurtCob
04-30-2001, 04:50 AM
Hello guys, I'm here again http://www.opengl.org/discussion_boards/ubb/smile.gif,

I want to know if someone know how can I use the intersection of a surface / mesh with a cutting plane, the goal of what I want to do is, to have the curve were the cutting plane intersect the surface, I can send some picture if someone want...

Tnk you for the moment
Best regards
Kurt

chennes
04-30-2001, 06:31 AM
If you have your surface broken up into triangles, the problem is just a triangle-plane intersection. Try Graphics Gems 3 p.233 by Georgiades, "plane to plane intersection".

Chris

KurtCob
04-30-2001, 07:06 AM
Is there some online (internet) stuff ??

chennes
04-30-2001, 07:11 AM
http://www.acm.org/tog/GraphicsGems/gemsiii/pl2plane.c

KurtCob
04-30-2001, 08:37 AM
Chris do you want some picture, just to you check, if it is the most eficient/easy way to use ?

Tnks
RGDS
Kurt

chennes
05-01-2001, 04:35 AM
Feel free to e-mail me a picture - there should be a link to my address above.

Chris

chennes
05-01-2001, 07:02 AM
Here's how I'd do this:

1) Break the mesh into triangles.
2) For each triangle, find the points at which its rays intersect your plane (very easy if your plane is normal to one of the axes).
3) Connect the dots. http://www.opengl.org/discussion_boards/ubb/smile.gif

KurtCob
05-01-2001, 07:15 AM
Sorry Chris,

Im new to OpenGL, and I really have to do this, if you could send me some code, it will be really apreciated.

Tnks
Best regards
Kurt

chennes
05-01-2001, 08:56 AM
Sorry - a NDI prevents me from actually sending any code...

What part are you not sure about?

Chris