POV-Ray : Newsgroups : povray.newusers : placing objects at intersections? : Re: placing objects at intersections? Server Time
5 Nov 2024 03:20:15 EST (-0500)
  Re: placing objects at intersections?  
From: Tony LaVigne
Date: 31 Jul 2002 21:32:02
Message: <web.3d488ef11b88da9b88d4e3910@news.povray.org>
Dawn McKnight wrote:
>Tony LaVigne wrote:
>> Dawn,
>> Where did you derive your f(x)  equation from?
>
>Hey, Tony.
>
>First of all, let me sy thanks for your assistance... I'm really a math
>idiot trying to make it in a big world.
>
>My function is derived from the standard parabolic form y = a(x-h)^2 +k,
>where h, k are the x, y coordinates of the vertex.  Since I want a
>parabolic section (or an elipsoidal section) that matches the shape of
>the outer edge, without actually being at the outside edge (in this
>case, I want the x intercepts at +/- 27.5, y at 37.125), I find that the
>  coordinates of the vertex are (0, 37.125).  Plug and chug, and you get
>the equation I provided.
>
>> Is the general equation for this sphere
>> 1= (  (x-Xo)/40  )^2 + ( (y-Yo)/54  )^2  +( (z-Zo)/9.2 )^2   where
>> (Xo,Yo,Zo) is the center of the sphere?
>
>Uh... I'm not sure.  Is that right?  You're setting it equal to one?
>Why not zero?  I'm confused.
>
>I looked at the equation for the superquadratic elipsoid, which is in
>the docs, but it doesn't look like yours, and I'm not math-knowledgeable
>enough to get from one form to the other.
>
>> If so, and if the center of the sphere is (0,0,0) and your XY plane is at
>> z=0, then the equation might boil down to
>
>That's a reasonable aproximation, yes.
>
>> y= f(x) = sqrt{ [1-(x/40)^2] / [54^2]  }
>
>When I plot that on my graphing calculator, I get an elipsoid shape that
>has the right x intercepts... but the y intercept is off by a factor of
>a thousand.
>
>I'm not clever enough to figure out how to correct it....
>

I just realized the above was posted with the news group, below if my reply
to Dawn that night.  The way I understand it, Dawn wanted the equation of
an elipsiod that contained the points (27.5,0,0) and  (0,37.125,0) with the
center  at (0,0,0).
Thanks to Ed for  pointing out the below equation also assumes the
ellipsiod has not been rotated on any axis.


.....  My Calculus book is
at work so this is all from memory years ago.
Actually my equation from last night
1= (  (x-Xo)/40  )^2 + ( (y-Yo)/54  )^2  +( (z-Zo)/9.2 )^2

can be in the form of

1= (  (x-Xo) ^2)/a + ( (y-Yo)^2)/b  +( (z-Zo)^2)/c
assuming is symetric about the origin then Xo=0, Yo=0, Zo=0;
yeilds
1=(x^2)/a +(y^2)/b +(z^2)/c
if we are on the xy plane where z= 0 then if
1 = (x^2)/a +(y^2)/b      we call equation Alpha

with (x,y) = (27.5,0), (0,37.125)
yeilds
1= (27.5^2)/a + 0
1 =  0   +(37.125^2)/b
implies
a = 27.5^2
b = 37.125^2
 therefor
y = sqrt( )

equation alpha is rearranged into
y = sqrt(b- (x^2)*b/a)
y = f(x) = sqrt( 37.125^2(1-(x^2)/(27.5^2)    )
more accurately this is symetric about the x and y axis, so there is the
other sister equation that is negitive
y = f(x) = -sqrt( 37.125^2(1-(x^2)/(27.5^2)    )
so the generic equation is
y = f(x) = +/-sqrt( 37.125^2(1-(x^2)/(27.5^2)    )

I plotted this out and it does have the intercepts at the correct place, I
hope the curve is right for you though,

Let me know if this doesn't do it
Tony










ton### [at] xenomechanicscom


Post a reply to this message

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