Board index » delphi » Plane and circle intersection
Csaba, Hollo
Delphi Developer 
Sun, 28 Dec 2003 20:29:46 GMT

Csaba, Hollo
Delphi Developer 
Sun, 28 Dec 2003 20:29:46 GMT
Plane and circle intersection
Help!
Plane definition: three point I find the theirs intersection, and draw it. How can I do this? 
Csaba, Hollo
Delphi Developer 
Sun, 28 Dec 2003 21:28:25 GMT
Re:Plane and circle intersectionHelp! Plane definition: three point I find the theirs intersection, and draw it. How can I do this? 
Thérèse Hanque
Delphi Developer 
Sun, 28 Dec 2003 21:46:32 GMT
Re:Plane and circle intersectionHi Hollos, Quote> Plane definition: three point Radius and centre alone cannot define a circle in 3D space. Thrse 
Prof. Harley Flander
Delphi Developer 
Mon, 29 Dec 2003 23:31:28 GMT
Re:Plane and circle intersectionI wish to contact anyone who shares my interest in using Delphi for scientific/mathematical/engineering programming. Please reply directly to me at har...@umich.edu  ===================================================================== Prof. Harley Flanders 3353 Windemere Court Ann Arbor, MI 481052867 734 668 1546 har...@umich.edu ===================================================================== Visiting Scholar University of Michigan Dept. of Mathematics, East Hall Ann Arbor, MI 48109 Secretary: 734 764 6485 Home Page: http://www.unf.edu/~hflander 
Francesco Savastan
Delphi Developer 
Mon, 29 Dec 2003 23:53:00 GMT
Re:Plane and circle intersectionQuoteCsaba, Hollos <HollosCs...@posta.hu> wrote in message 3b4c5500_2@dnews... plane : a*x+b*y+c*z+d=0 circle in 3D space = intersection of a plane and a sphere : x^2+y^2+z^2=R^2 you have 3 equations in 3 unknowns (x,y,z) : now you have to solve the 
William Reid Bo
Delphi Developer 
Wed, 31 Dec 2003 13:07:23 GMT
Re:Plane and circle intersectionHollos Thrse is of course right about the circle/sphere thing. Hi, Thrse: we exchanged email about your admirable implementation So, Hollos, I assume you want the intersection of sphere and plane and I don't think I've ever tried this, but here are my musings. Usual As a preliminary I considered the intersection of line and circle. As far as sphere and plane is concerned, you should test firstly Offhand, I would compute a vector quantity (which is an analogue of a (BTW I believe this crosssum thing generalises somewhat in this Any case, working out whether the three points form a plane, and the Actually that's the hard part of all this. You then need to test Since you've already worked out the normal of the plane, you know the To test intersection, work out the distance from the centre of the If this distance is less than the radius of the sphere then the plane The centre of the intersecting circle (or point of tangency) is the I think the following is right for working out this point (hope I'm Finally you need to work out the radius of this intersecting circle, Likely your program wants to test whether a particular point, let's sqr(X  XS) + sqr(Y  YS) + sqr(Z  ZS) = sqr(r) :standard formula AND (P  S) dot N = 0 : dot is the scalar product (Mary Boas p 101 formula and you use these to test any particular point P. If the point Anyway, that would be my first shot at the problem. If it's not As for drawing the thing, speaking strictly for myself, I would use a sincerely, William Boyd <Boyd.Will...@wanadoo.fr> 
William Reid Bo
Delphi Developer 
Thu, 01 Jan 2004 05:06:23 GMT
Re:Plane and circle intersectionOn Sat, 14 Jul 2001 05:07:23 GMT, Boyd.Will...@wanadoo.fr (William QuoteReid Boyd) wrote: Quote>Offhand, I would compute a vector quantity (which is an analogue of a Suppose the three points P0, P1, P2 are coplanar. Then, for example, if three points P0, P1, P2 are coplanar then the crosssum quantity which can't be a great discovery but strikes me as very useful and was The result extends, but the induction is actually rather subtle and My assertion about the area of a quadrilateral is indeed a theorem, William Boyd Boyd.Will...@wanadoo.fr 
Csaba, Hollo
Delphi Developer 
Sun, 04 Jan 2004 15:03:59 GMT
Re:Plane and circle intersectionThanks for all. I come my short vacation. My problem exectly: Csaba 
Thérèse Hanque
Delphi Developer 
Sun, 04 Jan 2004 16:08:47 GMT
Re:Plane and circle intersectionHi Csaba, Quote> My problem exectly: needed), so the first thing would be to ensure that the center point belongs to the plane defined by the two vectors (unless both vectors include the center, of course, in which case there is no problem). If I understand well, the first step is to find the intersection between the My experience with 3D geometry is very poor and what I had has fainted in my Thrse 
William Reid Bo
Delphi Developer 
Sun, 04 Jan 2004 21:33:51 GMT
Re:Plane and circle intersectionOn Wed, 18 Jul 2001 10:08:47 +0200, "Thrse Hanquet" Quote<therese.hanq...@skynet.be> wrote: Quote>My experience with 3D geometry is very poor and what I had has fainted in my My post was just a bit of R&R from a hiatus in my current grapplings Right now I'm more worried about the disconcerting discovery that the So, Hollos and all, please ignore my bletherings for time being (and As for the original problem I will tonight code some stuff up, sincerely, William Boyd 
William Reid Bo
Delphi Developer 
Mon, 05 Jan 2004 14:23:08 GMT
Re:Plane and circle intersectionOn Wed, 18 Jul 2001 09:03:59 +0200, "Csaba, Hollos" Quote<HollosCs...@posta.hu> wrote: As promised some thoughts about your problem. I apologise if I've Like Thrse, I'm still not completely clear about your problem. I This (in my hands anyway) is a fairly tricky problem in vector I'll follow Thrse's suggested method. I warn you that if you're I'll also walk you through a numerical example as we go, which is of Call your first plane P_plane and your second plane Q_plane. Define What follows is a complete solution you should be able to code. There The numerical example we'll look at is this. P_plane is defined by the First we calculate the direction of the line of intersection of We also like gardening, Anna Akhmatova's poetry and especially her Calculation (use Mary Boas formula 4.18 p 104) gives: P = (2i + 2k) + (2i + 2j) + (2j + 2k) = 4i + 4j + 4k Often at this stage, because one is only interested in the direction, P_hat = (1/sqrt(3))(i + j + k) however prolly we shan't use these: you can if you like. Form the cross product now to get the direction of the line of el = PxQ = (4i + 4j + 4k)x(4k) = 16i  16j and in this case we will work out this vector normalised to get the el_hat = (1/sqrt(2))(i  j). Now, following Thrse, we need to work out the shortest distance from Problem is you need a point on the line and as mentioned before this So we do this: work out the distance from Q0 to the P_plane instead Mary Boas does distance from point to plane p 110, another bit of vm: h = abs( (any_P  Q0) dot P_hat) where abs indicates we take the plus sign because we talking distances h = abs([(1, 1, 1)  (1, 1, 1)] dot (1/sqrt(3))(i + j + k)) Mary Boas does angle between planes example 6 p 111, where she asks sin(angle) = magnitude(PxQ)/(magnitude(P)magnitude(Q)) where magnitude is Mary Boas formula 4.1 p 96. Now sketch a diagram. The point of the line el closest to Q0 we'll d = (4/sqrt(3))/(sqrt(2)/sqrt(3)) as promised right at the beginning of all this. Well, we've got the smallest sized circle that contacts the P_plane, But we can work out the point D0 now because we've just computed d and It turns out we should choose elxQ and we get: (D0  Q0)_hat = elxQ/magnitude(elxQ) The vector DO is Q0 + d(D0  Q0)_hat (i.e. the journey to Q0 plus d read more » 
Thérèse Hanque
Delphi Developer 
Mon, 05 Jan 2004 15:15:21 GMT
Re:Plane and circle intersectionHi William, Just in case you would not know it, this site (already mentioned by Asbj?rn http://astronomy.swin.edu.au/pbourke/geometry/ By the way, I found there a drawing reflecting exactly what I had in mind Thrse 
William Reid Bo
Delphi Developer 
Tue, 06 Jan 2004 10:53:46 GMT
Re:Plane and circle intersectionOn Thu, 19 Jul 2001 09:15:21 +0200, "Thrse Hanquet" Quote<therese.hanq...@skynet.be> wrote: Quote>Just in case you would not know it, this site (already mentioned by Asbj?rn it and a good selection of algorithms, including a lot of advice and coding (C) for 3D algorithms, which I plan to have a go at some time. I had forgotten his pages on line with line etc. My impression at the I also found a link to a nice Win program generating cutout nets of I've posted into comp.grahics.algorithms concerning my embarrassment sincerely, William 
William Reid Bo
Delphi Developer 
Sat, 10 Jan 2004 06:43:44 GMT
Re:Plane and circle intersection. Quote>I've posted into comp.grahics.algorithms concerning my embarrassment Hi William, ooph ... they {*word*190} in you there. Happily it turns out I'm not wrong, just stupid. William 
pilleu
Delphi Developer 
Sat, 10 Jan 2004 07:16:51 GMT
Re:Plane and circle intersectionYou must manage so that the 2 vectors defining your circle, are in fact orthogonal (i.e. perpendicular) radii of your circle. In that case, you can express the equation of the circle with parametric space coords, and your problem is becoming "easier". Let us set that the center of your circle is point C (xc, yc, zc) and you know 2 points, P and Q, on your circle located on 2 orthogonal radii. These points are defined by vector CP (vpx, vpy, vpz) and CQ (vqx, vqy, vqz). First, the above definitions imply that (R being the radius of your circle) : vpx^2 + vpy^2 + vpz^2 = vqx^2 + vqy^2 + vqz^2 = R^2 vpx*vqx + vpy*vqy + vpz*vqz = 0 (dot product of 2 orthogonal vectors) Any point M (xm, ym, zm) on the circle may be defined by the Chasles relationship : vector OM = vector OC + vector CM If teta is the angle between vector CP and vector CM : vector OM = vector OC + cos(teta)*vector CP + sin(teta)*vector CQ Which makes : xm = xc + cos(teta)*vpx + sin(teta)*vqx ym = yc + cos(teta)*vpy + sin(teta)*vqy zm = zc + cos(teta)*vpz + sin(teta)*vqz These are the parametric space coords of your circle. Now, you want to compute the intersection of this circle with a plane of Eric Pilleux Quote"Csaba, Hollos" wrote: 