POV-Ray : Newsgroups : povray.advanced-users : elliptical cone? Server Time
30 Jul 2024 16:18:54 EDT (-0400)
  elliptical cone? (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Chris Huff
Subject: Re: elliptical cone?
Date: 29 Jul 1999 11:40:16
Message: <37A075EF.1DE877CD@compuserve.com>
Hmm, I think I will just stick to the isosurfaces. :-)


Post a reply to this message

From: Ken
Subject: Re: elliptical cone?
Date: 29 Jul 1999 12:00:29
Message: <37A078B1.E8D53C7C@pacbell.net>
Chris Huff wrote:
> 
> Hmm, I think I will just stick to the isosurfaces. :-)

Must be a way to fake it with a csg if you ask me ;^ }

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Bob Hughes
Subject: Re: elliptical cone?
Date: 29 Jul 1999 14:56:16
Message: <37a0a3d0@news.povray.org>
It's nice to know someone actually understands it enough to work with
the math. All I've ever done is put some numbers in to these sort of
primitives. Got a hat shape I wanted that way though ;) pure luck and
then a little tweaking.


Nieminen Mika wrote:
> 
>   The formula of an elliptical cylinder along the z-axis is the following:
> 
> x^2/r1^2 + y^2/r2^2 = 1
> 
> where 'r1' and 'r2' are the radiuses of the ellipse.
>   What we want is this kind of cylinder which changes linearly from z=0 to
> z=1 so that in z=0 the ellipse has radiuses 'a' and 'b' and in z=1 radiuses
> 'c' and 'd'.
>   This means that when z=0, r1=a and r2=b. Then r1 and r2 should linearly
> change so that when z=1, r1=c and r2=d.
>   This can be expressed this way:
> 
> r1 = a*(1-z)+c*z
> r2 = b*(1-z)+d*z
> 
>   Substituting in the above formula we get:
> 
> x^2/(a*(1-z)+c*z)^2 + y^2/(b*(1-z)+d*z)^2 = 1
> 
>   That's it. Now we have to reduce that to polynomial form so that we can
> write the quartic. This is a quite laborious job. I will not type the
> polynom here because it's so long, but it begins this way:
> 
> b^2*x^2 + 2*(b*d-b^2)*x^2*z + (b^2-2*b*d+d^2)*x^2*z^2 + ... and so on
> 
>   Now, to write the polynomial, we look at the table in the page 212 of the
> povray manual (the "Poly, Cubic and Quartic"-section). We place all the
> terms of the polynomial in the right places in the vector. The result is:
> 
> quartic
> { <0, 0,  0,  0, 0,   0,   0,  b*b-2*b*d+d*d, 2*(b*d-b*b), b*b,
>    0,  0,   0,  0,   0,  0, 0,  0,  0, 0,
>    0, 0,  0, a*a-2*a*c+c*c, 2*(a*c-a*a), a*a, 0,  0,  0, 0,
>    -(a*a-2*a*c+c*c)*(b*b-2*b*d+d*d),
>    -(2*((b*d-b*b)*(a*a-2*a*c+c*c)+(a*c-a*a)*(b*b-2*b*d+d*d))),
>    -(b*b*(a*a-2*a*c+c*c)+4*(a*c-a*a)*(b*d-b*b)+a*a*(b*b-2*b*d+d*d)),
>    -(2*(b*b*(a*c-a*a)+a*a*(b*d-b*b))), -a*a*b*b>
> }
> 
>   Now we only have to cut the unwanted parts out (ie. everything that is
> at z<0 and z>1) and bound with a proper object for speedup.
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto://inversez@aol.com?Subject=PoV-News


Post a reply to this message

From: Mark Wagner
Subject: Re: elliptical cone?
Date: 30 Jul 1999 01:10:41
Message: <37a133d1@news.povray.org>
Ken wrote in message <37A078B1.E8D53C7C@pacbell.net>...
>
>
>Chris Huff wrote:
>>
>> Hmm, I think I will just stick to the isosurfaces. :-)
>
>Must be a way to fake it with a csg if you ask me ;^ }


Yes, by using the integral method -- use an infinite number of
infinitesmally thin elliptical cylinders with infinitesmal differences
between adjoining cylinders.

Mark


Post a reply to this message

From: Nieminen Mika
Subject: Re: elliptical cone?
Date: 30 Jul 1999 02:48:37
Message: <37a14ac5@news.povray.org>
Chris Huff <Chr### [at] compuservecom> wrote:
: Hmm, I think I will just stick to the isosurfaces. :-)

  Are isosurfaces as fast as quartics?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: elliptical cone?
Date: 30 Jul 1999 07:49:39
Message: <37A19164.FC7F7672@compuserve.com>
I don't know, that sounds like it would take a while to parse, and would
take an awful lot of memory...
;-)


