POV-Ray : Newsgroups : povray.general : general geometry question Server Time
7 Aug 2024 19:20:02 EDT (-0400)
  general geometry question (Message 11 to 20 of 28)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: Jamie Davison
Subject: Re: general geometry question
Date: 21 Aug 2001 17:54:37
Message: <MPG.15ece9a6d12411d69899c5@news.povray.org>
I have a question.  And please bear in mind that my maths is not the 
best.

How do you get a solution if all three points are in a perfectly straight 
line, e.g.:
<0,0,0>, <1,0,0>, <2,0,0>

Apart from using the limited accuracy of numerical values in POV, how do 
you draw a circle such that its circumference passes through all three 
points?

Or am I misunderstaning the original question?

Bye for now,
     Jamie.


Post a reply to this message

From: Bill DeWitt
Subject: Re: general geometry question
Date: 21 Aug 2001 17:55:49
Message: <3b82d8e5$1@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Tue, 21 Aug 2001 14:02:43 -0700, Ben Chambers wrote:
> >
> >No, you're right - I was thinking sphere.  Sorry. :)
>
> It's even worse with spheres:

    That's right, the infinte number of speres that intersect two points is
much larger than the infinite number of circles that intersect two points.


Post a reply to this message

From: Warp
Subject: Re: general geometry question
Date: 21 Aug 2001 18:14:08
Message: <3b82dd30@news.povray.org>
Jamie Davison <jam### [at] ntlworldcom> wrote:
: How do you get a solution if all three points are in a perfectly straight 
: line, e.g.:
: <0,0,0>, <1,0,0>, <2,0,0>

  There's no solution. Not finite one, that is.

  If you try to calculate it, you probably get a division by 0 or another
similar undefined result.

  Geometrically this is explained by thinking that the only solution is
a circle with infinite radius and the center being at infinity. That is,
the circumference is a straight line.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Ron Parker
Subject: Re: general geometry question
Date: 21 Aug 2001 18:15:48
Message: <slrn9o5ncn.i39.ron.parker@fwi.com>
On Tue, 21 Aug 2001 17:55:49 -0400, Bill DeWitt wrote:
>
>"Ron Parker" <ron### [at] povrayorg> wrote in message
>news:slr### [at] fwicom...
>> On Tue, 21 Aug 2001 14:02:43 -0700, Ben Chambers wrote:
>> >
>> >No, you're right - I was thinking sphere.  Sorry. :)
>>
>> It's even worse with spheres:
>
>    That's right, the infinte number of speres that intersect two points is
>much larger than the infinite number of circles that intersect two points.

Let's not start that again.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Bill DeWitt
Subject: Re: general geometry question
Date: 21 Aug 2001 18:20:24
Message: <3b82dea8$1@news.povray.org>
"Jamie Davison" <jam### [at] ntlworldcom> wrote :
>
> Apart from using the limited accuracy of numerical values in POV, how do
> you draw a circle such that its circumference passes through all three
> points?

    I think the theorem or what ever goes something like, "For any three
points which are not on a line, there is one circle that intersects all
three points"


Post a reply to this message

From: Bill DeWitt
Subject: Re: general geometry question
Date: 21 Aug 2001 18:23:21
Message: <3b82df59$1@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote :
>
> Let's not start that again.

    I agree. We have already gone over it half an infinite number of times.


Post a reply to this message

From: Mark M  Wilson
Subject: Re: general geometry question
Date: 21 Aug 2001 18:23:55
Message: <3B82E079.6E533923@worldnet.att.net>
Sorry, Jamie --
I forgot to specify in my original question that the three points must
NOT be colinear, but SHOULD be coplanar (and anyone who knows geometry
knows that given any three points in 3D space, exactly one plane can
contain all three.)

I do in fact want to find the center point of the circle whose
circumference passes through the OTHER three points. :-)

--Mark

Jamie Davison wrote:
> 
> I have a question.  And please bear in mind that my maths is not the
> best.
> 
> How do you get a solution if all three points are in a perfectly straight
> line, e.g.:
> <0,0,0>, <1,0,0>, <2,0,0>
> 
> Apart from using the limited accuracy of numerical values in POV, how do
> you draw a circle such that its circumference passes through all three
> points?
> 
> Or am I misunderstaning the original question?
> 
> Bye for now,
>      Jamie.


Post a reply to this message

From: Mark M  Wilson
Subject: Re: general geometry question
Date: 21 Aug 2001 18:27:22
Message: <3B82E149.2280742B@worldnet.att.net>
Bill DeWitt wrote:
> 
> 
>     I think the theorem or what ever goes something like, "For any three
> points which are not on a line, there is one circle that intersects all
> three points"


THAT'S IT EXACTLY!!! And I'm trying to figure out how to find the vector
of the center of such a circle.

--Mark


Post a reply to this message

From: Warp
Subject: Re: general geometry question
Date: 21 Aug 2001 18:36:28
Message: <3b82e26c@news.povray.org>
Bill DeWitt <bde### [at] cflrrcom> wrote:
:     That's right, the infinte number of speres that intersect two points is
: much larger than the infinite number of circles that intersect two points.

  If we think about dimensions, then yes. With circles and two points, there's
a 1-dimensional line which is the solution to the problem. With spheres and
two points, there's 2-dimensional plane which is the solution.

  However, if we count the amount of circles and spheres, they are equal.

  Of course it's a bit odd to speak about "equal" and "bigger than" when
dealing with infinite, but it's defined in math.
  This creates some oddities. For example, there are as many natural numbers
(ie. positive integer numbers) as there are rational numbers (ie.
integer/integer). This is because each rational number can be indexed with
a pair of natural numbers.
  However, there are more real numbers than there are rational numbers.
This is because there's no way to index every real number with natural
numbers (or even rational numbers).
  This is odd knowing that given any two real numbers there will be an infinite
amount of rational numbers between them, and given any two rational numbers
there will be an infinite amount of real numbers between them. Yet there are
more real numbers than rational numbers.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Chris Jeppesen
Subject: Re: general geometry question
Date: 21 Aug 2001 19:04:46
Message: <3b82e90e@news.povray.org>
"Mark M. Wilson" <mmw### [at] ncsldcrstatencus> wrote in message
news:3B82C002.E75037D3@ncsl.dcr.state.nc.us...
> I have a couple of questions, actually.  The second is dependent on the
> first.
> 1) It's been a LOOONNNNGGGGGG time since high school geometry, but it
> seems to me it should be possible to scribe a circle given any three
> (coplanar) points.  Am I right?

Right. Constructing the circle with compass and straightedge is easy.
1) draw a line segment between each pair of points
2) construct perpindicular bisectors to each segment
3) the point where the three bisectors meet is the center. Set the compass
at the center, the radius to the distance from center to any of the points,
and draw.

you really only need two perp bisectors to make this work.

>
> 2) if the premise in #1 is correct, does anyone know of any macros for
> Povray that will calculate the coordinates of  the center of such a
> circle?

Hmmm,

#macro LineThroughPointWithSlope(M,P1,B)
  // Find intercept B given slope M and point to pass through P1
  #declare B=P1.y-(M*P1.x);
#end

#macro LineThroughTwoPoints(P1,P2,M,B)
  // Given two points in a plane, find
  // slope m and intercept b of line
  // through both lines
  #declare M=(P2.y-P1.y)/(P2.x-P1.x);
  LineThroughPointWithSlope(M,P1,B)
#end

#macro PerpendicularBisector(P1,P2,M,B)
  // Given two points in a plane, find
  // slope m and intercept b of perpendicular
  // bisector
  #local M2=0;
  LineThroughTwoPoints(P1,P2,M2,B)
  #declare M=-1/M2;
  LineThroughPointWithSlope(M,(P1+P2)/2,B)
#end

#macro FindIntersection(M1,B1,M2,B2,P)
  // given two lines slopes and intercepts, find the intersecting point P
  // M1*x+B1=M2*X+B2
  // B1-B2=M2*x-M1*x
  // (B1-B2)/(M2-M1)=x
  // y=M1*x+B1
  #local X=(B1-B2)/(M2-M1);
  #local Y=M1*X+B1;
  #declare P=<X,Y,0>
#end

#macro ThreePointCircle(P1,P2,P3,C,R)
  #local M1=0;
  #local M2=0;
  #local B1=0;
  #local B2=0;
  PerpendicularBisector(P1,P2,M1,B1)
  PerpendicularBisector(P2,P3,M2,B2)
  #declare C=<0,0,0>;
  FindIntersection(M1,B1,M2,B2,Center)
  #declare R=vlength(Center-P1);
#end

#declare Point1=<1,2,0>;
#declare Point2=<3,4,0>;
#declare Point3=<2,-1,0>;
#declare Center=<0,0,0>;
#declare Radius=0;
ThreePointCircle(Point1,Point2,Point3,Center,Radius)

plane {
  z,0
  pigment {checker color rgb 1 color rgb 0}
}

sphere {
  Point1,0.25
  pigment {color rgb <1,0,0>}
}

sphere {
  Point2,0.25
  pigment {color rgb <0,1,0>}
}

sphere {
  Point3,0.25
  pigment {color rgb <0,0,1>}
}

torus {
  Radius,0.125
  rotate x*90
  translate Center
  pigment {color rgb <1,1,0>}
}

camera {
  location <0,0,-15>
  look_at <0,0,0>
}

light_source {
  <2000,2000,-2000>
  color 1.5
}

This only works in 2 dimensions, ie z1=z2=z3. Extending to 3 dimensions is a
more complicated problem than I care to think about now.

>
> TIA,
> Mark M. Wilson


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.