Post a reply to this message

From: Chris Huff
Subject: Re: elliptical cone?
Date: 30 Jul 1999 07:52:37
Message: <37A19215.64F774E8@compuserve.com>
I don't know, they may be faster with simple functions, but you can make
extremely complex functions. Also depends on if you are using built in
functions or parsing functions, and what method you are using to
calculate(there are 2, one requires the maximum gradient of the
function.)


Post a reply to this message

From: Mark Wagner
Subject: Re: elliptical cone?
Date: 31 Jul 1999 00:12:15
Message: <37a2779f@news.povray.org>
Chris Huff wrote in message <37A19164.FC7F7672@compuserve.com>...
>I don't know, that sounds like it would take a while to parse, and would
>take an awful lot of memory...
>;-)


True :-)

Mark


Post a reply to this message

From: Josh English
Subject: Re: elliptical cone?
Date: 5 Aug 1999 15:58:22
Message: <37A9ECA0.3AB92DD1@spiritone.com>
That is a great solution... I've jsut been trying to remember how to take all
those formulas from algebra and turn them into poly and cubic statements.... I
thought it was based on the standard forms of the equaitons, but that didn't
seem to work. I'll have to look into that again

Joshua
eng### [at] spiritonecom

Nieminen Mika wrote:

>   The formula of an elliptical cylinder along the z-axis is the following:
>
> x^2/r1^2 + y^2/r2^2 = 1
>
> where 'r1' and 'r2' are the radiuses of the ellipse.
>   What we want is this kind of cylinder which changes linearly from z=0 to
> z=1 so that in z=0 the ellipse has radiuses 'a' and 'b' and in z=1 radiuses
> 'c' and 'd'.
>   This means that when z=0, r1=a and r2=b. Then r1 and r2 should linearly
> change so that when z=1, r1=c and r2=d.
>   This can be expressed this way:
>
> r1 = a*(1-z)+c*z
> r2 = b*(1-z)+d*z
>
>   Substituting in the above formula we get:
>
> x^2/(a*(1-z)+c*z)^2 + y^2/(b*(1-z)+d*z)^2 = 1
>
>   That's it. Now we have to reduce that to polynomial form so that we can
> write the quartic. This is a quite laborious job. I will not type the
> polynom here because it's so long, but it begins this way:
>
> b^2*x^2 + 2*(b*d-b^2)*x^2*z + (b^2-2*b*d+d^2)*x^2*z^2 + ... and so on
>
>   Now, to write the polynomial, we look at the table in the page 212 of the
> povray manual (the "Poly, Cubic and Quartic"-section). We place all the
> terms of the polynomial in the right places in the vector. The result is:
>
> quartic
> { <0, 0,  0,  0, 0,   0,   0,  b*b-2*b*d+d*d, 2*(b*d-b*b), b*b,
>    0,  0,   0,  0,   0,  0, 0,  0,  0, 0,
>    0, 0,  0, a*a-2*a*c+c*c, 2*(a*c-a*a), a*a, 0,  0,  0, 0,
>    -(a*a-2*a*c+c*c)*(b*b-2*b*d+d*d),
>    -(2*((b*d-b*b)*(a*a-2*a*c+c*c)+(a*c-a*a)*(b*b-2*b*d+d*d))),
>    -(b*b*(a*a-2*a*c+c*c)+4*(a*c-a*a)*(b*d-b*b)+a*a*(b*b-2*b*d+d*d)),
>    -(2*(b*b*(a*c-a*a)+a*a*(b*d-b*b))), -a*a*b*b>
> }
>
>   Now we only have to cut the unwanted parts out (ie. everything that is
> at z<0 and z>1) and bound with a proper object for speedup.
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Henri Sivonen
Subject: Re: elliptical cone?
Date: 29 Dec 1999 11:45:14
Message: <henris-4D2426.18463829121999@news.povray.org>
In article <37A02A80.FC2CCB77@panama.phoenix.net>, TonyB 
<ben### [at] panamaphoenixnet> wrote:

> One thing I've noticed is that these 'quartics' can do some of
> the stuff that an isosurface can do. Am I correct in assuming this?

Quartics are polynomials with x, y and z as variables. When the 
coordinates of a given point are plugged in the polynomial, the 
polynomial evaluates to some numerical value.

If the value is zero, the point is on the surface of the object 
represented by the polynomial. If the value is less than zero, the point 
is inside the object. If the value is greater than zero, the point is 
outside the object.

Thus the surface of the object consists of all the points in space with 
which the polynomial evaluates to zero.

--
Henri Sivonen
hen### [at] clinetfi
http://www.clinet.fi/~henris/


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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